Fix regression in canHaveRestrictedProfile() on fully managed devices

Since Android 14, the code that updates the mIsDeviceManaged and
mIsUserManaged fields of UserManagerService has been disabled, so
canHaveRestrictedProfile() started returning true on the main user on
fully-managed devices instead of false as seems to have been intended.
Fix it to return false on fully-managed devices once again.

Bug: 258213147
Flag: EXEMPT bugfix
Test: atest Frameworks{,Mocking}ServicesTests:com.android.server.{devicepolicy,locksettings}
Change-Id: I33c421501f9f375ff143a424d9fadff91a5abf2d
1 file changed