NotificationIntrusivenessExtractorTest: 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: I617427beb57b10f5bee64ec82399cbacef7ea1ec
This commit is contained in:
Ashwini Oruganti
2020-12-05 21:59:10 -08:00
parent 24e5b93cc2
commit 584801ee8c

View File

@@ -58,8 +58,11 @@ public class NotificationIntrusivenessExtractorTest extends UiServiceTestCase {
NotificationChannel channel = new NotificationChannel("a", "a", IMPORTANCE_DEFAULT);
final Notification.Builder builder = new Notification.Builder(getContext())
.setContentTitle("foo")
// TODO(b/174258141) Please replace FLAG_MUTABLE_UNAUDITED below
// with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
.setFullScreenIntent(PendingIntent.getActivity(
getContext(), 0, new Intent(""), 0), true)
getContext(), 0, new Intent(""), PendingIntent.FLAG_MUTABLE_UNAUDITED),
true)
.setSmallIcon(android.R.drawable.sym_def_app_icon);
Notification n = builder.build();
@@ -76,8 +79,11 @@ public class NotificationIntrusivenessExtractorTest extends UiServiceTestCase {
NotificationChannel channel = new NotificationChannel("a", "a", IMPORTANCE_DEFAULT);
final Notification.Builder builder = new Notification.Builder(getContext())
.setContentTitle("foo")
// TODO(b/174258141) Please replace FLAG_MUTABLE_UNAUDITED below
// with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE.
.setFullScreenIntent(PendingIntent.getActivity(
getContext(), 0, new Intent(""), 0), true)
getContext(), 0, new Intent(""), PendingIntent.FLAG_MUTABLE_UNAUDITED),
true)
.setSmallIcon(android.R.drawable.sym_def_app_icon);
Notification n = builder.build();