DPMS setDeviceOwner access control
* Check whether the caller is system or has
permission to set the device owner before
checking whether the package exists on
device.
Manual testing
* Call DPMS setDeviceOwner with an installed
package but not as the system caller
* Call DPMS setDeviceOwner with an uninstalled
package and not as the system caller
* Both calls should give the same error message
and logs.
Bug: 184525740
Test: manual testing
atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.cts.devicepolicy.DeviceOwnerTest
Change-Id: I5654ef420ff44af01d475595609bb85fec132ce1
2 files changed