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

Explicitly get org-owned admin in DPMS

Refactor the DevicePolicyManagerService such that every method
that requires the ActiveAdmin associated with a profile owner on
an organization-owned device does the following:
* Checks if the caller is a profile owner on an org-owned device, or a
  device owner.
* Get the ActiveAdmin associated with the profile owner or device owner.

This is instead of calling getActiveAdmin with the org_owned profile
owner policy, which is now removed.

For the most part, this change does not affect DPMS functionality.
The few methods that were specific to org-owned devices with a
managed profile are now properly restricted and cannot be called
by a device owner.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest com.android.cts.devicepolicy.MixedDeviceOwnerTest
Change-Id: I9463499d9e343b4e52d6f9cdbe1d618e58f59a49
parent 9bca9776
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