Add the explicitly mutable flag for creating a PendingIntent
- Android S+ to specify explicitly either FLAG_MUTABLE or FLAG_IMMUTABLE when creating a PendingIntent. - Suggest to use the FLAG_IMMUTABLE as default. Change it to FLAG_MUTABLE while errors occur. Fixes: 170162598 Fixes: 170162878 Fixes: 170163592 Fixes: 170164316 Fixes: 170164458 Fixes: 170164327 Fixes: 169794524 Fixes: 170165106 Test: build pass, manual test add an account and volume control panel Change-Id: I5aec028f82bd74fc4530b95a7c144811055ae2c5
This commit is contained in:
@@ -95,7 +95,7 @@ public interface CustomSliceable extends Sliceable {
|
||||
.setData(getUri())
|
||||
.setClass(context, SliceBroadcastReceiver.class);
|
||||
return PendingIntent.getBroadcast(context, 0 /* requestCode */, intent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user