From 37e77d66866ef7256bb1567ac1f1ebbe409090db Mon Sep 17 00:00:00 2001 From: Ashwini Oruganti Date: Mon, 7 Dec 2020 07:27:33 -0800 Subject: [PATCH] NotificationTestHelper: 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 Exempt-From-Owner-Approval: noop change Change-Id: I037026c6e5b7e8b3c774550e40e85d2badee9448 --- .../statusbar/notification/row/NotificationTestHelper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java index 7470a13ae39ea..43ba844bdef36 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java @@ -455,7 +455,10 @@ public class NotificationTestHelper { private BubbleMetadata makeBubbleMetadata(PendingIntent deleteIntent) { Intent target = new Intent(mContext, BubblesTestActivity.class); - PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, target, 0); + // TODO(b/175014468) Please replace FLAG_MUTABLE_UNAUDITED below + // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. + PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, target, + PendingIntent.FLAG_MUTABLE_UNAUDITED); return new BubbleMetadata.Builder(bubbleIntent, Icon.createWithResource(mContext, R.drawable.android))