Proper fix for setDeviceOwner() permission check.
Previous fix was clearing the binding identity for the whole manageUserUnchecked() call, which would break setting it using adb - this change limits the scope just to the package manager calls. Test: atest com.android.bedstead.nene.devicepolicy.DevicePolicyTest#setDeviceOwner_deviceOwnerIsAlreadySet_throwsException Test: adb shell dpm set-device-owner --user 0 com.afwsamples.testdpc/.DeviceAdminReceiver Fixes: 200810234 BYPASS_INCLUSIVE_LANGUAGE_REASON=existing API Change-Id: I82e4ea2bef710420306ab17f58255ef7bc9cbb06
Loading
Please register or sign in to comment