From 9ed295d0ef4d789ec6724d3f4547abbd9eda2d04 Mon Sep 17 00:00:00 2001 From: Matt Pietal Date: Fri, 6 Nov 2020 08:56:26 -0500 Subject: [PATCH] Make pendingintent use immutable flag It will be required for S+ that every PendingIntent be declared mutable or immutable. Fixes: 170157567 Test: manual Change-Id: I0abe399ec41371105a9613bebb82943958e918d7 --- .../src/com/android/systemui/keyguard/KeyguardViewMediator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 2705f07069bf1..4c68312b93785 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -1007,7 +1007,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { intent.putExtra("seq", mDelayedShowingSequence); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); PendingIntent sender = PendingIntent.getBroadcast(mContext, - 0, intent, PendingIntent.FLAG_CANCEL_CURRENT); + 0, intent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, when, sender); if (DEBUG) Log.d(TAG, "setting alarm to turn off keyguard, seq = " + mDelayedShowingSequence);