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

Commit 89763569 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
Merged-In: Iea9ec6451170e592dc72c035d6eec7b80150ddd4
parent 3555e5d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ public class CarrierServiceStateTracker extends Handler {
            Context context = mPhone.getContext();
            Intent notificationIntent = new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
            PendingIntent settingsIntent = PendingIntent.getActivity(context, 0, notificationIntent,
                    PendingIntent.FLAG_ONE_SHOT);
                    PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
            CharSequence title = context.getText(
                    com.android.internal.R.string.NetworkPreferenceSwitchTitle);
            CharSequence details = context.getText(