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

Commit 9cbb4fa4 authored by Mill Chen's avatar Mill Chen
Browse files

Specify explicitly FLAG_IMMUTABLE for PendingIntent

The existing pending intent in the BatteryTipUtils has been specified
FLAG_UPDATE_CURRENT. This change is to add explicitly FLAG_IMMUTABLE
to the pending intent.

Fixes: 171506726
Test: build pass, robotest
Change-Id: Ib82ddb45e05b492eef300f2ec064803d768419d0
parent 0254a6c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ public class BatteryTipUtils {
            throws StatsManager.StatsUnavailableException {
        final Intent extraIntent = new Intent(context, AnomalyDetectionReceiver.class);
        final PendingIntent pendingIntent = PendingIntent.getBroadcast(context, REQUEST_CODE,
                extraIntent, PendingIntent.FLAG_UPDATE_CURRENT);
                extraIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
        statsManager.setBroadcastSubscriber(pendingIntent,
                StatsManagerConfig.ANOMALY_CONFIG_KEY, StatsManagerConfig.SUBSCRIBER_ID);
    }