Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61e36836 authored by John Spurlock's avatar John Spurlock
Browse files

Notifications: Hide ticker updates from background users.

We should only update the notification ticker area when
the notification is for the current user.

Bug:6924835
Change-Id: Ieaccbd8c972b3d0f62c74d29d42e0fa77ec3148c
parent 753e1280
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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);
        }
+3 −0
Original line number Diff line number Diff line
@@ -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