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

* commit 'e7477002683a83ce3022365fe6c327bbc31055cc':
  Handle volumes without visible paths.
This commit is contained in:
Jeff Sharkey
2015-07-31 02:07:45 +00:00
committed by Android Git Automerger

View File

@@ -162,7 +162,11 @@ public class ExternalStorageProvider extends DocumentsProvider {
if (volume.getType() == VolumeInfo.TYPE_PUBLIC) { if (volume.getType() == VolumeInfo.TYPE_PUBLIC) {
root.flags |= Root.FLAG_HAS_SETTINGS; 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.path = volume.getInternalPathForUser(userId);
root.docId = getDocIdForFile(root.path); root.docId = getDocIdForFile(root.path);