am 9ea9b353: am 06a6416a: am 63cb39a3: Merge "NoMan: Fix speedbump when no low-prio notifs" into lmp-dev

* commit '9ea9b3532913a2944d3d5e762e11d4fa9d21933d':
  NoMan: Fix speedbump when no low-prio notifs
This commit is contained in:
Christoph Studer
2014-08-04 12:27:10 +00:00
committed by Android Git Automerger
2 changed files with 6 additions and 3 deletions

View File

@@ -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) {

View File

@@ -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) {