summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Philip P. Moltmann <moltmann@google.com> 2019-09-25 11:24:00 -0700
committer android-build-merger <android-build-merger@google.com> 2019-09-25 11:24:00 -0700
commitf33b6733c7647558e4908286afcf1821c1f6de86 (patch)
treec5b052de145bbad2ae6cc6cbdc3852dd5972b64e
parentbf54f5ec8be11cc99ec30c6f68293c50db094ac8 (diff)
parentf94fa065d1e3b2e9ba58727e4b9ddc88a54f1244 (diff)
Merge "Put package name in extra not data" into qt-qpr1-dev
am: f94fa065d1 Change-Id: I56a380f33f454a6aa575a2029cdcceb4470ec89b
-rw-r--r--services/core/java/com/android/server/am/ActivityManagerService.java2
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java8
2 files changed, 8 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 9e5538aa7309..8c3f92430700 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -15007,7 +15007,7 @@ public class ActivityManagerService extends IActivityManager.Stub
mBatteryStatsService.removeUid(uid);
if (intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
mAppOpsService.resetAllModes(UserHandle.getUserId(uid),
- intent.getData().getSchemeSpecificPart());
+ intent.getStringExtra(Intent.EXTRA_PACKAGE_NAME));
} else {
mAppOpsService.uidRemoved(uid);
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index b6d7f3879ad6..03e8f6b67d80 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -18822,8 +18822,14 @@ public class PackageManagerService extends IPackageManager.Stub
}
}
if (removedAppId >= 0) {
+ // If a system app's updates are uninstalled the UID is not actually removed. Some
+ // services need to know the package name affected.
+ if (extras.getBoolean(Intent.EXTRA_REPLACING, false)) {
+ extras.putString(Intent.EXTRA_PACKAGE_NAME, removedPackage);
+ }
+
packageSender.sendPackageBroadcast(Intent.ACTION_UID_REMOVED,
- removedPackage, extras, Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND,
+ null, extras, Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND,
null, null, broadcastUsers, instantUserIds);
}
}