diff options
author | Wally Yau <wyau@google.com> | 2021-07-09 14:08:08 -0700 |
---|---|---|
committer | Wally Yau <wyau@google.com> | 2021-07-09 14:08:08 -0700 |
commit | 4762f2737481c309961908d9aac9eded7dbe085c (patch) | |
tree | b19b4193e282d9f4ae02b0990873cecb9e40f84a | |
parent | 18ae36961de34d616bb6ca74d12e1c6b7cf183d8 (diff) | |
download | TV-android-s-beta-4.tar.gz |
Add FLAG_IMMUTABLE to implicit PendingIntentandroid-s-beta-4android-s-beta-3android-s-beta-4
Use FLAG_IMMUTABLE to create the implict PendingIntent
as a remediation for Implict PendingIntent vulnerablity.
Bug: 156011951
Test: Manual
Change-Id: I6a477fa8363e4904ac7d2dfb4adae81e76065154
-rw-r--r-- | src/com/android/tv/recommendation/NotificationService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/tv/recommendation/NotificationService.java b/src/com/android/tv/recommendation/NotificationService.java index 1652bd77..870b3c10 100644 --- a/src/com/android/tv/recommendation/NotificationService.java +++ b/src/com/android/tv/recommendation/NotificationService.java @@ -437,7 +437,8 @@ public class NotificationService extends Service Intent intent = new Intent(Intent.ACTION_VIEW, channel.getUri()); intent.putExtra(TUNE_PARAMS_RECOMMENDATION_TYPE, mRecommendationType); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); - final PendingIntent notificationIntent = PendingIntent.getActivity(this, 0, intent, 0); + final PendingIntent notificationIntent = PendingIntent.getActivity(this, 0, intent, + PendingIntent.FLAG_IMMUTABLE); // This callback will run on the main thread. Bitmap largeIconBitmap = |