Merge "Add the explicitly mutable flag for creating a PendingIntent"

This commit is contained in:
TreeHugger Robot
2020-10-14 10:48:24 +00:00
committed by Android (Google) Code Review
8 changed files with 16 additions and 12 deletions

View File

@@ -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) {

View File

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