Loading services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -9162,7 +9162,7 @@ public class NotificationManagerService extends SystemService { return false; } if (Flags.rejectOldNotifications() && n.hasAppProvidedWhen() && n.getWhen() > 0 if (n.hasAppProvidedWhen() && n.getWhen() > 0 && (System.currentTimeMillis() - n.getWhen()) > NOTIFICATION_MAX_AGE_AT_POST) { Slog.d(TAG, "Ignored enqueue for old " + n.getWhen() + " notification " + r.getKey()); mUsageStats.registerTooOldBlocked(r); Loading services/core/java/com/android/server/notification/flags.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -115,13 +115,6 @@ flag { bug: "337077643" } flag { name: "reject_old_notifications" namespace: "systemui" description: "This flag does not allow notifications older than 2 weeks old to be posted" bug: "339833083" } flag { name: "notification_minimalism" namespace: "systemui" Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -143,7 +143,6 @@ import static com.android.server.am.PendingIntentRecord.FLAG_BROADCAST_SENDER; import static com.android.server.am.PendingIntentRecord.FLAG_SERVICE_SENDER; import static com.android.server.notification.Flags.FLAG_LOG_CACHED_POSTS; import static com.android.server.notification.Flags.FLAG_MANAGED_SERVICES_CONCURRENT_MULTIUSER; import static com.android.server.notification.Flags.FLAG_REJECT_OLD_NOTIFICATIONS; import static com.android.server.notification.GroupHelper.AUTOGROUP_KEY; import static com.android.server.notification.NotificationManagerService.BITMAP_DURATION; import static com.android.server.notification.NotificationManagerService.DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE; Loading Loading @@ -17436,7 +17435,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test @EnableFlags(FLAG_REJECT_OLD_NOTIFICATIONS) public void testRejectOldNotification_oldWhen() throws Exception { Notification n = new Notification.Builder(mContext, mTestNotificationChannel.getId()) .setSmallIcon(android.R.drawable.sym_def_app_icon) Loading @@ -17451,7 +17449,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test @EnableFlags(FLAG_REJECT_OLD_NOTIFICATIONS) public void testRejectOldNotification_mediumOldWhen() throws Exception { Notification n = new Notification.Builder(mContext, mTestNotificationChannel.getId()) .setSmallIcon(android.R.drawable.sym_def_app_icon) Loading @@ -17466,7 +17463,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test @EnableFlags(FLAG_REJECT_OLD_NOTIFICATIONS) public void testRejectOldNotification_zeroWhen() throws Exception { Notification n = new Notification.Builder(mContext, mTestNotificationChannel.getId()) .setSmallIcon(android.R.drawable.sym_def_app_icon) Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -9162,7 +9162,7 @@ public class NotificationManagerService extends SystemService { return false; } if (Flags.rejectOldNotifications() && n.hasAppProvidedWhen() && n.getWhen() > 0 if (n.hasAppProvidedWhen() && n.getWhen() > 0 && (System.currentTimeMillis() - n.getWhen()) > NOTIFICATION_MAX_AGE_AT_POST) { Slog.d(TAG, "Ignored enqueue for old " + n.getWhen() + " notification " + r.getKey()); mUsageStats.registerTooOldBlocked(r); Loading
services/core/java/com/android/server/notification/flags.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -115,13 +115,6 @@ flag { bug: "337077643" } flag { name: "reject_old_notifications" namespace: "systemui" description: "This flag does not allow notifications older than 2 weeks old to be posted" bug: "339833083" } flag { name: "notification_minimalism" namespace: "systemui" Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +0 −4 Original line number Diff line number Diff line Loading @@ -143,7 +143,6 @@ import static com.android.server.am.PendingIntentRecord.FLAG_BROADCAST_SENDER; import static com.android.server.am.PendingIntentRecord.FLAG_SERVICE_SENDER; import static com.android.server.notification.Flags.FLAG_LOG_CACHED_POSTS; import static com.android.server.notification.Flags.FLAG_MANAGED_SERVICES_CONCURRENT_MULTIUSER; import static com.android.server.notification.Flags.FLAG_REJECT_OLD_NOTIFICATIONS; import static com.android.server.notification.GroupHelper.AUTOGROUP_KEY; import static com.android.server.notification.NotificationManagerService.BITMAP_DURATION; import static com.android.server.notification.NotificationManagerService.DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE; Loading Loading @@ -17436,7 +17435,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test @EnableFlags(FLAG_REJECT_OLD_NOTIFICATIONS) public void testRejectOldNotification_oldWhen() throws Exception { Notification n = new Notification.Builder(mContext, mTestNotificationChannel.getId()) .setSmallIcon(android.R.drawable.sym_def_app_icon) Loading @@ -17451,7 +17449,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test @EnableFlags(FLAG_REJECT_OLD_NOTIFICATIONS) public void testRejectOldNotification_mediumOldWhen() throws Exception { Notification n = new Notification.Builder(mContext, mTestNotificationChannel.getId()) .setSmallIcon(android.R.drawable.sym_def_app_icon) Loading @@ -17466,7 +17463,6 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { } @Test @EnableFlags(FLAG_REJECT_OLD_NOTIFICATIONS) public void testRejectOldNotification_zeroWhen() throws Exception { Notification n = new Notification.Builder(mContext, mTestNotificationChannel.getId()) .setSmallIcon(android.R.drawable.sym_def_app_icon)