Merge "Add ACTION_PROVISION_MANAGED_USER"

This commit is contained in:
Mahaver Chopra
2015-11-10 14:08:02 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 0 deletions

View File

@@ -147,6 +147,14 @@ public class DevicePolicyManager {
public static final String ACTION_PROVISION_MANAGED_PROFILE
= "android.app.action.PROVISION_MANAGED_PROFILE";
/**
* @hide
* TODO Add Documentation
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
public static final String ACTION_PROVISION_MANAGED_USER
= "android.app.action.PROVISION_MANAGED_USER";
/**
* Activity action: Starts the provisioning flow which sets up a managed device.
* Must be started with {@link android.app.Activity#startActivityForResult(Intent, int)}.

View File

@@ -6676,6 +6676,11 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
return false;
}
return true;
} else if (DevicePolicyManager.ACTION_PROVISION_MANAGED_USER.equals(action)) {
if (hasUserSetupCompleted(callingUserId)) {
return false;
}
return true;
}
throw new IllegalArgumentException("Unknown provisioning action " + action);
}