Add ACTION_PROVISION_MANAGED_USER

Adding ACTION_PROVISION_MANAGED_USER to DevicePolicyManager.

Bug: 25462684
Change-Id: Ic90c3471f3a9c431d728197a19ab25b9946f090a
This commit is contained in:
Mahaver Chopra
2015-11-05 11:55:12 +00:00
parent 42817202e2
commit 5e73256a48
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);
}