summaryrefslogtreecommitdiffstats
path: root/packages/ExternalStorageProvider/src
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-09-02 17:19:40 -0700
committerJeff Sharkey <jsharkey@android.com>2013-09-02 17:43:14 -0700
commit348ad6866b91afa4d59d45df533ef88094c74d13 (patch)
tree020b78712575e75216d246ff961af93c9247f051 /packages/ExternalStorageProvider/src
parent251097b3789632000ccdaf7fb7d66a82ff37d882 (diff)
downloadframeworks_base-348ad6866b91afa4d59d45df533ef88094c74d13.zip
frameworks_base-348ad6866b91afa4d59d45df533ef88094c74d13.tar.gz
frameworks_base-348ad6866b91afa4d59d45df533ef88094c74d13.tar.bz2
Filter roots based on incoming request.
When incoming request is for local-only content, or for ACTION_CREATE, only include roots advertise those features. Filters roots based on the allowed MIME types and the supported types advertised by each root. This supports displaying Images and Audio roots only when requesting those content types. Applies the same filter when deciding which roots to query for recents. Fixes advanced filtering instead of limiting to just devices. Update sorting so that Recent always appears first. Add testing support for LOCAL_ONLY. Bug: 10597317, 10526535 Change-Id: Ic5ccf475c4fe93fd52b29388d369d7f6915c0c42
Diffstat (limited to 'packages/ExternalStorageProvider/src')
-rw-r--r--packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index de8c29a..bbe3b45 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -87,9 +87,7 @@ public class ExternalStorageProvider extends DocumentsProvider {
final RootInfo root = new RootInfo();
root.rootId = "primary";
root.rootType = Root.ROOT_TYPE_DEVICE;
- root.flags = Root.FLAG_SUPPORTS_CREATE | Root.FLAG_LOCAL_ONLY | Root.FLAG_ADVANCED
- | Root.FLAG_PROVIDES_AUDIO | Root.FLAG_PROVIDES_VIDEO
- | Root.FLAG_PROVIDES_IMAGES;
+ root.flags = Root.FLAG_SUPPORTS_CREATE | Root.FLAG_LOCAL_ONLY | Root.FLAG_ADVANCED;
root.icon = R.drawable.ic_pdf;
root.title = getContext().getString(R.string.root_internal_storage);
root.docId = getDocIdForFile(path);