Add APIs for pushing package info to vold.

Bug: 111890351
Test: n/a
Change-Id: I3194a88a9ce612a2e4f2c7ea9e3392e0f8020fc1
gugelfrei
Sudheer Shanka 6 years ago
parent f101236657
commit d484aa9dad

@ -247,6 +247,7 @@ binder::Status VoldNativeService::shutdown() {
return translate(VolumeManager::Instance()->shutdown());
}
// TODO: sanity-check these string arguments
binder::Status VoldNativeService::onUserAdded(int32_t userId, int32_t userSerial) {
ENFORCE_UID(AID_SYSTEM);
ACQUIRE_LOCK;
@ -275,6 +276,24 @@ binder::Status VoldNativeService::onUserStopped(int32_t userId) {
return translate(VolumeManager::Instance()->onUserStopped(userId));
}
// TODO: sanity-check these string arguments
binder::Status VoldNativeService::addAppIds(const std::vector<std::string>& packageNames,
const std::vector<int32_t>& appIds) {
ENFORCE_UID(AID_SYSTEM);
ACQUIRE_LOCK;
return translate(VolumeManager::Instance()->addAppIds(packageNames, appIds));
}
// TODO: sanity-check these string arguments
binder::Status VoldNativeService::addSandboxIds(const std::vector<int32_t>& appIds,
const std::vector<std::string>& sandboxIds) {
ENFORCE_UID(AID_SYSTEM);
ACQUIRE_LOCK;
return translate(VolumeManager::Instance()->addSandboxIds(appIds, sandboxIds));
}
binder::Status VoldNativeService::onSecureKeyguardStateChanged(bool isShowing) {
ENFORCE_UID(AID_SYSTEM);
ACQUIRE_LOCK;

@ -42,6 +42,11 @@ public:
binder::Status onUserStarted(int32_t userId);
binder::Status onUserStopped(int32_t userId);
binder::Status addAppIds(const std::vector<std::string>& packageNames,
const std::vector<int32_t>& appIds);
binder::Status addSandboxIds(const std::vector<int32_t>& appIds,
const std::vector<std::string>& sandboxIds);
binder::Status onSecureKeyguardStateChanged(bool isShowing);
binder::Status partition(const std::string& diskId, int32_t partitionType, int32_t ratio);

@ -391,6 +391,16 @@ int VolumeManager::onUserStopped(userid_t userId) {
return 0;
}
int VolumeManager::addAppIds(const std::vector<std::string>& packageNames,
const std::vector<int32_t>& appIds) {
return 0;
}
int VolumeManager::addSandboxIds(const std::vector<int32_t>& appIds,
const std::vector<std::string>& sandboxIds) {
return 0;
}
int VolumeManager::onSecureKeyguardStateChanged(bool isShowing) {
mSecureKeyguardShowing = isShowing;
if (!mSecureKeyguardShowing) {

@ -94,6 +94,10 @@ public:
int onUserStarted(userid_t userId);
int onUserStopped(userid_t userId);
int addAppIds(const std::vector<std::string>& packageNames, const std::vector<int32_t>& appIds);
int addSandboxIds(const std::vector<int32_t>& appIds,
const std::vector<std::string>& sandboxIds);
int onSecureKeyguardStateChanged(bool isShowing);
int setPrimary(const std::shared_ptr<android::vold::VolumeBase>& vol);

@ -32,6 +32,9 @@ interface IVold {
void onUserStarted(int userId);
void onUserStopped(int userId);
void addAppIds(in @utf8InCpp String[] packageNames, in int[] appIds);
void addSandboxIds(in int[] appIds, in @utf8InCpp String[] sandboxIds);
void onSecureKeyguardStateChanged(boolean isShowing);
void partition(@utf8InCpp String diskId, int partitionType, int ratio);

Loading…
Cancel
Save