summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@google.com>2015-07-31 01:46:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-31 01:46:45 +0000
commit5db4cc8fee8b919b5f62f222af92a4e995ca6a70 (patch)
tree1477f433e7cf0ebe348dc4c3a164d9daaa2078e5 /packages
parente3b0119f79d11744a7f590510b184feef0f45894 (diff)
parent865ea7c800883176e5bd9924f27abb3cbacd5178 (diff)
downloadframeworks_base-5db4cc8fee8b919b5f62f222af92a4e995ca6a70.zip
frameworks_base-5db4cc8fee8b919b5f62f222af92a4e995ca6a70.tar.gz
frameworks_base-5db4cc8fee8b919b5f62f222af92a4e995ca6a70.tar.bz2
Merge "Handle volumes without visible paths." into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java6
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);