diff options
| author | 2012-09-10 11:07:21 -0700 | |
|---|---|---|
| committer | 2012-09-10 11:07:21 -0700 | |
| commit | 2323ec7ee1fb614950f2f6891514964d07fd0bd4 (patch) | |
| tree | 42533788393cf355d3b4e6e61d477aba87495598 | |
| parent | 7e8f6c4cef8d65c5b470fc8700214e28d8cd4d43 (diff) | |
| parent | 61e36836b7302c8ccd30c0c07ac14d087f873c8e (diff) | |
Merge "Notifications: Hide ticker updates from background users." into jb-mr1-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 6 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 97034bb4a14d..923cd931661b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1041,8 +1041,12 @@ public abstract class BaseStatusBar extends SystemUI implements // swipe-dismissable) updateNotificationVetoButton(oldEntry.row, notification); + // Is this for you? + boolean isForCurrentUser = notificationIsForCurrentUser(notification); + if (DEBUG) Slog.d(TAG, "notification is " + (isForCurrentUser ? "" : "not ") + "for you"); + // Restart the ticker if it's still running - if (updateTicker) { + if (updateTicker && isForCurrentUser) { haltTicker(); tick(key, notification, false); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index a5d4a8ef24d5..6231d0dc0471 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1426,6 +1426,9 @@ public class PhoneStatusBar extends BaseStatusBar { // no ticking in Setup if (!isDeviceProvisioned()) return; + // not for you + if (!notificationIsForCurrentUser(n)) 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 |