diff options
author | Christoph Studer <chstuder@google.com> | 2014-08-04 11:54:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-01 17:53:35 +0000 |
commit | b305f7d63a7f174524da23ddbda642332c2dbeb1 (patch) | |
tree | 888d3a08fd3abba581fcc35daf72a9ed414ecbd8 | |
parent | 7851e4643a078cd1922141a17eaa0ec953c24162 (diff) | |
parent | ce2e23ff69427a069cbdcd6bf4fa6097cbf04b4d (diff) | |
download | frameworks_base-b305f7d63a7f174524da23ddbda642332c2dbeb1.zip frameworks_base-b305f7d63a7f174524da23ddbda642332c2dbeb1.tar.gz frameworks_base-b305f7d63a7f174524da23ddbda642332c2dbeb1.tar.bz2 |
Merge "NoMan: Fix speedbump when no low-prio notifs" into lmp-dev
-rw-r--r-- | core/java/android/service/notification/NotificationListenerService.java | 6 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index 1f01bc8..f807ad6 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -609,8 +609,12 @@ public abstract class NotificationListenerService extends Service { } private boolean isAmbient(String key) { + int firstAmbientIndex = mRankingUpdate.getFirstAmbientIndex(); + if (firstAmbientIndex < 0) { + return false; + } int rank = getRank(key); - return rank >= 0 && rank >= mRankingUpdate.getFirstAmbientIndex(); + return rank >= 0 && rank >= firstAmbientIndex; } private boolean isIntercepted(String key) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 03508ea..15a9286 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1422,8 +1422,7 @@ public abstract class BaseStatusBar extends SystemUI implements } private boolean shouldShowOnKeyguard(StatusBarNotification sbn) { - return mShowLockscreenNotifications && - sbn.getNotification().priority >= Notification.PRIORITY_LOW; + return mShowLockscreenNotifications && !mNotificationData.isAmbient(sbn.getKey()); } protected void setZenMode(int mode) { |