Merge "Revert "Revert "Specify explicitly FLAG_IMMUTABLE for PendingIntent"""

This commit is contained in:
TreeHugger Robot
2020-11-21 03:27:14 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
}