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

Commit ff7ecf81 authored by Linus Tufvesson's avatar Linus Tufvesson
Browse files

Allow adoptedshell to use low sdk bypass flag

Test: atest CtsPackageManagerTestCases:ChecksumsTest [on user build]
Bug: 329194958
Change-Id: Ib198f7a945463212b3d514866e81541c55073a60
parent 99e09fc8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -838,7 +838,8 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements

        if ((params.installFlags & PackageManager.INSTALL_BYPASS_LOW_TARGET_SDK_BLOCK) != 0
                && !PackageManagerServiceUtils.isSystemOrRootOrShell(callingUid)
                && !Build.IS_DEBUGGABLE) {
                && !Build.IS_DEBUGGABLE
                && !PackageManagerServiceUtils.isAdoptedShell(callingUid, mContext)) {
            // If the bypass flag is set, but not running as system root or shell then remove
            // the flag
            params.installFlags &= ~PackageManager.INSTALL_BYPASS_LOW_TARGET_SDK_BLOCK;