Remove more profile_owner policy refs
Convert more call sites in the DevicePolicyManagerService to get the caller and check if it's the DO/PO, instead of relying on calls to getActiveAdmin with the USES_POLICY_PROFILE_OWNER constant. The change also makes isDeviceOwner / isProfileOwner return a correct answer when the caller identity object does not have the admin component name (as one was not provided by the caller). In those cases, the UID of the calling app will be used to find out if it is of an active admin that's a DO/PO. 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: I4dd8cb7368d5c66b3ad67317e8bab8f7cecbe899
Loading
Please register or sign in to comment