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
This commit is contained in:
Sudheer Shanka 2018-07-31 16:39:59 -07:00
parent 76c6bdab9c
commit ebaad1c848
5 changed files with 7 additions and 6 deletions

View file

@ -262,11 +262,12 @@ binder::Status VoldNativeService::onUserRemoved(int32_t userId) {
return translate(VolumeManager::Instance()->onUserRemoved(userId)); 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); ENFORCE_UID(AID_SYSTEM);
ACQUIRE_LOCK; ACQUIRE_LOCK;
return translate(VolumeManager::Instance()->onUserStarted(userId)); return translate(VolumeManager::Instance()->onUserStarted(userId, packageNames));
} }
binder::Status VoldNativeService::onUserStopped(int32_t userId) { binder::Status VoldNativeService::onUserStopped(int32_t userId) {

View file

@ -39,7 +39,7 @@ public:
binder::Status onUserAdded(int32_t userId, int32_t userSerial); binder::Status onUserAdded(int32_t userId, int32_t userSerial);
binder::Status onUserRemoved(int32_t userId); 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 onUserStopped(int32_t userId);
binder::Status addAppIds(const std::vector<std::string>& packageNames, binder::Status addAppIds(const std::vector<std::string>& packageNames,

View file

@ -372,7 +372,7 @@ int VolumeManager::onUserRemoved(userid_t userId) {
return 0; 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 // Note that sometimes the system will spin up processes from Zygote
// before actually starting the user, so we're okay if Zygote // before actually starting the user, so we're okay if Zygote
// already created this directory. // already created this directory.

View file

@ -91,7 +91,7 @@ public:
int onUserAdded(userid_t userId, int userSerialNumber); int onUserAdded(userid_t userId, int userSerialNumber);
int onUserRemoved(userid_t userId); 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 onUserStopped(userid_t userId);
int addAppIds(const std::vector<std::string>& packageNames, const std::vector<int32_t>& appIds); int addAppIds(const std::vector<std::string>& packageNames, const std::vector<int32_t>& appIds);

View file

@ -29,7 +29,7 @@ interface IVold {
void onUserAdded(int userId, int userSerial); void onUserAdded(int userId, int userSerial);
void onUserRemoved(int userId); void onUserRemoved(int userId);
void onUserStarted(int userId); void onUserStarted(int userId, in @utf8InCpp String[] packageNames);
void onUserStopped(int userId); void onUserStopped(int userId);
void addAppIds(in @utf8InCpp String[] packageNames, in int[] appIds); void addAppIds(in @utf8InCpp String[] packageNames, in int[] appIds);