summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Gavin Corkery <gavincorkery@google.com> 2020-10-20 10:00:11 +0100
committer Gavin Corkery <gavincorkery@google.com> 2021-02-24 23:01:05 +0000
commit281d15024512f35659bd8423be0cb38de4bf233d (patch)
tree03881b4a64eb774ff8031ee4a0c1f9194b83cee3
parentf244f0444cd235391069b73d61bc031ae83699ee (diff)
Add immutability flag to PendingIntents
Explicitly set FLAG_IMMUTABLE for all PendingIntents in BugreportProgressService. Test: Builds Bug: 170165227 Bug: 171830604 Bug: 178803845 Change-Id: Iae1489b9c8fa323448e60615e99ad96aee1cd1d7 Merged-In: Iae1489b9c8fa323448e60615e99ad96aee1cd1d7 (cherry picked from commit 2d38f6e4f04953a07f80984b50d3efefa64cb374)
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 7b4cf0f748d3..88112e3f5cc8 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -803,7 +803,7 @@ public class BugreportProgressService extends Service {
intent.setClass(context, BugreportProgressService.class);
intent.putExtra(EXTRA_ID, info.id);
return PendingIntent.getService(context, info.id, intent,
- PendingIntent.FLAG_UPDATE_CURRENT);
+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
}
/**
@@ -1263,7 +1263,7 @@ public class BugreportProgressService extends Service {
.setTicker(title)
.setContentText(content)
.setContentIntent(PendingIntent.getService(mContext, info.id, shareIntent,
- PendingIntent.FLAG_UPDATE_CURRENT))
+ PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE))
.setOnlyAlertOnce(false)
.setDeleteIntent(newCancelIntent(mContext, info));