Loading services/core/java/com/android/server/pm/PackageInstallerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -706,7 +706,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements } } if (Build.IS_DEBUGGABLE || isCalledBySystemOrShell(callingUid)) { if (Build.IS_DEBUGGABLE || isCalledBySystem(callingUid)) { params.installFlags |= PackageManager.INSTALL_ALLOW_DOWNGRADE; } else { params.installFlags &= ~PackageManager.INSTALL_ALLOW_DOWNGRADE; Loading Loading @@ -916,6 +916,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements return sessionId; } private static boolean isCalledBySystem(int callingUid) { return callingUid == Process.SYSTEM_UID || callingUid == Process.ROOT_UID; } private boolean isCalledBySystemOrShell(int callingUid) { return callingUid == Process.SYSTEM_UID || callingUid == Process.ROOT_UID || callingUid == Process.SHELL_UID; Loading Loading
services/core/java/com/android/server/pm/PackageInstallerService.java +5 −1 Original line number Diff line number Diff line Loading @@ -706,7 +706,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements } } if (Build.IS_DEBUGGABLE || isCalledBySystemOrShell(callingUid)) { if (Build.IS_DEBUGGABLE || isCalledBySystem(callingUid)) { params.installFlags |= PackageManager.INSTALL_ALLOW_DOWNGRADE; } else { params.installFlags &= ~PackageManager.INSTALL_ALLOW_DOWNGRADE; Loading Loading @@ -916,6 +916,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements return sessionId; } private static boolean isCalledBySystem(int callingUid) { return callingUid == Process.SYSTEM_UID || callingUid == Process.ROOT_UID; } private boolean isCalledBySystemOrShell(int callingUid) { return callingUid == Process.SYSTEM_UID || callingUid == Process.ROOT_UID || callingUid == Process.SHELL_UID; Loading