From d61f73b7a3870dc86a2697cc17f2e14d871591e9 Mon Sep 17 00:00:00 2001 From: Tetsutoki Shiozawa Date: Wed, 20 Feb 2019 17:15:09 +0900 Subject: [PATCH] Missed call LED pulse notification is... missing When a call is received, the screen lights up and the InCallUI is shown. If the call goes unanswered a 'missed call' notification is left, where the LED should also pulse; this pulsing is to indicate that a missed call occurred even after the screen turns off. This re-adds that functionality that was removed in: 5436923 Be more strict about triggering notification lights Bug: 170735830 Test: atest BuzzBeepBlinkTest Change-Id: If01e8f595affc874b2c9fee82a48283b6aeaceda --- .../server/notification/NotificationManagerService.java | 6 +++--- .../com/android/server/notification/BuzzBeepBlinkTest.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 179118c0e9391..91276203934ab 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -6964,15 +6964,15 @@ public class NotificationManagerService extends SystemService { if (record.getSbn().isGroup() && record.getNotification().suppressAlertingDueToGrouping()) { return false; } - // not if in call or the screen's on - if (isInCall() || mScreenOn) { + // not if in call + if (isInCall()) { return false; } // check current user if (!isNotificationForCurrentUser(record)) { return false; } - + // Light, but only when the screen is off return true; } diff --git a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java index abcc14c6be93f..078832d33a76d 100644 --- a/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/BuzzBeepBlinkTest.java @@ -1185,7 +1185,7 @@ public class BuzzBeepBlinkTest extends UiServiceTestCase { NotificationRecord r = getLightsNotification(); mService.buzzBeepBlinkLocked(r); verifyNeverLights(); - assertFalse(r.isInterruptive()); + assertTrue(r.isInterruptive()); assertEquals(-1, r.getLastAudiblyAlertedMs()); }