diff options
| author | 2022-10-28 15:01:07 -0700 | |
|---|---|---|
| committer | 2022-11-14 12:34:37 -0800 | |
| commit | e6aa1016beabdf5fc2bf8aa93fb7028fc939b263 (patch) | |
| tree | 7ff852c88b3c07ec73d4c96748626bdc80712024 /cmds/bootanimation/BootAnimation.cpp | |
| parent | d16bc3eea37fb20ea5114a2b4307c5ee5cf87ca5 (diff) | |
UserVisibilityMediator refactoring, step 3.
This CL improves startUser() so it does all checks before setting the
state (atomically).
It also "fixes" 2 issues in that method:
- Return USER_ASSIGNMENT_RESULT_SUCCESS_INVISIBLE when the profile
is started but its parent is not visible (this could happen when
the profile is started in the background for maintenance purposes,
like garage mode).
- Don't throw RuntimeExceptions in case of error (but rather
USER_ASSIGNMENT_RESULT_FAILURE).
This is the last refactoring per se - further changes will either
modify the behavior of the class (for example, to allow background
users starting in the main display) or improve the test cases (for
example, to make sure subclasses of UserVisibilityMediatorTestCase
test all use case scenarios).
Test: atest FrameworksMockingServicesTests:com.android.server.pm.UserManagerServiceTest UserVisibilityMediatorMUMDTest UserVisibilityMediatorSUSDTest UserControllerTest
Test: atest CtsMultiUserTestCases:android.multiuser.cts.MultipleUsersOnMultipleDisplaysTest
Test: adb shell dumpsys user --visibility-mediator
Bug: 244644281
Change-Id: Ia09b58607f93c4dd02a7a646da9359af58e3d0e7
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
0 files changed, 0 insertions, 0 deletions