diff options
author | Joe Onorato <joeo@google.com> | 2011-01-04 17:13:53 -0800 |
---|---|---|
committer | Joe Onorato <joeo@google.com> | 2011-01-04 18:12:33 -0800 |
commit | eeed9949835ae4d516a751f3254967e9ad7398a5 (patch) | |
tree | f4338c9a36c03a318da5fb61a1375fb53f49fea5 /packages | |
parent | 281d83f61f4036503ded1a967b8b43bfbaa373d0 (diff) | |
download | frameworks_base-eeed9949835ae4d516a751f3254967e9ad7398a5.zip frameworks_base-eeed9949835ae4d516a751f3254967e9ad7398a5.tar.gz frameworks_base-eeed9949835ae4d516a751f3254967e9ad7398a5.tar.bz2 |
Don't re-show the ticker for a notification if they have set FLAG_ONLY_SHOW_ONCE.
Bug: 3306725
Change-Id: Ie733ad38d9e801f676966fa3ddee6847670c6deb
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 4738502..e527073 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -537,7 +537,7 @@ public class TabletStatusBar extends StatusBar { } catch (PendingIntent.CanceledException e) { } } else { - tick(key, notification); + tick(key, notification, true); } setAreThereNotifications(); @@ -628,7 +628,7 @@ public class TabletStatusBar extends StatusBar { if (false && immersive) { // TODO: immersive mode } else { - tick(key, notification); + tick(key, notification, false); } setAreThereNotifications(); @@ -707,11 +707,16 @@ public class TabletStatusBar extends StatusBar { return n.tickerView != null || !TextUtils.isEmpty(n.tickerText); } - private void tick(IBinder key, StatusBarNotification n) { + private void tick(IBinder key, StatusBarNotification n, boolean firstTime) { // Don't show the ticker when the windowshade is open. if (mNotificationPanel.isShowing()) { return; } + // If they asked for FLAG_ONLY_ALERT_ONCE, then only show this notification + // if it's a new notification. + if (!firstTime && (n.notification.flags & Notification.FLAG_ONLY_ALERT_ONCE) != 0) { + return; + } // Show the ticker if one is requested. Also don't do this // until status bar window is attached to the window manager, // because... well, what's the point otherwise? And trying to |