Skip to content

Commit 0c274b1

Browse files
committed
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
1 parent a36c558 commit 0c274b1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ public void updateNotification(StatusBarNotification notification, RankingMap ra
18331833
logUpdate(entry, n);
18341834
}
18351835
boolean applyInPlace = shouldApplyInPlace(entry, n);
1836-
boolean shouldInterrupt = shouldInterrupt(entry);
1836+
boolean shouldInterrupt = shouldInterrupt(entry, notification);
18371837
boolean alertAgain = alertAgain(entry, n);
18381838

18391839
entry.notification = notification;
@@ -2005,7 +2005,10 @@ private boolean alertAgain(Entry oldEntry, Notification newNotification) {
20052005
}
20062006

20072007
protected boolean shouldInterrupt(Entry entry) {
2008-
StatusBarNotification sbn = entry.notification;
2008+
return shouldInterrupt(entry, entry.notification);
2009+
}
2010+
2011+
protected boolean shouldInterrupt(Entry entry, StatusBarNotification sbn) {
20092012
if (mNotificationData.shouldFilterOut(sbn)) {
20102013
if (DEBUG) {
20112014
Log.d(TAG, "Skipping HUN check for " + sbn.getKey() + " since it's filtered out.");

0 commit comments

Comments
 (0)