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

Commit d2ca973d authored by Ray Kuo's avatar Ray Kuo
Browse files

SAP: Mark the PendingIntents with FLAG_IMMUTABLE

Bug: 178354484
Tag: #stability
Test: atest BluetoothInstrumentationTests
Change-Id: I64f6985c6f77dd5406cda14e09b36484c1f38b1c
parent 86e190a6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -730,7 +730,8 @@ public class SapService extends ProfileService {
        cancelUserTimeoutAlarm();
        mRemoveTimeoutMsg = true;
        Intent timeoutIntent = new Intent(USER_CONFIRM_TIMEOUT_ACTION);
        PendingIntent pIntent = PendingIntent.getBroadcast(this, 0, timeoutIntent, 0);
        PendingIntent pIntent = PendingIntent.getBroadcast(this, 0, timeoutIntent,
                PendingIntent.FLAG_IMMUTABLE);
        mAlarmManager.set(AlarmManager.RTC_WAKEUP,
                System.currentTimeMillis() + USER_CONFIRM_TIMEOUT_VALUE, pIntent);
    }
@@ -744,7 +745,8 @@ public class SapService extends ProfileService {
        }
        if (mRemoveTimeoutMsg) {
            Intent timeoutIntent = new Intent(USER_CONFIRM_TIMEOUT_ACTION);
            PendingIntent sender = PendingIntent.getBroadcast(this, 0, timeoutIntent, 0);
            PendingIntent sender = PendingIntent.getBroadcast(this, 0, timeoutIntent,
                    PendingIntent.FLAG_IMMUTABLE);
            mAlarmManager.cancel(sender);
            mRemoveTimeoutMsg = false;
        }