Loading services/core/java/com/android/server/notification/NotificationManagerService.java +3 −0 Original line number Diff line number Diff line Loading @@ -11271,6 +11271,9 @@ public class NotificationManagerService extends SystemService { // Lifetime extended notifications don't need to alert on state change. record.setPostSilently(true); // We also set FLAG_ONLY_ALERT_ONCE to avoid the notification from HUN-ing again. record.getNotification().flags |= FLAG_ONLY_ALERT_ONCE; mHandler.post(new EnqueueNotificationRunnable(record.getUser().getIdentifier(), record, isAppForeground, mPostNotificationTrackerFactory.newTracker(null))); Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -5969,6 +5969,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { assertThat(captor.getValue().getNotification().flags & FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY).isEqualTo( FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY); assertThat(captor.getValue().getNotification().flags & FLAG_ONLY_ALERT_ONCE).isEqualTo(FLAG_ONLY_ALERT_ONCE); assertThat(captor.getValue().shouldPostSilently()).isTrue(); } Loading Loading @@ -8798,6 +8800,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { assertThat(captor.getValue().getNotification().flags & FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY).isEqualTo( FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY); assertThat(captor.getValue().getNotification().flags & FLAG_ONLY_ALERT_ONCE).isEqualTo(FLAG_ONLY_ALERT_ONCE); assertThat(captor.getValue().shouldPostSilently()).isTrue(); } Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +3 −0 Original line number Diff line number Diff line Loading @@ -11271,6 +11271,9 @@ public class NotificationManagerService extends SystemService { // Lifetime extended notifications don't need to alert on state change. record.setPostSilently(true); // We also set FLAG_ONLY_ALERT_ONCE to avoid the notification from HUN-ing again. record.getNotification().flags |= FLAG_ONLY_ALERT_ONCE; mHandler.post(new EnqueueNotificationRunnable(record.getUser().getIdentifier(), record, isAppForeground, mPostNotificationTrackerFactory.newTracker(null))); Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +4 −0 Original line number Diff line number Diff line Loading @@ -5969,6 +5969,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { assertThat(captor.getValue().getNotification().flags & FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY).isEqualTo( FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY); assertThat(captor.getValue().getNotification().flags & FLAG_ONLY_ALERT_ONCE).isEqualTo(FLAG_ONLY_ALERT_ONCE); assertThat(captor.getValue().shouldPostSilently()).isTrue(); } Loading Loading @@ -8798,6 +8800,8 @@ public class NotificationManagerServiceTest extends UiServiceTestCase { assertThat(captor.getValue().getNotification().flags & FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY).isEqualTo( FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY); assertThat(captor.getValue().getNotification().flags & FLAG_ONLY_ALERT_ONCE).isEqualTo(FLAG_ONLY_ALERT_ONCE); assertThat(captor.getValue().shouldPostSilently()).isTrue(); } Loading