Add STATE_USER_SETUP_COMPLETE

ManagedProvisioning launches SetupWizard by action STATE_USER_SETUP_COMPLETE

Bug: 29829689
Test: runtest managed-provisioning
Change-Id: I06656842a1855fbc9a0675d3d9a188b1f6fbe033
This commit is contained in:
Victor Chang
2017-04-11 19:41:43 +01:00
parent 3709761c9f
commit 18800097c3
2 changed files with 21 additions and 0 deletions

View File

@@ -6642,6 +6642,7 @@ package android.app.admin {
field public static final java.lang.String ACTION_SET_NEW_PASSWORD = "android.app.action.SET_NEW_PASSWORD";
field public static final java.lang.String ACTION_SET_PROFILE_OWNER = "android.app.action.SET_PROFILE_OWNER";
field public static final java.lang.String ACTION_START_ENCRYPTION = "android.app.action.START_ENCRYPTION";
field public static final java.lang.String ACTION_STATE_USER_SETUP_COMPLETE = "android.app.action.STATE_USER_SETUP_COMPLETE";
field public static final java.lang.String ACTION_SYSTEM_UPDATE_POLICY_CHANGED = "android.app.action.SYSTEM_UPDATE_POLICY_CHANGED";
field public static final java.lang.String DELEGATION_APP_RESTRICTIONS = "delegation-app-restrictions";
field public static final java.lang.String DELEGATION_BLOCK_UNINSTALL = "delegation-block-uninstall";

View File

@@ -257,6 +257,26 @@ public class DevicePolicyManager {
public static final String ACTION_PROVISION_MANAGED_DEVICE
= "android.app.action.PROVISION_MANAGED_DEVICE";
/**
* Activity action: launch when user provisioning completed, i.e.
* {@link #getUserProvisioningState()} returns one of the complete state.
*
* <p> Please note that the API behavior is not necessarily consistent across various releases,
* and devices, as it's contract between SetupWizard and ManagedProvisioning. The default
* implementation is that ManagedProvisioning launches SetupWizard in NFC provisioning only.
*
* <p> The activity must be protected by permission
* {@link android.Manifest.permission#BIND_DEVICE_ADMIN}, and the process must hold
* {@link android.Manifest.permission#DISPATCH_PROVISIONING_MESSAGE} to be launched.
* Only one {@link ComponentName} in the entire system should be enabled, and the rest of the
* components are not started by this intent.
* @hide
*/
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
@SystemApi
public static final String ACTION_STATE_USER_SETUP_COMPLETE =
"android.app.action.STATE_USER_SETUP_COMPLETE";
/**
* Activity action: Starts the provisioning flow which sets up a managed device.
*