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

Commit b9ec140b authored by Yao Li's avatar Yao Li
Browse files

logoutUser always switches to system user

Previously, logoutUser would switch to previous foreground user, because
of HSUM devices that can't switch to system user. Now, logoutUser no
longer supports such devices, so it's always switch to the system user:
both HSUM devices with interactive system user, and non-HSUM devices.

This allows to simplify logoutUser a lot, and remove a potential race
condition.

getUserToLogoutCurrentUserTo() and related tests are removed, as it is
no longer used.

Bug: 380125011
Flag: android.multiuser.logout_user_api
Test: atest FrameworksMockingServicesTests:com.android.server.am.UserControllerMockedTest
Test: atest FrameworksMockingServicesTests:com.android.server.pm.UserManagerServiceMockedTest
Test: Manual test. adb shell am switch-user 10 && adb shell am logout-user 11 && adb shell am switch-user 10 && adb shell am logout-user 10
Change-Id: I2472604ca7b50ff1362dfc7645e79e6d438d06f3
parent 2fc51dd2
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