Merge "Remove silent provisioning hack from DPMS" into sc-dev

This commit is contained in:
Kholoud Mohamed
2021-03-31 11:30:36 +00:00
committed by Android (Google) Code Review

View File

@@ -16975,18 +16975,13 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
final long identity = Binder.clearCallingIdentity(); final long identity = Binder.clearCallingIdentity();
try { try {
// TODO(b/178187130): This check fails silent provisioning, uncomment once silent int result = checkProvisioningPreConditionSkipPermission(
// provisioning is no longer used. ACTION_PROVISION_MANAGED_DEVICE, deviceAdmin.getPackageName());
if (false) { if (result != CODE_OK) {
int result = checkProvisioningPreConditionSkipPermission( throw new ServiceSpecificException(
ACTION_PROVISION_MANAGED_DEVICE, deviceAdmin.getPackageName()); PROVISIONING_RESULT_PRE_CONDITION_FAILED,
if (result != CODE_OK) { "Provisioning preconditions failed with result: " + result);
throw new ServiceSpecificException(
PROVISIONING_RESULT_PRE_CONDITION_FAILED,
"Provisioning preconditions failed with result: " + result);
}
} }
setTimeAndTimezone(provisioningParams.getTimeZone(), provisioningParams.getLocalTime()); setTimeAndTimezone(provisioningParams.getTimeZone(), provisioningParams.getLocalTime());
setLocale(provisioningParams.getLocale()); setLocale(provisioningParams.getLocale());