aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/org/pacien/tincapp/storageprovider/FilesDocumentsProvider.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/storageprovider/FilesDocumentsProvider.kt b/app/src/main/java/org/pacien/tincapp/storageprovider/FilesDocumentsProvider.kt
index 07ffaca..38cd562 100644
--- a/app/src/main/java/org/pacien/tincapp/storageprovider/FilesDocumentsProvider.kt
+++ b/app/src/main/java/org/pacien/tincapp/storageprovider/FilesDocumentsProvider.kt
@@ -94,8 +94,8 @@ class FilesDocumentsProvider : DocumentsProvider() {
94 MatrixCursor(projection ?: DEFAULT_DOCUMENT_PROJECTION).apply { 94 MatrixCursor(projection ?: DEFAULT_DOCUMENT_PROJECTION).apply {
95 when (parentDocumentId) { 95 when (parentDocumentId) {
96 ROOT_DOCUMENT_ID -> { 96 ROOT_DOCUMENT_ID -> {
97 addVirtualDirRow(VIRTUAL_ROOT_NETWORKS) 97 addVirtualDirRow(VIRTUAL_ROOT_NETWORKS, Document.FLAG_DIR_SUPPORTS_CREATE)
98 addVirtualDirRow(VIRTUAL_ROOT_LOG) 98 addVirtualDirRow(VIRTUAL_ROOT_LOG, Document.FLAG_DIR_SUPPORTS_CREATE)
99 } 99 }
100 100
101 else -> fileForDocumentId(parentDocumentId!!).listFiles()?.forEach { 101 else -> fileForDocumentId(parentDocumentId!!).listFiles()?.forEach {
@@ -206,12 +206,12 @@ class FilesDocumentsProvider : DocumentsProvider() {
206 ) 206 )
207 } 207 }
208 208
209 private fun MatrixCursor.addVirtualDirRow(documentId: String) { 209 private fun MatrixCursor.addVirtualDirRow(documentId: String, flags: Int = 0) {
210 addRow( 210 addRow(
211 Document.COLUMN_DOCUMENT_ID to documentId, 211 Document.COLUMN_DOCUMENT_ID to documentId,
212 Document.COLUMN_DISPLAY_NAME to documentId, 212 Document.COLUMN_DISPLAY_NAME to documentId,
213 Document.COLUMN_MIME_TYPE to Document.MIME_TYPE_DIR, 213 Document.COLUMN_MIME_TYPE to Document.MIME_TYPE_DIR,
214 Document.COLUMN_FLAGS to Document.FLAG_DIR_SUPPORTS_CREATE, 214 Document.COLUMN_FLAGS to flags,
215 ) 215 )
216 } 216 }
217 217