diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-09-26 10:54:16 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-09-26 10:54:19 -0700 |
commit | 2a030b05a978281147df4d1cc4f12bc8d61c0729 (patch) | |
tree | 31c633736a130cc676370febd6b3ebbd552391bc /packages/ExternalStorageProvider/src/com | |
parent | 822ac0bada06b2185b4d5e8304160b680a72cff2 (diff) | |
download | frameworks_base-2a030b05a978281147df4d1cc4f12bc8d61c0729.zip frameworks_base-2a030b05a978281147df4d1cc4f12bc8d61c0729.tar.gz frameworks_base-2a030b05a978281147df4d1cc4f12bc8d61c0729.tar.bz2 |
Directories are always enabled; update assets.
Fix bug where item enabled state depended on FLAG_SUPPORTS_WRITE;
directories are now always enabled. Also unifies enabled testing.
Bug: 10903210, 10946731
Change-Id: I241533d273dfe4a2146bb322a8bd93066bf4ef55
Diffstat (limited to 'packages/ExternalStorageProvider/src/com')
-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; } |