Prefer visiblePath if available

Test: atest DocumentsUIGoogleTests

Bug: 154502439, 151981237

Change-Id: I85b673d31b2353cf4c65917bb44ef270f2c53128
This commit is contained in:
Diksha Gohlyan
2020-04-23 08:02:13 -07:00
parent 323d63572d
commit 0d1313aaef

View File

@@ -433,7 +433,7 @@ public class ExternalStorageProvider extends FileSystemProvider {
final int splitIndex = docId.indexOf(':', 1);
final String path = docId.substring(splitIndex + 1);
File target = visible ? root.visiblePath : root.path;
File target = root.visiblePath != null ? root.visiblePath : root.path;
if (target == null) {
return null;
}