Skip to content
Commit 5676ae25 authored by Victor Chang's avatar Victor Chang
Browse files

isDeviceOwnerProvisioningAllowed implementation to match enforceCanSetDeviceOwnerLocked

The main purpose is to fix the security flaw that
user can force isDeviceOwnerProvisioningAllowed to return true
by setting the device_provisioned without factory reset

Check UserSetupComplete instead, as it's cached by DPMS if it's ever set to true

Refactor common code of isDeviceOwnerProvisioningAllowed and enforceCanSetDeviceOwnerLocked
The functionality of enforceCanSetDeviceOwnerLocked should be exactly the same.
DPM Unit Test all pass

Bug:27403225
Change-Id: I32dae8e222e01e08664abb313ead3a92d4186658
parent 86ea8f00
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