Loading services/core/java/com/android/server/notification/NotificationManagerService.java +3 −0 Original line number Diff line number Diff line Loading @@ -11924,6 +11924,9 @@ public class NotificationManagerService extends SystemService { if (record != null && (record.getSbn().getNotification().flags & FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY) > 0) { boolean isAppForeground = pkg != null && packageImportance == IMPORTANCE_FOREGROUND; // Lifetime extended notifications don't need to alert on state change. record.setPostSilently(true); mHandler.post(new EnqueueNotificationRunnable(record.getUser().getIdentifier(), record, isAppForeground, mPostNotificationTrackerFactory.newTracker(null))); services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -5862,6 +5862,7 @@ 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().shouldPostSilently()).isTrue(); } @Test Loading Loading @@ -8603,6 +8604,7 @@ 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().shouldPostSilently()).isTrue(); } @Test Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +3 −0 Original line number Diff line number Diff line Loading @@ -11924,6 +11924,9 @@ public class NotificationManagerService extends SystemService { if (record != null && (record.getSbn().getNotification().flags & FLAG_LIFETIME_EXTENDED_BY_DIRECT_REPLY) > 0) { boolean isAppForeground = pkg != null && packageImportance == IMPORTANCE_FOREGROUND; // Lifetime extended notifications don't need to alert on state change. record.setPostSilently(true); mHandler.post(new EnqueueNotificationRunnable(record.getUser().getIdentifier(), record, isAppForeground, mPostNotificationTrackerFactory.newTracker(null)));
services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -5862,6 +5862,7 @@ 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().shouldPostSilently()).isTrue(); } @Test Loading Loading @@ -8603,6 +8604,7 @@ 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().shouldPostSilently()).isTrue(); } @Test Loading