decide interruptions based on current data, not previous data.

shouldInterrupt() now takes an optional StatusBarNotification object that will
be used instead of the one on the entry.

Bug:22462619
Change-Id: I5a1d9205b22ad733d5bc582693edad26518e1959
This commit is contained in:
Chris Wren
2015-07-17 10:34:53 -04:00
parent a36c5580c5
commit 0c274b107c

View File

@@ -1833,7 +1833,7 @@ public abstract class BaseStatusBar extends SystemUI implements
logUpdate(entry, n);
}
boolean applyInPlace = shouldApplyInPlace(entry, n);
boolean shouldInterrupt = shouldInterrupt(entry);
boolean shouldInterrupt = shouldInterrupt(entry, notification);
boolean alertAgain = alertAgain(entry, n);
entry.notification = notification;
@@ -2005,7 +2005,10 @@ public abstract class BaseStatusBar extends SystemUI implements
}
protected boolean shouldInterrupt(Entry entry) {
StatusBarNotification sbn = entry.notification;
return shouldInterrupt(entry, entry.notification);
}
protected boolean shouldInterrupt(Entry entry, StatusBarNotification sbn) {
if (mNotificationData.shouldFilterOut(sbn)) {
if (DEBUG) {
Log.d(TAG, "Skipping HUN check for " + sbn.getKey() + " since it's filtered out.");