Added evenWhenDisallowed param to removeUserOrSetEphemeral().
UserManager.removeUserOrSetEphemeral() was added primarily to
be used by CarDevicePolicyManager, in which case it should ignore
the no_remove_user restriction. But as it's also used in other
places, it needs a new parameter to define this behavior.
Test: atest FrameworksServicesTests:com.android.server.pm.UserManagerTest#testRemoveUserOrSetEphemeral_evenWhenRestricted
Test: atest FrameworksServicesTests:com.android.server.pm.UserManagerTest # to make sure it didn't break anything
Test: atest android.car.apitest.CarDevicePolicyManagerTest#testRemoveUser_whenDisallowed # on automotive
Bug: 170887769
Change-Id: If797ace64c0fa0262116f649212bbcb1d61e2046
5 files changed