summaryrefslogtreecommitdiffstats
path: root/packages/ExternalStorageProvider
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-09-26 11:00:48 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-26 11:00:48 -0700
commitcd30bb6c710d40839bc8b4d6edcb866f13342b5a (patch)
tree8d00f7b2cf5993016f98b16aae217f22f98f9d85 /packages/ExternalStorageProvider
parent7979e170b5bdfb6922d758f2c66f06829b6b5d9b (diff)
parentbb77d99c257bc4a3371548c4bc8ba7088fa76005 (diff)
downloadframeworks_base-cd30bb6c710d40839bc8b4d6edcb866f13342b5a.zip
frameworks_base-cd30bb6c710d40839bc8b4d6edcb866f13342b5a.tar.gz
frameworks_base-cd30bb6c710d40839bc8b4d6edcb866f13342b5a.tar.bz2
am bb77d99c: Merge "Directories are always enabled; update assets." into klp-dev
* commit 'bb77d99c257bc4a3371548c4bc8ba7088fa76005': Directories are always enabled; update assets.
Diffstat (limited to 'packages/ExternalStorageProvider')
-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;
}