From 4881f5f7a6ea1ee826b3efac15e06fa1837dc153 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Fri, 26 Apr 2019 16:59:03 -0700 Subject: [PATCH] Fixed a bug where the notifications were not updated when switching users The notifications were filtered and sorted but the update to the presenter happend before it. Therefore the updates to the notifications was quite delayed. Test: atest SystemUITests Fixes: 130780410 Change-Id: I804cda744db135adb677566177095111d5845d4e --- .../statusbar/NotificationLockscreenUserManagerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java index 9490b142de4f9..d8070cdf53d58 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java @@ -115,8 +115,10 @@ public class NotificationLockscreenUserManagerImpl implements updateLockscreenNotificationSetting(); updatePublicMode(); - mPresenter.onUserSwitched(mCurrentUserId); + // The filtering needs to happen before the update call below in order to make sure + // the presenter has the updated notifications from the new user getEntryManager().getNotificationData().filterAndSort(); + mPresenter.onUserSwitched(mCurrentUserId); for (UserChangedListener listener : mListeners) { listener.onUserChanged(mCurrentUserId);