title: How do I check if I can read a document when using ContentResolver to query a DocumentsContract Uri?
body: <p>I'm using a <code>DocumentsContract</code> query to try to speed up reading a folder. I got most data but I'm struggling with the flag that tells me if I can read the document.</p>
  <p>This is the query:</p>
  <pre><code>contentResolver.query(uri, arrayOf(
                  DocumentsContract.Document.COLUMN_DOCUMENT_ID, DocumentsContract.Document.COLUMN_DISPLAY_NAME, DocumentsContract.Document.COLUMN_MIME_TYPE, DocumentsContract.Document.COLUMN_LAST_MODIFIED, DocumentsContract.Document.COLUMN_SIZE, DocumentsContract.Document.COLUMN_FLAGS), null, null, null)
  </code></pre>
  <p><code>DocumentsContract.Document.COLUMN_FLAGS</code> has in its documentation:</p>
  <pre><code>     /**
       * Flags that apply to a document. This column is required.
       * &lt;p&gt;
       * Type: INTEGER (int)
       *
       * @see #FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE
       * @see #FLAG_DIR_PREFERS_GRID
       * @see #FLAG_DIR_PREFERS_LAST_MODIFIED
       * @see #FLAG_DIR_SUPPORTS_CREATE
       * @see #FLAG_PARTIAL
       * @see #FLAG_SUPPORTS_COPY
       * @see #FLAG_SUPPORTS_DELETE
       * @see #FLAG_SUPPORTS_METADATA
       * @see #FLAG_SUPPORTS_MOVE
       * @see #FLAG_SUPPORTS_REMOVE
       * @see #FLAG_SUPPORTS_RENAME
       * @see #FLAG_SUPPORTS_SETTINGS
       * @see #FLAG_SUPPORTS_THUMBNAIL
       * @see #FLAG_SUPPORTS_WRITE
       * @see #FLAG_VIRTUAL_DOCUMENT
       * @see #FLAG_WEB_LINKABLE
       */
  </code></pre>
  <p>I can see <code>WRITE</code> there but what about <code>READ</code>?</p>