Initial version of UserVisibilityMediator.
Currently, deciding if user is visible (or visible in a specific display) or not is handled by UserManagerService directly, and its logic depends on whether the device supports concurrent multiple users on multiple displays. Moving that logic to a separate class will make it easier to support different modes (for example, passenger-only systems or sharing the same display among multiple users). This CL introduces such class, although it's a "pure" refactor that just moved code (and tests) around "as is"; further improvements (like breaking its dependency from UserManagerService) will me made on follow-up CLs. Test: atest FrameworksMockingServicesTests:com.android.server.pm.UserManagerServiceTest UserVisibilityMediatorMUMDTest UserVisibilityMediatorSUSDTest Test: atest CtsMultiUserTestCases:android.multiuser.cts.MultipleUsersOnMultipleDisplaysTest Test: adb shell dumpsys user --visibility-mediator Bug: 244644281 Change-Id: I4b28e0854c2a14ccebbfe72b4060e1372438324b
Loading
Please register or sign in to comment