Logout API: handle edge case
If device is in processs of switching to a user A, it's not possible to finish logout of user A immediately, since it's not possible to stop user A now. This CL would delay the stopping of user-to-logout. When the ongoing switch-user finishes, it's then possible to stop that user. HSUM devices without interactive headless system user are not supported. An exception will be thrown if they invoke logoutUser. Bug: 380125011 Flag: android.multiuser.logout_user_api 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 Test: adb shell am switch-user -w 11 && adb shell am switch-user -w 13 && adb shell am switch-user -w 10 && adb shell am logout-user 10 && adb shell am logout-user 13 && adb shell am logout-user 11 Test: atest FrameworksServicesTests:com.android.server.am.UserControllerTest Test: atest FrameworksMockingServicesTests:com.android.server.am.UserControllerMockedTest Change-Id: Id626771cdc782f3bcb606c201fc6380692d1cee4
Loading
Please register or sign in to comment