diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-09-26 11:05:44 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-26 11:05:44 -0700 |
commit | 8aa0c344835401fd3e6d84d3aa5ec3920bac0baa (patch) | |
tree | 0ad2b0fd0ecc0a46807cd1ffd4ec63c1c482ec14 /packages/ExternalStorageProvider | |
parent | 9c437bcb57a7cf5eb3bd1a85a4f2322fd34f50a3 (diff) | |
parent | cd30bb6c710d40839bc8b4d6edcb866f13342b5a (diff) | |
download | frameworks_base-8aa0c344835401fd3e6d84d3aa5ec3920bac0baa.zip frameworks_base-8aa0c344835401fd3e6d84d3aa5ec3920bac0baa.tar.gz frameworks_base-8aa0c344835401fd3e6d84d3aa5ec3920bac0baa.tar.bz2 |
am cd30bb6c: am bb77d99c: Merge "Directories are always enabled; update assets." into klp-dev
* commit 'cd30bb6c710d40839bc8b4d6edcb866f13342b5a':
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; } |