Limit bypass staged installer API to system and shell only
Bug: 148664742 Test: manually check access the api inproperly throws Change-Id: I568b9df87d30c8da6dd85f0310bf7af1d60b4ea3
This commit is contained in:
@@ -979,6 +979,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
||||
|
||||
@Override
|
||||
public void bypassNextStagedInstallerCheck(boolean value) {
|
||||
if (!isCalledBySystemOrShell(Binder.getCallingUid())) {
|
||||
throw new SecurityException("Caller not allowed to bypass staged installer check");
|
||||
}
|
||||
mBypassNextStagedInstallerCheck = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user