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

Commit d6c5e01e authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Add IMMUTABLE flags to PendingIntent

Bug: 171814397
Test: presubmit tests passing
Change-Id: I84b36ed731dc57a9a053eb1854e501ce491f0e2c
parent 741546db
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -583,8 +583,10 @@ public class GnssLocationProvider extends AbstractLocationProvider implements
        mDownloadPsdsWakeLock.setReferenceCounted(true);

        mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
        mWakeupIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_WAKEUP), 0);
        mTimeoutIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_TIMEOUT), 0);
        mWakeupIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_WAKEUP),
                PendingIntent.FLAG_IMMUTABLE);
        mTimeoutIntent = PendingIntent.getBroadcast(mContext, 0, new Intent(ALARM_TIMEOUT),
                PendingIntent.FLAG_IMMUTABLE);

        // App ops service to keep track of who is accessing the GPS
        mAppOps = mContext.getSystemService(AppOpsManager.class);