Merge "Handle volumes without visible paths." into mnc-dev

This commit is contained in:
Jeff Sharkey
2015-07-31 01:46:45 +00:00
committed by Android (Google) Code Review

View File

@@ -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);