am 9330c3e5: Merge "Bring consistency to FLAG_ONLY_ALERT_ONCE semantics." into lmp-dev

* commit '9330c3e544107c0da0425ca5e6cd0caec8d475d7':
  Bring consistency to FLAG_ONLY_ALERT_ONCE semantics.
This commit is contained in:
Chris Wren
2014-09-08 20:51:10 +00:00
committed by Android Git Automerger

View File

@@ -1783,7 +1783,7 @@ public abstract class BaseStatusBar extends SystemUI implements
oldEntry.notification.getNotification().tickerText);
final boolean shouldInterrupt = shouldInterrupt(notification);
final boolean alertAgain = alertAgain(oldEntry);
final boolean alertAgain = alertAgain(oldEntry, n);
boolean updateSuccessful = false;
if (contentsUnchanged && bigContentsUnchanged && headsUpContentsUnchanged
&& publicUnchanged) {
@@ -1947,10 +1947,9 @@ public abstract class BaseStatusBar extends SystemUI implements
}
}
private boolean alertAgain(Entry entry) {
final StatusBarNotification sbn = entry.notification;
return entry == null || !entry.hasInterrupted()
|| (sbn.getNotification().flags & Notification.FLAG_ONLY_ALERT_ONCE) == 0;
private boolean alertAgain(Entry oldEntry, Notification newNotification) {
return oldEntry == null || !oldEntry.hasInterrupted()
|| (newNotification.flags & Notification.FLAG_ONLY_ALERT_ONCE) == 0;
}
protected boolean shouldInterrupt(StatusBarNotification sbn) {