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

Commit c21b1cb6 authored by Momoko Hattori's avatar Momoko Hattori Committed by Felipe Leme
Browse files

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
parent 5bcd67ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment