Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dff3deab authored by Steve Elliott's avatar Steve Elliott Committed by Anis Assi
Browse files

Mark implicit PendingIntents as immutable

Bug: 156020795
Test: manual, atest
Change-Id: I72206c7a52b067b77d6542d170a6483713dfeee7
(cherry picked from commit 84e08280)
(cherry picked from commit 599c3e4b)
parent 8b04d000
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);