am 0eaadbc2: am 5db4cc8f: Merge "Handle volumes without visible paths." into mnc-dev

* commit '0eaadbc2a9b7350ba839ad14590c34235e42e28b':
  Handle volumes without visible paths.
This commit is contained in:
Jeff Sharkey
2015-07-31 01:57:43 +00:00
committed by Android Git Automerger

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