Merge "Use PendingIntent.FLAG_IMMUTABLE in PendingIntent in NotificationMgr" into qt-dev am: 59d0840be9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telephony/+/11256276
Change-Id: I2b653f91d6046c7b737f4cc393db49ab0ae44984
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index 27749e4..78ed15f 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -358,7 +358,8 @@
}
PendingIntent pendingIntent =
- PendingIntent.getActivity(mContext, subId /* requestCode */, intent, 0);
+ PendingIntent.getActivity(mContext, subId /* requestCode */, intent,
+ PendingIntent.FLAG_IMMUTABLE);
Resources res = mContext.getResources();
PersistableBundle carrierConfig = PhoneGlobals.getInstance().getCarrierConfigForSubId(
@@ -547,7 +548,7 @@
SubscriptionInfoHelper.addExtrasToIntent(
intent, mSubscriptionManager.getActiveSubscriptionInfo(subId));
builder.setContentIntent(PendingIntent.getActivity(mContext, subId /* requestCode */,
- intent, 0));
+ intent, PendingIntent.FLAG_IMMUTABLE));
mNotificationManager.notifyAsUser(
Integer.toString(subId) /* tag */,
CALL_FORWARD_NOTIFICATION,
@@ -590,7 +591,8 @@
// "Mobile network settings" screen / dialog
Intent intent = new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
intent.putExtra(Settings.EXTRA_SUB_ID, subId);
- PendingIntent contentIntent = PendingIntent.getActivity(mContext, subId, intent, 0);
+ PendingIntent contentIntent = PendingIntent.getActivity(
+ mContext, subId, intent, PendingIntent.FLAG_IMMUTABLE);
CharSequence contentTitle = mContext.getText(roamingOn
? R.string.roaming_on_notification_title
@@ -738,7 +740,8 @@
mContext.getString(R.string.mobile_network_settings_package),
mContext.getString(R.string.mobile_network_settings_class)));
intent.putExtra(GsmUmtsOptions.EXTRA_SUB_ID, subId);
- builder.setContentIntent(PendingIntent.getActivity(mContext, 0, intent, 0));
+ builder.setContentIntent(PendingIntent.getActivity(
+ mContext, 0, intent, PendingIntent.FLAG_IMMUTABLE));
mNotificationManager.notifyAsUser(
Integer.toString(subId) /* tag */,
SELECTED_OPERATOR_FAIL_NOTIFICATION,