Skip to content
Commit ab0a45f0 authored by Felipe Leme's avatar Felipe Leme
Browse files

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
parent a491ff68
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