Don't check device_provisioned on Wear devices in setDeviceOwnerSystemPropertyLocked()

am: c7b18342ea

Change-Id: I1969d32950057ecacc03e8c5d00ad185fb627044
This commit is contained in:
Greg Plesur
2017-02-08 23:44:27 +00:00
committed by android-build-merger

View File

@@ -1726,7 +1726,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
private void setDeviceOwnerSystemPropertyLocked() { private void setDeviceOwnerSystemPropertyLocked() {
// Device owner may still be provisioned, do not set the read-only system property yet. // Device owner may still be provisioned, do not set the read-only system property yet.
if (mInjector.settingsGlobalGetInt(Settings.Global.DEVICE_PROVISIONED, 0) == 0) { // Wear devices don't set device_provisioned until the device is paired, so allow
// device_owner property to be set without that.
if (!mIsWatch
&& mInjector.settingsGlobalGetInt(Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
return; return;
} }
// Still at the first stage of CryptKeeper double bounce, mOwners.hasDeviceOwner is // Still at the first stage of CryptKeeper double bounce, mOwners.hasDeviceOwner is