From e4f78c1023a11fb155183db0c50d2ec5bf5b187a Mon Sep 17 00:00:00 2001 From: Ashwini Oruganti Date: Sat, 5 Dec 2020 23:27:40 -0800 Subject: [PATCH] NotificationEntryManagerTest: 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: I6bde25ae3316c6637caa66ec2dd9d1691c5f1ea5 --- .../statusbar/notification/NotificationEntryManagerTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java index 0be9f7de5825d..b0e17cdab8e4f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java @@ -629,7 +629,10 @@ public class NotificationEntryManagerTest extends SysuiTestCase { return new Notification.Action.Builder( Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon), "action", - PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"), 0)).build(); + // TODO(b/174935104) Please replace FLAG_MUTABLE_UNAUDITED below + // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. + PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"), + PendingIntent.FLAG_MUTABLE_UNAUDITED)).build(); } private static class FakeNotificationLifetimeExtender implements NotificationLifetimeExtender {