Merge "Make implicit mutable PendingIntents immutable"
This commit is contained in:
committed by
Android (Google) Code Review
commit
517faf91ff
@@ -312,7 +312,7 @@ public abstract class RemoteDisplayProvider {
|
||||
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
|
||||
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
mSettingsPendingIntent = PendingIntent.getActivity(
|
||||
mContext, 0, settingsIntent, PendingIntent.FLAG_MUTABLE_UNAUDITED, null);
|
||||
mContext, 0, settingsIntent, PendingIntent.FLAG_IMMUTABLE, null);
|
||||
}
|
||||
return mSettingsPendingIntent;
|
||||
}
|
||||
|
||||
@@ -540,16 +540,16 @@ public class NotificationShellCmd extends ShellCommand {
|
||||
if ("broadcast".equals(intentKind)) {
|
||||
pi = PendingIntent.getBroadcastAsUser(
|
||||
context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT
|
||||
| PendingIntent.FLAG_MUTABLE_UNAUDITED,
|
||||
| PendingIntent.FLAG_IMMUTABLE,
|
||||
UserHandle.CURRENT);
|
||||
} else if ("service".equals(intentKind)) {
|
||||
pi = PendingIntent.getService(
|
||||
context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT
|
||||
| PendingIntent.FLAG_MUTABLE_UNAUDITED);
|
||||
| PendingIntent.FLAG_IMMUTABLE);
|
||||
} else {
|
||||
pi = PendingIntent.getActivityAsUser(
|
||||
context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT
|
||||
| PendingIntent.FLAG_MUTABLE_UNAUDITED, null,
|
||||
| PendingIntent.FLAG_IMMUTABLE, null,
|
||||
UserHandle.CURRENT);
|
||||
}
|
||||
builder.setContentIntent(pi);
|
||||
|
||||
@@ -1156,12 +1156,12 @@ public class NotificationTestList extends TestActivity
|
||||
private PendingIntent makeIntent() {
|
||||
Intent intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.addCategory(Intent.CATEGORY_HOME);
|
||||
return PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED);
|
||||
return PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}
|
||||
|
||||
private PendingIntent makeIntent2() {
|
||||
Intent intent = new Intent(this, StatusBarTest.class);
|
||||
return PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED);
|
||||
return PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_IMMUTABLE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user