Loading services/core/java/com/android/server/notification/NotificationAttentionHelper.java +1 −3 Original line number Diff line number Diff line Loading @@ -1540,9 +1540,7 @@ public final class NotificationAttentionHelper { private boolean isAvalancheExemptedFullVolume(final NotificationRecord record) { // important conversation if (record.isConversation() && (record.getImportance() > NotificationManager.IMPORTANCE_DEFAULT || record.getChannel().isImportantConversation())) { if (record.isConversation() && record.getChannel().isImportantConversation()) { return true; } Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java +14 −2 Original line number Diff line number Diff line Loading @@ -2363,8 +2363,20 @@ public class NotificationAttentionHelperTest extends UiServiceTestCase { mAttentionHelper.buzzBeepBlinkLocked(r4, DEFAULT_SIGNALS); verifyBeepVolume(0.5f); verify(mAccessibilityService, times(4)).sendAccessibilityEvent(any(), anyInt()); assertNotEquals(-1, r4.getLastAudiblyAlertedMs()); // Set important conversation mChannel.setImportantConversation(true); NotificationRecord r5 = getConversationNotificationRecord(mId, false /* insistent */, false /* once */, true /* noisy */, false /* buzzy*/, false /* lights */, true, true, false, null, Notification.GROUP_ALERT_ALL, false, mUser, "yetAnotherPkg", "shortcut"); // important conversation should beep at 100% volume Mockito.reset(mRingtonePlayer); mAttentionHelper.buzzBeepBlinkLocked(r5, DEFAULT_SIGNALS); verifyBeepVolume(1.0f); verify(mAccessibilityService, times(5)).sendAccessibilityEvent(any(), anyInt()); assertNotEquals(-1, r5.getLastAudiblyAlertedMs()); } @Test Loading Loading
services/core/java/com/android/server/notification/NotificationAttentionHelper.java +1 −3 Original line number Diff line number Diff line Loading @@ -1540,9 +1540,7 @@ public final class NotificationAttentionHelper { private boolean isAvalancheExemptedFullVolume(final NotificationRecord record) { // important conversation if (record.isConversation() && (record.getImportance() > NotificationManager.IMPORTANCE_DEFAULT || record.getChannel().isImportantConversation())) { if (record.isConversation() && record.getChannel().isImportantConversation()) { return true; } Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationAttentionHelperTest.java +14 −2 Original line number Diff line number Diff line Loading @@ -2363,8 +2363,20 @@ public class NotificationAttentionHelperTest extends UiServiceTestCase { mAttentionHelper.buzzBeepBlinkLocked(r4, DEFAULT_SIGNALS); verifyBeepVolume(0.5f); verify(mAccessibilityService, times(4)).sendAccessibilityEvent(any(), anyInt()); assertNotEquals(-1, r4.getLastAudiblyAlertedMs()); // Set important conversation mChannel.setImportantConversation(true); NotificationRecord r5 = getConversationNotificationRecord(mId, false /* insistent */, false /* once */, true /* noisy */, false /* buzzy*/, false /* lights */, true, true, false, null, Notification.GROUP_ALERT_ALL, false, mUser, "yetAnotherPkg", "shortcut"); // important conversation should beep at 100% volume Mockito.reset(mRingtonePlayer); mAttentionHelper.buzzBeepBlinkLocked(r5, DEFAULT_SIGNALS); verifyBeepVolume(1.0f); verify(mAccessibilityService, times(5)).sendAccessibilityEvent(any(), anyInt()); assertNotEquals(-1, r5.getLastAudiblyAlertedMs()); } @Test Loading