Merge "Use visiblePath instead of path for findDocumentPath" into rvc-dev am: e445872013 am: eed2210da6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11815146

Change-Id: I740bdd76bdb4295ee18aab5323b699038831a31c
This commit is contained in:
Diksha Gohlyan
2020-06-10 16:24:48 +00:00
committed by Automerger Merge Worker

View File

@@ -520,9 +520,11 @@ public class ExternalStorageProvider extends FileSystemProvider {
final RootInfo root = resolvedDocId.first;
File child = resolvedDocId.second;
final File rootFile = root.visiblePath != null ? root.visiblePath
: root.path;
final File parent = TextUtils.isEmpty(parentDocId)
? root.path
: getFileForDocId(parentDocId);
? rootFile
: getFileForDocId(parentDocId);
return new Path(parentDocId == null ? root.rootId : null, findDocumentPath(parent, child));
}