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

Commit 68d747e6 authored by Shuo Qian's avatar Shuo Qian Committed by Anis Assi
Browse files

Use FLAG_IMMUTABLE for InboundSmsHandler

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: Idc684438d2cd622adee9a1c4d1801e308ee5ead7
Merged-In: Idc684438d2cd622adee9a1c4d1801e308ee5ead7
(cherry picked from commit 4893d5c4)
parent 12cbf020
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1005,7 +1005,7 @@ public abstract class InboundSmsHandler extends StateMachine {
            mContext,
            0,
            new Intent(ACTION_OPEN_SMS_APP),
            PendingIntent.FLAG_ONE_SHOT);
                PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
        Notification.Builder mBuilder = new Notification.Builder(mContext)
                .setSmallIcon(com.android.internal.R.drawable.sym_action_chat)
                .setAutoCancel(true)