From b87c33dc4570116419def8996902190fca310af3 Mon Sep 17 00:00:00 2001 From: Azhara Assanova Date: Wed, 3 May 2023 10:23:09 +0000 Subject: [PATCH] Change the app compat check for mutable implicit pending intents The old check takes the changeID and the UID which will only consider the minimum targetSDK amongst the packages in that sharedUID. The new check will specifically target the package which means that other packages with lower targetSDKs on the sharedUID won't affect it. Bug: 280435600 Test: atest PendingIntentTest Test: manually with a lower targetSDK Test: manually with a debugger as the system_server Change-Id: Icb3154048660f5891c403ee5037124d3a7b78de3 --- .../core/java/com/android/server/am/ActivityManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index a992765c0411a..c63eaaf9dba8f 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -5196,7 +5196,7 @@ public class ActivityManagerService extends IActivityManager.Stub isActivityResultType)) { boolean isChangeEnabled = CompatChanges.isChangeEnabled( PendingIntent.BLOCK_MUTABLE_IMPLICIT_PENDING_INTENT, - owningUid); + packageName, UserHandle.of(userId)); String resolvedType = resolvedTypes == null || i >= resolvedTypes.length ? null : resolvedTypes[i]; ActivityManagerUtils.logUnsafeIntentEvent(