Return useful path when not visible.

This allows apps like ExternalStorageProvider to still read/write
files on transient storage devices which aren't mounted as visible.

Bug: 22545248
Change-Id: Idacb15f2233245a8e1861d9be977535a82b218ec
gugelfrei
Jeff Sharkey 9 years ago
parent d46687ee5d
commit 8474ee3231

@ -117,7 +117,11 @@ status_t PublicVolume::doMount() {
mFuseWrite = StringPrintf("/mnt/runtime_write/%s", stableName.c_str());
setInternalPath(mRawPath);
setPath(StringPrintf("/storage/%s", stableName.c_str()));
if (getMountFlags() & MountFlags::kVisible) {
setPath(StringPrintf("/storage/%s", stableName.c_str()));
} else {
setPath(mRawPath);
}
if (fs_prepare_dir(mRawPath.c_str(), 0700, AID_ROOT, AID_ROOT) ||
fs_prepare_dir(mFuseDefault.c_str(), 0700, AID_ROOT, AID_ROOT) ||

Loading…
Cancel
Save