Skip to content

Commit dff3dea

Browse files
Steve Elliottanisassigoogle
authored andcommitted
Mark implicit PendingIntents as immutable
Bug: 156020795 Test: manual, atest Change-Id: I72206c7a52b067b77d6542d170a6483713dfeee7 (cherry picked from commit 84e08280d3882cfe4bad12ab426016c6d0efc7fb) (cherry picked from commit 599c3e4b75a638a725de1c96bab762cdaae9eb22)
1 parent 8b04d00 commit dff3dea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/SystemUI/src/com/android/systemui/util/leak/LeakReporter.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ public void dumpLeak(int garbageCount) {
104104
.setContentText(String.format(
105105
"SystemUI has detected %d leaked objects. Tap to send", garbageCount))
106106
.setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
107-
.setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
107+
.setContentIntent(PendingIntent.getActivityAsUser(
108+
mContext,
109+
0,
108110
getIntent(hprofFile, dumpFile),
109-
PendingIntent.FLAG_UPDATE_CURRENT, null, UserHandle.CURRENT));
111+
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE,
112+
null,
113+
UserHandle.CURRENT));
110114
notiMan.notify(TAG, 0, builder.build());
111115
} catch (IOException e) {
112116
Log.e(TAG, "Couldn't dump heap for leak", e);

0 commit comments

Comments
 (0)