Remove DO/PO "policy" from DeviceAdminInfo
Remove the USES_POLICY_DEVICE_OWNER and USES_POLICY_PROFILE_OWNER from
DeviceAdminInfo, and all the code referring to these constants.
This is to prevent callers calling getActiveAdminXXX variants which
take in the DO/PO constant, leading them to use getDeviceOwnerLocked,
getProfileOwnerLocked, etc.
The USES_POLICY_PROFILE_OWNER constant was particularly confusing because
it implied Device Owner was also acceptable for this "policy", which
was plain wrong in some cases.
Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest com.android.cts.devicepolicy.MixedDeviceOwnerTest com.android.cts.devicepolicy.MixedProfileOwnerTest
Change-Id: Ie78bb8a1948f29ac440f220e14f71b8a0f7f32e1
2 files changed