summaryrefslogtreecommitdiffstats
path: root/packages/ExternalStorageProvider/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ExternalStorageProvider/src/com')
-rw-r--r--packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 0ef5f56..ed28da5 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -16,7 +16,6 @@
package com.android.externalstorage;
-import android.content.ContentResolver;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.database.MatrixCursor;
@@ -166,11 +165,12 @@ public class ExternalStorageProvider extends DocumentsProvider {
int flags = 0;
- if (file.isDirectory() && file.canWrite()) {
- flags |= Document.FLAG_DIR_SUPPORTS_CREATE;
- }
if (file.canWrite()) {
- flags |= Document.FLAG_SUPPORTS_WRITE;
+ if (file.isDirectory()) {
+ flags |= Document.FLAG_DIR_SUPPORTS_CREATE;
+ } else {
+ flags |= Document.FLAG_SUPPORTS_WRITE;
+ }
flags |= Document.FLAG_SUPPORTS_DELETE;
}