Loading services/core/java/com/android/server/notification/NotificationManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -4763,7 +4763,9 @@ public class NotificationManagerService extends SystemService { // Suppressed because another notification in its group handles alerting if (record.sbn.isGroup()) { return notification.suppressAlertingDueToGrouping(); if (notification.suppressAlertingDueToGrouping()) { return true; } } // Suppressed for being too recently noisy Loading services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java +9 −0 Original line number Diff line number Diff line Loading @@ -941,6 +941,15 @@ public class BuzzBeepBlinkTest extends UiServiceTestCase { verify(mUsageStats, never()).isAlertRateLimited(any()); } @Test public void testGroupSuppressionFailureDoesNotAffectRateLimiting() { NotificationRecord summary = getBeepyNotificationRecord("a", GROUP_ALERT_SUMMARY); summary.getNotification().flags |= Notification.FLAG_GROUP_SUMMARY; mService.buzzBeepBlinkLocked(summary); verify(mUsageStats, times(1)).isAlertRateLimited(any()); } @Test public void testCrossUserSoundMuted() throws Exception { final Notification n = new Builder(getContext(), "test") Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +3 −1 Original line number Diff line number Diff line Loading @@ -4763,7 +4763,9 @@ public class NotificationManagerService extends SystemService { // Suppressed because another notification in its group handles alerting if (record.sbn.isGroup()) { return notification.suppressAlertingDueToGrouping(); if (notification.suppressAlertingDueToGrouping()) { return true; } } // Suppressed for being too recently noisy Loading
services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java +9 −0 Original line number Diff line number Diff line Loading @@ -941,6 +941,15 @@ public class BuzzBeepBlinkTest extends UiServiceTestCase { verify(mUsageStats, never()).isAlertRateLimited(any()); } @Test public void testGroupSuppressionFailureDoesNotAffectRateLimiting() { NotificationRecord summary = getBeepyNotificationRecord("a", GROUP_ALERT_SUMMARY); summary.getNotification().flags |= Notification.FLAG_GROUP_SUMMARY; mService.buzzBeepBlinkLocked(summary); verify(mUsageStats, times(1)).isAlertRateLimited(any()); } @Test public void testCrossUserSoundMuted() throws Exception { final Notification n = new Builder(getContext(), "test") Loading