Loading services/core/java/com/android/server/pm/BroadcastHelper.java +8 −1 Original line number Diff line number Diff line Loading @@ -966,7 +966,14 @@ public final class BroadcastHelper { if (packageRemovedInfo.mIsAppIdRemoved) { // If a system app's updates are uninstalled the UID is not actually removed. Some // services need to know the package name affected. if (isReplace) { // // When setting Intent.EXTRA_REPLACING is true for isReplace or isArchived above, // the system triggers AppOpsService#resetAllModes in // ActivityManagerService#broadcastIntentLockedTraced when the action is // ACTION_UID_REMOVED. Add Intent.EXTRA_PACKAGE_NAME for isReplace or isArchived too. // Because AppOpsService#resetAllModes needs the packageName to define which uid to be // reset. If there is no package name, it resets the all appOps for all uids. if (isReplace || isArchived) { extras.putString(Intent.EXTRA_PACKAGE_NAME, removedPackage); } Loading services/core/java/com/android/server/pm/PackageArchiver.java +2 −2 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ public class PackageArchiver { } String currentLauncherPackageName = getCurrentLauncherPackageName(getParentUserId(userId)); if ((currentLauncherPackageName == null || !callerPackageName.equals( if ((currentLauncherPackageName == null || !TextUtils.equals(callerPackageName, currentLauncherPackageName)) && callingUid != Process.SHELL_UID) { // TODO(b/311619990): Remove dependency on SHELL_UID for testing Slog.e(TAG, TextUtils.formatSimple( Loading Loading @@ -830,7 +830,7 @@ public class PackageArchiver { mPm.mInstallerService.getAllSessions(userId).getList(); for (int idx = 0; idx < activeSessions.size(); idx++) { PackageInstaller.SessionInfo activeSession = activeSessions.get(idx); if (activeSession.appPackageName.equals(packageName) if (TextUtils.equals(activeSession.appPackageName, packageName) && activeSession.userId == userId && activeSession.active && activeSession.isUnarchival()) { return activeSession; Loading Loading
services/core/java/com/android/server/pm/BroadcastHelper.java +8 −1 Original line number Diff line number Diff line Loading @@ -966,7 +966,14 @@ public final class BroadcastHelper { if (packageRemovedInfo.mIsAppIdRemoved) { // If a system app's updates are uninstalled the UID is not actually removed. Some // services need to know the package name affected. if (isReplace) { // // When setting Intent.EXTRA_REPLACING is true for isReplace or isArchived above, // the system triggers AppOpsService#resetAllModes in // ActivityManagerService#broadcastIntentLockedTraced when the action is // ACTION_UID_REMOVED. Add Intent.EXTRA_PACKAGE_NAME for isReplace or isArchived too. // Because AppOpsService#resetAllModes needs the packageName to define which uid to be // reset. If there is no package name, it resets the all appOps for all uids. if (isReplace || isArchived) { extras.putString(Intent.EXTRA_PACKAGE_NAME, removedPackage); } Loading
services/core/java/com/android/server/pm/PackageArchiver.java +2 −2 Original line number Diff line number Diff line Loading @@ -284,7 +284,7 @@ public class PackageArchiver { } String currentLauncherPackageName = getCurrentLauncherPackageName(getParentUserId(userId)); if ((currentLauncherPackageName == null || !callerPackageName.equals( if ((currentLauncherPackageName == null || !TextUtils.equals(callerPackageName, currentLauncherPackageName)) && callingUid != Process.SHELL_UID) { // TODO(b/311619990): Remove dependency on SHELL_UID for testing Slog.e(TAG, TextUtils.formatSimple( Loading Loading @@ -830,7 +830,7 @@ public class PackageArchiver { mPm.mInstallerService.getAllSessions(userId).getList(); for (int idx = 0; idx < activeSessions.size(); idx++) { PackageInstaller.SessionInfo activeSession = activeSessions.get(idx); if (activeSession.appPackageName.equals(packageName) if (TextUtils.equals(activeSession.appPackageName, packageName) && activeSession.userId == userId && activeSession.active && activeSession.isUnarchival()) { return activeSession; Loading