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

Commit 294710f3 authored by Yao Li's avatar Yao Li
Browse files

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
parent 10756b62
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