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

Commit 4a51385f authored by Ashwini Oruganti's avatar Ashwini Oruganti
Browse files

Apply FLAG_IMMUTABLE to the PendingIntent in NetworkStatService.java

Broadcast intents sent by AlarmManager are immutable; the system
dispatches them without customization.

Fixes: 171815343
Test: TH
Change-Id: I35ccfc0f69fd98b5803da74d9eb12902b351acc7
Merged-In: I35ccfc0f69fd98b5803da74d9eb12902b351acc7
parent 56804f05
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -552,7 +552,8 @@ public class NetworkStatsService extends INetworkStatsService.Stub {

        //  schedule periodic pall alarm based on {@link NetworkStatsSettings#getPollInterval()}.
        final PendingIntent pollIntent =
                PendingIntent.getBroadcast(mContext, 0, new Intent(ACTION_NETWORK_STATS_POLL), 0);
                PendingIntent.getBroadcast(mContext, 0, new Intent(ACTION_NETWORK_STATS_POLL),
                        PendingIntent.FLAG_IMMUTABLE);

        final long currentRealtime = SystemClock.elapsedRealtime();
        mAlarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, currentRealtime,