diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-09-26 11:00:48 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-26 11:00:48 -0700 |
commit | cd30bb6c710d40839bc8b4d6edcb866f13342b5a (patch) | |
tree | 8d00f7b2cf5993016f98b16aae217f22f98f9d85 /packages/ExternalStorageProvider | |
parent | 7979e170b5bdfb6922d758f2c66f06829b6b5d9b (diff) | |
parent | bb77d99c257bc4a3371548c4bc8ba7088fa76005 (diff) | |
download | frameworks_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.java | 10 |
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; } |