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