Merge "Limit bypass staged installer API to system and shell only" into rvc-dev am: e91800d290 am: 71fa579660 am: 9e21e9b3ab

Change-Id: I971457cea6777f56b1c131bbea84f8a6648e5380
This commit is contained in:
TreeHugger Robot
2020-04-23 02:41:04 +00:00
committed by Automerger Merge Worker

View File

@@ -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;
}