Add a method in vold to unmount app data and obb dir for testing
This new method will be used in new sm command.
Tests can use this so data and obb dirs are unmounted, and won't
be killed when volume is unmounted.
Bug: 148049767
Test: New sm command able to unmount app's data and obb dirs
Change-Id: Ifbc661ca510e996abd4b7ce1fb195aaa7afc37ad
diff --git a/VolumeManager.h b/VolumeManager.h
index 9640303..3573b1a 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -115,7 +115,8 @@
int onSecureKeyguardStateChanged(bool isShowing);
int remountUid(uid_t uid, int32_t remountMode) { return 0; }
- int remountAppStorageDirs(int uid, int pid, const std::vector<std::string>& packageNames);
+ int handleAppStorageDirs(int uid, int pid,
+ bool doUnmount, const std::vector<std::string>& packageNames);
/* Aborts all FUSE filesystems, in case the FUSE daemon is no longer up. */
int abortFuse();
@@ -129,7 +130,8 @@
int updateVirtualDisk();
int setDebug(bool enable);
- bool forkAndRemountStorage(int uid, int pid, const std::vector<std::string>& packageNames);
+ bool forkAndRemountStorage(int uid, int pid, bool doUnmount,
+ const std::vector<std::string>& packageNames);
static VolumeManager* Instance();