Skip to content

Commit 5db4cc8

Browse files
Jeff SharkeyAndroid (Google) Code Review
authored andcommitted
Merge "Handle volumes without visible paths." into mnc-dev
2 parents e3b0119 + 865ea7c commit 5db4cc8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ private void updateVolumesLocked() {
162162
if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
163163
root.flags |= Root.FLAG_HAS_SETTINGS;
164164
}
165-
root.visiblePath = volume.getPathForUser(userId);
165+
if (volume.isVisibleForRead(userId)) {
166+
root.visiblePath = volume.getPathForUser(userId);
167+
} else {
168+
root.visiblePath = null;
169+
}
166170
root.path = volume.getInternalPathForUser(userId);
167171
root.docId = getDocIdForFile(root.path);
168172

0 commit comments

Comments
 (0)