Fixes bug where users could add other users when they should not have had that ability.
Consolidates logic in canCreateUser and canCreateGuest in a new method canAddMoreUsers that also checks UserManager.canAddUsers with specified user type Removes the check anyoneCanCreateUsers, since currentUserCanCreateUsers is a sufficient check. currentUserCanCreateUsers checks that both the current user and the system user do not have the DISALLOW_ADD_USER restriction. Removes unnecessary isAddUsersFromLockScreenEnabled check in canManageUsers logic. Uses (isDeviceLocked or isAddUsersFromLockScreenEnabled) condition rather than isAddUsersFromLockScreenEnabled Flag: NONE Fixes: 270370602 Test: UserSwitcherInteractorTest.kt, local hsum and non hsum testing Bug:270370602 Change-Id: I85de669c9daee7b06825601f74b5193df0f31e5b
Loading
Please register or sign in to comment