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

Commit ef401b8e authored by Shuo Qian's avatar Shuo Qian Committed by syphyr
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
(cherry picked from commit 89763569)
parent 61825889
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ public class CarrierServiceStateTracker extends Handler {

        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);