Skip to content
Commit 7d0becbc authored by Eran Messeri's avatar Eran Messeri
Browse files

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
parent 30ae7a43
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment