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

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
parent 83348e38
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