Update vold to handle package info from StorageManagerService.
Bug: 111890351
Test: n/a
Change-Id: I098ad4bc15fae843909d97dad5d301a4e53d51bc
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index b3cf9bf..049adc8 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -380,6 +380,7 @@
fs_prepare_dir(path.c_str(), 0755, AID_ROOT, AID_ROOT);
mStartedUsers.insert(userId);
+ mUserPackages[userId] = packageNames;
if (mPrimary) {
linkPrimary(userId);
}
@@ -393,11 +394,17 @@
int VolumeManager::addAppIds(const std::vector<std::string>& packageNames,
const std::vector<int32_t>& appIds) {
+ for (size_t i = 0; i < packageNames.size(); ++i) {
+ mAppIds[packageNames[i]] = appIds[i];
+ }
return 0;
}
int VolumeManager::addSandboxIds(const std::vector<int32_t>& appIds,
const std::vector<std::string>& sandboxIds) {
+ for (size_t i = 0; i < appIds.size(); ++i) {
+ mSandboxIds[appIds[i]] = sandboxIds[i];
+ }
return 0;
}
@@ -587,6 +594,10 @@
updateVirtualDisk();
mAddedUsers.clear();
mStartedUsers.clear();
+
+ mUserPackages.clear();
+ mAppIds.clear();
+ mSandboxIds.clear();
return 0;
}