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

Commit 467ae5ff authored by Mill Chen's avatar Mill Chen
Browse files

Revert "Revert "Specify explicitly FLAG_IMMUTABLE for PendingIntent""

This reverts commit 13ebec46.

Reason for revert: To fix the NPE issue

Specify explicitly FLAG_MUTABLE for PendingIntent

This change is to specify explicitly FLAG_MUTABLE to the pendingIntent
since this intent is working with inline reply.

Bug: 172894032
Test: manual test
Change-Id: I5fdcf175307cec5e0e96b33d711221be839e1357
parent 8bf60127
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_MUTABLE);
        statsManager.setBroadcastSubscriber(pendingIntent,
                StatsManagerConfig.ANOMALY_CONFIG_KEY, StatsManagerConfig.SUBSCRIBER_ID);
    }