DPMS refactoring: Get Profile / Device owner

Get the Profile Owner or Device Owner directly, rather than using the
ComponentName provided by the caller to look it up.

For DevicePolicyManager methods that are only callable by DO or PO,
there is no need to use the ComponentName to distinguish between
different potential admins, as there could be only one.

Bug: 163028934
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest
Change-Id: I5fc3345101c8f61c12a9bbdbd224e95e719a0795
2 files changed