summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Elliott <steell@google.com>2020-08-03 13:45:44 -0400
committerAnis Assi <anisassi@google.com>2020-08-06 17:13:05 -0700
commit8681f659527298643ed5d86d37bce9115d63ff33 (patch)
treee8ae98a17f87c3e0e486a37466816f6308c94ec5
parent5b006272068aa76a1b8635ef4394396f317495a4 (diff)
downloadbase-8681f659527298643ed5d86d37bce9115d63ff33.tar.gz
Mark implicit PendingIntents as immutableandroid-8.0.0_r51
Bug: 156020795 Test: manual, atest Change-Id: I72206c7a52b067b77d6542d170a6483713dfeee7 (cherry picked from commit 84e08280d3882cfe4bad12ab426016c6d0efc7fb) (cherry picked from commit 504e7d848d5e5f3e5279a5088bcf7c8818871514)
-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 a247f3fe15dd..4260bfb7c59e 100644
--- a/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java
@@ -93,9 +93,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);