NotificationEntryTest: Mark unaudited PendingIntents with FLAG_MUTABLE_UNAUDITED

These PIs need an explicit mutability flag. This temporay flag is being
used to mark these points in code and should be replaced ASAP.
See go/immutable-pendingintents for more context.

Bug: 160794467
Test: TH
Exempt-From-Owner-Approval: noop change
Change-Id: I7325954fb3396af0d2aa8ee021d9ab6e95f18afa
This commit is contained in:
Ashwini Oruganti
2020-12-06 20:42:00 -08:00
parent f2b1d84060
commit e26a2fb313

View File

@@ -233,7 +233,10 @@ public class NotificationEntryTest extends SysuiTestCase {
return new Notification.Action.Builder(
Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon),
title,
PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"), 0))
// TODO(b/174965424) Please replace FLAG_MUTABLE_UNAUDITED below
// with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"),
PendingIntent.FLAG_MUTABLE_UNAUDITED))
.setContextual(true)
.build();
}
@@ -242,7 +245,10 @@ public class NotificationEntryTest extends SysuiTestCase {
return new Notification.Action.Builder(
Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon),
title,
PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"), 0)).build();
// TODO(b/174965424) Please replace FLAG_MUTABLE_UNAUDITED below
// with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"),
PendingIntent.FLAG_MUTABLE_UNAUDITED)).build();
}
private ArrayList<Notification.Action> createActions(String... titles) {