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

Commit 17222327 authored by Shuo Qian's avatar Shuo Qian
Browse files

Use FLAG_IMMUTABLE for CarrierServiceStateTracker

Require that the PendingIntent be immutable so that a malicious app is
 not able to hijack and mutate any of the details.

Test: Android builds
Bug: 155094269
Change-Id: Iea9ec6451170e592dc72c035d6eec7b80150ddd4
parent 1660de58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -431,7 +431,7 @@ public class CarrierServiceStateTracker extends Handler {
            Intent notificationIntent = new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
            notificationIntent.putExtra("expandable", true);
            PendingIntent settingsIntent = PendingIntent.getActivity(context, 0, notificationIntent,
                    PendingIntent.FLAG_ONE_SHOT);
                    PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
            Resources res = SubscriptionManager.getResourcesForSubId(context, mPhone.getSubId());
            CharSequence title = res.getText(
                    com.android.internal.R.string.NetworkPreferenceSwitchTitle);