Update IVold interface to take packageNames when a user starts.
Bug: 111890351
Test: n/a
Change-Id: Ia24f15112f9a4ee4994688ff8fedf786cbf479b7
Exempt-From-Owner-Approval: This was approved as part of http://ag/4494673
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index 6e3317b..b034707 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -262,11 +262,12 @@
return translate(VolumeManager::Instance()->onUserRemoved(userId));
}
-binder::Status VoldNativeService::onUserStarted(int32_t userId) {
+binder::Status VoldNativeService::onUserStarted(int32_t userId,
+ const std::vector<std::string>& packageNames) {
ENFORCE_UID(AID_SYSTEM);
ACQUIRE_LOCK;
- return translate(VolumeManager::Instance()->onUserStarted(userId));
+ return translate(VolumeManager::Instance()->onUserStarted(userId, packageNames));
}
binder::Status VoldNativeService::onUserStopped(int32_t userId) {
diff --git a/VoldNativeService.h b/VoldNativeService.h
index 613c08e..e446185 100644
--- a/VoldNativeService.h
+++ b/VoldNativeService.h
@@ -39,7 +39,7 @@
binder::Status onUserAdded(int32_t userId, int32_t userSerial);
binder::Status onUserRemoved(int32_t userId);
- binder::Status onUserStarted(int32_t userId);
+ binder::Status onUserStarted(int32_t userId, const std::vector<std::string>& packageNames);
binder::Status onUserStopped(int32_t userId);
binder::Status addAppIds(const std::vector<std::string>& packageNames,
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index a37def4..b3cf9bf 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -372,7 +372,7 @@
return 0;
}
-int VolumeManager::onUserStarted(userid_t userId) {
+int VolumeManager::onUserStarted(userid_t userId, const std::vector<std::string>& packageNames) {
// Note that sometimes the system will spin up processes from Zygote
// before actually starting the user, so we're okay if Zygote
// already created this directory.
diff --git a/VolumeManager.h b/VolumeManager.h
index 75385e9..bd70653 100644
--- a/VolumeManager.h
+++ b/VolumeManager.h
@@ -91,7 +91,7 @@
int onUserAdded(userid_t userId, int userSerialNumber);
int onUserRemoved(userid_t userId);
- int onUserStarted(userid_t userId);
+ int onUserStarted(userid_t userId, const std::vector<std::string>& packageNames);
int onUserStopped(userid_t userId);
int addAppIds(const std::vector<std::string>& packageNames, const std::vector<int32_t>& appIds);
diff --git a/binder/android/os/IVold.aidl b/binder/android/os/IVold.aidl
index 43a1c04..f29e37e 100644
--- a/binder/android/os/IVold.aidl
+++ b/binder/android/os/IVold.aidl
@@ -29,7 +29,7 @@
void onUserAdded(int userId, int userSerial);
void onUserRemoved(int userId);
- void onUserStarted(int userId);
+ void onUserStarted(int userId, in @utf8InCpp String[] packageNames);
void onUserStopped(int userId);
void addAppIds(in @utf8InCpp String[] packageNames, in int[] appIds);