Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9a3cf01 authored by Jerry Chang's avatar Jerry Chang
Browse files

Limit bypass staged installer API to system and shell only

Bug: 148664742
Test: manually check access the api inproperly throws
Change-Id: I568b9df87d30c8da6dd85f0310bf7af1d60b4ea3
parent e23c8dd1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
    }