Update UserTracker.Callback after registering it
A user change may have already happened before the callback is registered, which would leave the rest of WMShell with the incorrect current user. Additionally, ShellController now tracks the current user/profiles to prevent it from updating UserChangeListeners when the user did not really change. It also immediately updates new UserChangeListeners with the current user/profiles, which removes the burden Shell classes have of checking for user-changes that happen between their constructor and onInit. In the future, Shell classes should be migrated to rely solely on UserChangeListener to keep their userId updated, or they can peek into ShellController if they only need it in response to other events and don't need to do work on user changes or maintain their own currentUserId. Flag: com.android.wm.shell.fix_missing_user_change_callbacks Bug: 404251029 Test: adevice update, verify through logs WMShell classes always get an update with the current user after WMShell.start() Change-Id: I03e6c2cbcda498be786899e0d0271e98b421477e
Loading
Please register or sign in to comment