From 8e7939d6405c6e049f18b18680e18911b248561c Mon Sep 17 00:00:00 2001 From: Ashwini Oruganti Date: Wed, 9 Dec 2020 04:31:48 -0800 Subject: [PATCH] ActivityTaskManagerService: Mark unaudited PendingIntents with FLAG_MUTABLE_UNAUDITED These PIs need an explicit mutability flag. This temporay flag is being used to mark these points in code and should be replaced ASAP. See go/immutable-pendingintents for more context. Bug: 160794467 Test: TH Change-Id: I4ee94224f25d64dcb7ba71b3dc62d3cf55924760 --- .../com/android/server/wm/ActivityTaskManagerService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index 8298dfd85114c..5fed940bb5406 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -4708,8 +4708,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { .setContentTitle(text) .setContentText( mContext.getText(R.string.heavy_weight_notification_detail)) + // TODO(b/175194709) Please replace FLAG_MUTABLE_UNAUDITED below + // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0, - intent, PendingIntent.FLAG_CANCEL_CURRENT, null, + intent, PendingIntent.FLAG_CANCEL_CURRENT + | PendingIntent.FLAG_MUTABLE_UNAUDITED, null, new UserHandle(userId))) .build(); try {