summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steve Elliott <steell@google.com> 2020-08-03 13:45:44 -0400
committer Steve Elliott <steell@google.com> 2020-08-04 20:22:46 +0000
commit599c3e4b75a638a725de1c96bab762cdaae9eb22 (patch)
tree9fbb7e03422923139a9e3861e0a37092a1cb3f3b
parent8416431f375ddede4861104df6c8b5f9c3c8db9b (diff)
Mark implicit PendingIntents as immutable
Bug: 156020795 Test: manual, atest Change-Id: I72206c7a52b067b77d6542d170a6483713dfeee7 (cherry picked from commit 84e08280d3882cfe4bad12ab426016c6d0efc7fb)
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
index b25df5f9c07f..5e7280840bb9 100644
--- a/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
@@ -104,9 +104,13 @@ public class LeakReporter {
.setContentText(String.format(
"SystemUI has detected %d leaked objects. Tap to send", garbageCount))
.setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
- .setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
+ .setContentIntent(PendingIntent.getActivityAsUser(
+ mContext,
+ 0,
getIntent(hprofFile, dumpFile),
- PendingIntent.FLAG_UPDATE_CURRENT, null, UserHandle.CURRENT));
+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE,
+ null,
+ UserHandle.CURRENT));
notiMan.notify(TAG, 0, builder.build());
} catch (IOException e) {
Log.e(TAG, "Couldn't dump heap for leak", e);