Loading services/core/java/com/android/server/pm/PackageInstallerService.java +7 −7 Original line number Diff line number Diff line Loading @@ -589,13 +589,13 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements } } if (params.isStaged && !isCalledBySystemOrShell(callingUid)) { if (mBypassNextStagedInstallerCheck) { mBypassNextStagedInstallerCheck = false; } else if (params.isStaged && !isCalledBySystemOrShell(callingUid) && !isWhitelistedStagedInstaller(requestedInstallerPackageName)) { } else if (!isStagedInstallerAllowed(requestedInstallerPackageName)) { throw new SecurityException("Installer not allowed to commit staged install"); } } if (!params.isMultiPackage) { // Only system components can circumvent runtime permissions when installing. Loading Loading @@ -725,7 +725,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements || callingUid == Process.SHELL_UID; } private boolean isWhitelistedStagedInstaller(String installerName) { private boolean isStagedInstallerAllowed(String installerName) { return SystemConfig.getInstance().getWhitelistedStagedInstallers().contains(installerName); } Loading Loading
services/core/java/com/android/server/pm/PackageInstallerService.java +7 −7 Original line number Diff line number Diff line Loading @@ -589,13 +589,13 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements } } if (params.isStaged && !isCalledBySystemOrShell(callingUid)) { if (mBypassNextStagedInstallerCheck) { mBypassNextStagedInstallerCheck = false; } else if (params.isStaged && !isCalledBySystemOrShell(callingUid) && !isWhitelistedStagedInstaller(requestedInstallerPackageName)) { } else if (!isStagedInstallerAllowed(requestedInstallerPackageName)) { throw new SecurityException("Installer not allowed to commit staged install"); } } if (!params.isMultiPackage) { // Only system components can circumvent runtime permissions when installing. Loading Loading @@ -725,7 +725,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements || callingUid == Process.SHELL_UID; } private boolean isWhitelistedStagedInstaller(String installerName) { private boolean isStagedInstallerAllowed(String installerName) { return SystemConfig.getInstance().getWhitelistedStagedInstallers().contains(installerName); } Loading