Fix getPreviousFullUserToEnterForeground() for interactive HSU
- Remove isFull() check in getPreviousFullUserToEnterForeground() so
that it can return the interactive HSU (headless system user), which
is not a full user.
- Fix UserManagerService.LifeCycle.onUserStarting() so that the last
foreground time for interactive HSU is correctly set on boot.
- Rename the method to getPreviousUserToEnterForeground() (drop 'Full').
Bug: 412630247
Test: atest com.android.server.pm.UserManagerServiceMockedTest
Test: atest android.host.multiuser.UserManagerHostTest
Test: On a desktop device:
1. On the login screen, click 'Add person' flow.
2. On the first screen of setup wizard, click 'Cancel'.
3. Observe that the login screen is shown again.
Test: On a desktop device:
a. Switch to a non-system user (e.g., user 10).
b. Reboot the device.
c. Do the 1.~3. above (Click 'Add person', then 'Cancel')
Flag: EXEMPT bug fix
Change-Id: Ia601d9598ae3625cf7d5ee02b5846edc7c7beca3
Loading
Please register or sign in to comment