diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java index b0e17cdab8e4f..5fc01ccd96b4d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java @@ -629,10 +629,8 @@ public class NotificationEntryManagerTest extends SysuiTestCase { return new Notification.Action.Builder( Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon), "action", - // TODO(b/174935104) 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(); + PendingIntent.FLAG_IMMUTABLE)).build(); } private static class FakeNotificationLifetimeExtender implements NotificationLifetimeExtender { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotificationEntryTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotificationEntryTest.java index 01b3d8e787e69..241451edf698a 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotificationEntryTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/NotificationEntryTest.java @@ -233,10 +233,8 @@ public class NotificationEntryTest extends SysuiTestCase { return new Notification.Action.Builder( Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon), title, - // 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)) + PendingIntent.FLAG_IMMUTABLE)) .setContextual(true) .build(); } @@ -245,10 +243,8 @@ public class NotificationEntryTest extends SysuiTestCase { return new Notification.Action.Builder( Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon), title, - // 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(); + PendingIntent.FLAG_IMMUTABLE)).build(); } private ArrayList createActions(String... titles) { diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java index d606316f16edf..60c3bc8742355 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java @@ -476,10 +476,8 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase { private NotificationEntry createBubble() { Notification.BubbleMetadata data = new Notification.BubbleMetadata.Builder( - // TODO(b/174970399) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent.getActivity(mContext, 0, new Intent(), - PendingIntent.FLAG_MUTABLE_UNAUDITED), + PendingIntent.FLAG_MUTABLE), Icon.createWithResource(mContext.getResources(), R.drawable.android)) .build(); Notification n = new Notification.Builder(getContext(), "a") diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java index 1387a63d449f7..291b223d72bb5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java @@ -213,11 +213,9 @@ public class NotificationConversationInfoTest extends SysuiTestCase { notification, UserHandle.CURRENT, null, 0); mEntry = new NotificationEntryBuilder().setSbn(mSbn).setShortcutInfo(mShortcutInfo).build(); - // TODO(b/175005650) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, new Intent(mContext, BubblesTestActivity.class), - PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_MUTABLE); mBubbleSbn = new SbnBuilder(mSbn).setBubbleMetadata( new Notification.BubbleMetadata.Builder(bubbleIntent, Icon.createWithResource(mContext, R.drawable.android)).build()) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java index 43ba844bdef36..6fcc7fa9376ca 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java @@ -455,10 +455,8 @@ public class NotificationTestHelper { private BubbleMetadata makeBubbleMetadata(PendingIntent deleteIntent) { Intent target = new Intent(mContext, BubblesTestActivity.class); - // TODO(b/175014468) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent bubbleIntent = PendingIntent.getActivity(mContext, 0, target, - PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_MUTABLE); return new BubbleMetadata.Builder(bubbleIntent, Icon.createWithResource(mContext, R.drawable.android)) diff --git a/services/core/java/com/android/server/notification/NotificationHistoryDatabase.java b/services/core/java/com/android/server/notification/NotificationHistoryDatabase.java index c1deb965b054d..b9984a5c24eea 100644 --- a/services/core/java/com/android/server/notification/NotificationHistoryDatabase.java +++ b/services/core/java/com/android/server/notification/NotificationHistoryDatabase.java @@ -293,9 +293,7 @@ public class NotificationHistoryDatabase { .appendPath(file.getAbsolutePath()).build()) .addFlags(Intent.FLAG_RECEIVER_FOREGROUND) .putExtra(EXTRA_KEY, file.getAbsolutePath()), - // TODO(b/174161800) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. - PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, deletionTime, pi); } diff --git a/services/core/java/com/android/server/notification/SnoozeHelper.java b/services/core/java/com/android/server/notification/SnoozeHelper.java index 3e197fb783467..f078242a659ff 100644 --- a/services/core/java/com/android/server/notification/SnoozeHelper.java +++ b/services/core/java/com/android/server/notification/SnoozeHelper.java @@ -462,8 +462,6 @@ public class SnoozeHelper { } private PendingIntent createPendingIntent(String pkg, String key, int userId) { - // TODO(b/174969959) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. return PendingIntent.getBroadcast(mContext, REQUEST_CODE_REPOST, new Intent(REPOST_ACTION) @@ -471,7 +469,7 @@ public class SnoozeHelper { .addFlags(Intent.FLAG_RECEIVER_FOREGROUND) .putExtra(EXTRA_KEY, key) .putExtra(EXTRA_USER_ID, userId), - PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); } public void scheduleRepostsForPersistedNotifications(long currentTime) { diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAdjustmentExtractorTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAdjustmentExtractorTest.java index 824c05e4ae47e..18ca09be235c5 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationAdjustmentExtractorTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationAdjustmentExtractorTest.java @@ -127,6 +127,6 @@ public class NotificationAdjustmentExtractorTest extends UiServiceTestCase { Icon.createWithResource(getContext(), android.R.drawable.sym_def_app_icon), "action", PendingIntent.getBroadcast(getContext(), 0, new Intent("Action"), - PendingIntent.FLAG_MUTABLE_UNAUDITED)).build(); + PendingIntent.FLAG_IMMUTABLE)).build(); } } diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationIntrusivenessExtractorTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationIntrusivenessExtractorTest.java index a9a3b2b0ed22d..ac9a77bc5cb77 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationIntrusivenessExtractorTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationIntrusivenessExtractorTest.java @@ -58,10 +58,8 @@ 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(""), PendingIntent.FLAG_MUTABLE_UNAUDITED), + getContext(), 0, new Intent(""), PendingIntent.FLAG_IMMUTABLE), true) .setSmallIcon(android.R.drawable.sym_def_app_icon); @@ -79,10 +77,8 @@ 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(""), PendingIntent.FLAG_MUTABLE_UNAUDITED), + getContext(), 0, new Intent(""), PendingIntent.FLAG_IMMUTABLE), true) .setSmallIcon(android.R.drawable.sym_def_app_icon); diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationListenerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationListenerServiceTest.java index c63470617288a..be489c3bcd12b 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationListenerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationListenerServiceTest.java @@ -357,13 +357,11 @@ public class NotificationListenerServiceTest extends UiServiceTestCase { private ArrayList getSmartActions(String key, int index) { ArrayList actions = new ArrayList<>(); for (int i = 0; i < index; i++) { - // TODO(b/174935955) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent intent = PendingIntent.getBroadcast( getContext(), index /*requestCode*/, new Intent("ACTION_" + key), - PendingIntent.FLAG_MUTABLE_UNAUDITED /*flags*/); + PendingIntent.FLAG_IMMUTABLE /*flags*/); actions.add(new Notification.Action.Builder(null /*icon*/, key, intent).build()); } return actions; diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java index 849477c924bbc..751c203664d5a 100755 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java @@ -790,10 +790,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { .setName("bubblebot") .build(); RemoteInput remoteInput = new RemoteInput.Builder("reply_key").setLabel("reply").build(); - // TODO(b/174965245) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent inputIntent = PendingIntent.getActivity(mContext, 0, new Intent(), - PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_MUTABLE); Icon icon = Icon.createWithResource(mContext, android.R.drawable.sym_def_app_icon); Notification.Action replyAction = new Notification.Action.Builder(icon, "Reply", inputIntent).addRemoteInput(remoteInput) @@ -7369,10 +7367,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { NotificationRecord r = generateNotificationRecord(mTestNotificationChannel); ArrayList extraAction = new ArrayList<>(); RemoteInput remoteInput = new RemoteInput.Builder("reply_key").setLabel("reply").build(); - // TODO(b/174965245) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent inputIntent = PendingIntent.getActivity(mContext, 0, new Intent(), - PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_IMMUTABLE); Icon icon = Icon.createWithResource(mContext, android.R.drawable.sym_def_app_icon); Notification.Action replyAction = new Notification.Action.Builder(icon, "Reply", inputIntent).addRemoteInput(remoteInput) @@ -7402,10 +7398,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { NotificationRecord r = generateNotificationRecord(mTestNotificationChannel); ArrayList extraAction = new ArrayList<>(); RemoteInput remoteInput = new RemoteInput.Builder("reply_key").setLabel("reply").build(); - // TODO(b/174965245) Please replace FLAG_MUTABLE_UNAUDITED below - // with either FLAG_IMMUTABLE (recommended) or FLAG_MUTABLE. PendingIntent inputIntent = PendingIntent.getActivity(mContext, 0, new Intent(), - PendingIntent.FLAG_MUTABLE_UNAUDITED); + PendingIntent.FLAG_MUTABLE); Icon icon = Icon.createWithResource(mContext, android.R.drawable.sym_def_app_icon); Notification.Action replyAction = new Notification.Action.Builder(icon, "Reply", inputIntent).addRemoteInput(remoteInput)