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
Loading
Please register or sign in to comment