diff options
author | Jeff Sharkey <jsharkey@google.com> | 2015-07-31 01:57:43 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-31 01:57:43 +0000 |
commit | e7477002683a83ce3022365fe6c327bbc31055cc (patch) | |
tree | 921de42f402e379fc1f71fc3b14e493cce09c8f4 /packages/ExternalStorageProvider | |
parent | b9904daa7892328fea10bbbab521d080f5874961 (diff) | |
parent | 0eaadbc2a9b7350ba839ad14590c34235e42e28b (diff) | |
download | frameworks_base-e7477002683a83ce3022365fe6c327bbc31055cc.zip frameworks_base-e7477002683a83ce3022365fe6c327bbc31055cc.tar.gz frameworks_base-e7477002683a83ce3022365fe6c327bbc31055cc.tar.bz2 |
am 0eaadbc2: am 5db4cc8f: Merge "Handle volumes without visible paths." into mnc-dev
* commit '0eaadbc2a9b7350ba839ad14590c34235e42e28b':
Handle volumes without visible paths.
Diffstat (limited to 'packages/ExternalStorageProvider')
-rw-r--r-- | packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java index 4f0c6a41..393771a 100644 --- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java +++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java @@ -162,7 +162,11 @@ public class ExternalStorageProvider extends DocumentsProvider { if (volume.getType() == VolumeInfo.TYPE_PUBLIC) { root.flags |= Root.FLAG_HAS_SETTINGS; } - root.visiblePath = volume.getPathForUser(userId); + if (volume.isVisibleForRead(userId)) { + root.visiblePath = volume.getPathForUser(userId); + } else { + root.visiblePath = null; + } root.path = volume.getInternalPathForUser(userId); root.docId = getDocIdForFile(root.path); |