OSDN Git Service

Report internal path for public volumes.
authorJeff Sharkey <jsharkey@android.com>
Wed, 13 May 2015 19:36:48 +0000 (12:36 -0700)
committerThe Android Automerger <android-build@google.com>
Wed, 13 May 2015 19:49:12 +0000 (12:49 -0700)
Used by framework to bypass FUSE daemon overhead in some cases.

Bug: 21017105
Change-Id: I2f3ae70607417fc4cd2c970cb17cf3afa2f42613

EmulatedVolume.cpp
PublicVolume.cpp

index 7098872..c2a7d9c 100644 (file)
@@ -59,8 +59,8 @@ status_t EmulatedVolume::doMount() {
         return -errno;
     }
 
-    setPath(mFusePath);
     setInternalPath(mRawPath);
+    setPath(mFusePath);
 
     if (!(mFusePid = fork())) {
         // TODO: protect when not mounted as visible
index 025d2eb..2b2c32b 100644 (file)
@@ -107,6 +107,7 @@ status_t PublicVolume::doMount() {
 
     mRawPath = StringPrintf("/mnt/media_rw/%s", stableName.c_str());
     mFusePath = StringPrintf("/storage/%s", stableName.c_str());
+    setInternalPath(mRawPath);
     setPath(mFusePath);
 
     if (fs_prepare_dir(mRawPath.c_str(), 0700, AID_ROOT, AID_ROOT)) {