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

Commit 72f2c8f3 authored by Shuo Qian's avatar Shuo Qian
Browse files

Use FLAG_IMMUTABLE for InstallCarrierAppUtils

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: I8ac155bf53e33474e1fcdb2466743a1e05b92399
Merged-In: I8ac155bf53e33474e1fcdb2466743a1e05b92399
parent 1293973a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -68,7 +68,8 @@ public class InstallCarrierAppUtils {
                Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT, 1) == 1;

        PendingIntent goToStore = PendingIntent.getActivity(context, 0,
                getPlayStoreIntent(pkgName), PendingIntent.FLAG_UPDATE_CURRENT);
                getPlayStoreIntent(pkgName), PendingIntent.FLAG_UPDATE_CURRENT
                        | PendingIntent.FLAG_IMMUTABLE);

        Notification.Action goToStoreAction =
                new Notification.Action.Builder(null, downloadButtonText, goToStore).build();