Merge "Add the explicitly mutable flag for creating a PendingIntent"
This commit is contained in:
committed by
Android (Google) Code Review
commit
3ed34cd538
@@ -163,7 +163,8 @@ public class BatteryFixSlice implements CustomSliceable {
|
||||
|
||||
private PendingIntent getPrimaryAction() {
|
||||
final Intent intent = getIntent();
|
||||
return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent, 0 /* flags */);
|
||||
return PendingIntent.getActivity(mContext, 0 /* requestCode */, intent,
|
||||
PendingIntent.FLAG_IMMUTABLE);
|
||||
}
|
||||
|
||||
private Slice buildBatteryGoodSlice(ListBuilder sliceBuilder, boolean isError) {
|
||||
|
@@ -116,8 +116,8 @@ public class LowStorageSlice implements CustomSliceable {
|
||||
|
||||
private RowBuilder buildRowBuilder(CharSequence title, String summary, IconCompat icon) {
|
||||
final SliceAction primarySliceAction = SliceAction.createDeeplink(
|
||||
PendingIntent.getActivity(mContext, 0, getIntent(), 0), icon,
|
||||
ListBuilder.ICON_IMAGE, title);
|
||||
PendingIntent.getActivity(mContext, 0, getIntent(), PendingIntent.FLAG_IMMUTABLE),
|
||||
icon, ListBuilder.ICON_IMAGE, title);
|
||||
|
||||
return new RowBuilder()
|
||||
.setTitleItem(icon, ListBuilder.ICON_IMAGE)
|
||||
|
Reference in New Issue
Block a user