From ce00a234eda550251d42d13540df30713072a514 Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Fri, 21 Nov 2014 16:25:19 -0500 Subject: [PATCH] LED should not be blocked by interruption filtering. Bug: 17204854 Change-Id: Ife30c2ebbcf3fce87ac262dbd339b694d4a57728 --- .../server/notification/NotificationManagerService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 6958ff842b8af..d60c57fb3cb6a 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1869,8 +1869,8 @@ public class NotificationManagerService extends SystemService { final Notification notification = record.sbn.getNotification(); // Should this notification make noise, vibe, or use the LED? - final boolean canInterrupt = (record.score >= SCORE_INTERRUPTION_THRESHOLD) && - !record.isIntercepted(); + final boolean aboveThreshold = record.score >= SCORE_INTERRUPTION_THRESHOLD; + final boolean canInterrupt = aboveThreshold && !record.isIntercepted(); if (DBG || record.isIntercepted()) Slog.v(TAG, "pkg=" + record.sbn.getPackageName() + " canInterrupt=" + canInterrupt + @@ -2009,7 +2009,7 @@ public class NotificationManagerService extends SystemService { if (mLedNotification != null && record.getKey().equals(mLedNotification.getKey())) { mLedNotification = null; } - if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0 && canInterrupt) { + if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0 && aboveThreshold) { mLights.add(record.getKey()); updateLightsLocked(); if (mUseAttentionLight) {