Add a mutability flag to the PendingIntent
- Request from Android Platform Security team. go/immutable-pendingintents Bug: 170162129 Test: 1. adb shell am start -a android.settings.panel.action.INTERNET_CONNECTIVITY 2. make RunSettingsRoboTests ROBOTEST_FILTER=WifiSliceTest Change-Id: If3032959649206f2fb6736244d7aa8b9a8419378
This commit is contained in:
@@ -224,7 +224,7 @@ public class WifiSlice implements CustomSliceable {
|
||||
private SliceAction getActivityAction(int requestCode, Intent intent, IconCompat icon,
|
||||
CharSequence title) {
|
||||
final PendingIntent pi = PendingIntent.getActivity(mContext, requestCode, intent,
|
||||
0 /* flags */);
|
||||
PendingIntent.FLAG_IMMUTABLE /* flags */);
|
||||
return SliceAction.createDeeplink(pi, icon, ListBuilder.ICON_IMAGE, title);
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ public class WifiSlice implements CustomSliceable {
|
||||
private PendingIntent getPrimaryAction() {
|
||||
final Intent intent = getIntent();
|
||||
return PendingIntent.getActivity(mContext, 0 /* requestCode */,
|
||||
intent, 0 /* flags */);
|
||||
intent, PendingIntent.FLAG_IMMUTABLE /* flags */);
|
||||
}
|
||||
|
||||
private Set<String> getKeywords() {
|
||||
|
Reference in New Issue
Block a user