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
Loading
Please register or sign in to comment