From 15546b948d32a9e1cf58309d16be53305e02c0c1 Mon Sep 17 00:00:00 2001 From: Ashwini Oruganti Date: Sun, 6 Dec 2020 23:00:29 -0800 Subject: [PATCH] NotificationInterruptStateProviderImplTest: 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: I3b0d26736cd5df301884b342c347db4dbd3d385e --- .../NotificationInterruptStateProviderImplTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java index e254cd2c82a7c..d606316f16edf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java @@ -476,7 +476,10 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase { private NotificationEntry createBubble() { Notification.BubbleMetadata data = new Notification.BubbleMetadata.Builder( - PendingIntent.getActivity(mContext, 0, new Intent(), 0), + // TODO(b/174970399) Please replace FLAG_MUTABLE_UNAUDITED below + // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. + PendingIntent.getActivity(mContext, 0, new Intent(), + PendingIntent.FLAG_MUTABLE_UNAUDITED), Icon.createWithResource(mContext.getResources(), R.drawable.android)) .build(); Notification n = new Notification.Builder(getContext(), "a")