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

Commit 57454878 authored by Daniel U's avatar Daniel U
Browse files

Refresh cached user array upon lockscreen settings changed

Clear the entire array storing which users allow notifications to
be shown on the lockscreen. This is because we don't know which user
changed the lockscreen settings. Update all notifications afterwards
to fill the array again.

BUG:27118634

Change-Id: Ic4f1a8de75824cd902841867b2a9bf482fd5dd7c
parent 3e5bf786
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -276,9 +276,10 @@ public abstract class BaseStatusBar extends SystemUI implements
    private final ContentObserver mLockscreenSettingsObserver = new ContentObserver(mHandler) {
        @Override
        public void onChange(boolean selfChange) {
            // We don't know which user changed LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
            // so we just dump our cache ...
            // We don't know which user changed LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS or
            // LOCK_SCREEN_SHOW_NOTIFICATIONS, so we just dump our cache ...
            mUsersAllowingPrivateNotifications.clear();
            mUsersAllowingNotifications.clear();
            // ... and refresh all the notifications
            updateNotifications();
        }