summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Riley Campillo <rileycamp@google.com> 2024-03-04 17:17:54 +0000
committer Riley Campillo <rileycamp@google.com> 2024-03-21 15:06:57 +0000
commite7580468acfc3f38a1d5caa380ee6da5340d1f0c (patch)
tree7aeb8eb8a61577b96f86b80064de8c6692f27397 /libs/androidfw/StringPool.cpp
parent9b5907be653a8552288545b9bd57d0dc1ca975ef (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions