summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ashwini Oruganti <ashfall@google.com> 2020-12-10 00:30:07 -0800
committer Ashwini Oruganti <ashfall@google.com> 2021-01-05 17:46:52 +0000
commitc5919d0a9d8ff56f763bcbbfd033d2c331f7b773 (patch)
tree299a5dc75e4ad2b44e2a9e77a34726e0647e5f07
parentc70f1a8aee056819682001ebd481040d0e99386a (diff)
InflatedSmartRepliesTest: Mark PendingIntents with FLAG_MUTABLE
Added FLAG_MUTABLE as these are direct reply related See go/immutable-pendingintents for more context. Bug: 160794467 Test: TH Change-Id: Ic3e9c567f27788424b71030b742cca45776d47ab
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/InflatedSmartRepliesTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/InflatedSmartRepliesTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/InflatedSmartRepliesTest.java
index 8ee15bb36834..32675c92d3f9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/InflatedSmartRepliesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/InflatedSmartRepliesTest.java
@@ -425,7 +425,8 @@ public class InflatedSmartRepliesTest extends SysuiTestCase {
private void setupAppGeneratedReplies(
CharSequence[] smartReplies, boolean allowSystemGeneratedReplies) {
PendingIntent pendingIntent =
- PendingIntent.getBroadcast(mContext, 0, TEST_INTENT, 0);
+ PendingIntent.getBroadcast(mContext, 0, TEST_INTENT,
+ PendingIntent.FLAG_MUTABLE);
Notification.Action action =
new Notification.Action.Builder(null, "Test Action", pendingIntent).build();
when(mRemoteInput.getChoices()).thenReturn(smartReplies);
@@ -456,7 +457,8 @@ public class InflatedSmartRepliesTest extends SysuiTestCase {
}
private Notification.Action.Builder createActionBuilder(String actionTitle, Intent intent) {
- PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+ PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, intent,
+ PendingIntent.FLAG_MUTABLE);
return new Notification.Action.Builder(mActionIcon, actionTitle, pendingIntent);
}