StubVolume as first class Volume in Vold
StubVolume is a Volume that is maintained by external party such as the
ChromeOS processes in ARC++.
Bug: 110380403
Test: Tested on ARC++
Change-Id: I3198bd7283d5f60a524da3707dea7385ffec599d
diff --git a/VolumeManager.h b/VolumeManager.h
index eedb1cb..2f76ddc 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -124,6 +124,11 @@
std::string* outVolId);
int destroyObb(const std::string& volId);
+ int createStubVolume(const std::string& sourcePath, const std::string& mountPath,
+ const std::string& fsType, const std::string& fsUuid,
+ const std::string& fsLabel, std::string* outVolId);
+ int destroyStubVolume(const std::string& volId);
+
int mountAppFuse(uid_t uid, pid_t pid, int mountId, android::base::unique_fd* device_fd);
int unmountAppFuse(uid_t uid, pid_t pid, int mountId);
@@ -146,6 +151,7 @@
std::list<std::shared_ptr<android::vold::Disk>> mDisks;
std::list<std::shared_ptr<android::vold::Disk>> mPendingDisks;
std::list<std::shared_ptr<android::vold::VolumeBase>> mObbVolumes;
+ std::list<std::shared_ptr<android::vold::VolumeBase>> mStubVolumes;
std::unordered_map<userid_t, int> mAddedUsers;
std::unordered_set<userid_t> mStartedUsers;
@@ -156,6 +162,7 @@
std::shared_ptr<android::vold::VolumeBase> mPrimary;
int mNextObbId;
+ int mNextStubVolumeId;
bool mSecureKeyguardShowing;
};