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
This commit is contained in:
Selim Cinek
2019-04-26 16:59:03 -07:00
parent b8eb195ec5
commit 4881f5f7a6

View File

@@ -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);