Merge "New intent action for returning account migration result"
diff --git a/api/current.txt b/api/current.txt
index a1cdc8d..bd5596b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -5532,6 +5532,7 @@
method public void uninstallCaCert(android.content.ComponentName, byte[]);
method public void wipeData(int);
field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
+ field public static final java.lang.String ACTION_MANAGED_PROFILE_PROVISIONED = "android.app.action.MANAGED_PROFILE_PROVISIONED";
field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.PROVISION_MANAGED_PROFILE";
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_START_ENCRYPTION = "android.app.action.START_ENCRYPTION";
diff --git a/api/system-current.txt b/api/system-current.txt
index 13a8981..36ac196 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -5633,6 +5633,7 @@
method public void uninstallCaCert(android.content.ComponentName, byte[]);
method public void wipeData(int);
field public static final java.lang.String ACTION_ADD_DEVICE_ADMIN = "android.app.action.ADD_DEVICE_ADMIN";
+ field public static final java.lang.String ACTION_MANAGED_PROFILE_PROVISIONED = "android.app.action.MANAGED_PROFILE_PROVISIONED";
field public static final java.lang.String ACTION_PROVISION_MANAGED_PROFILE = "android.app.action.PROVISION_MANAGED_PROFILE";
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";
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 318a314..a10b133 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -111,9 +111,11 @@
*
* <p>This intent must contain the extra {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME}.
*
- * <p> When managed provisioning has completed, an intent of the type
- * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} is broadcasted to the
- * managed profile.
+ * <p> When managed provisioning has completed, broadcasts are sent to the application specified
+ * in the provisioning intent. The
+ * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} broadcast is sent in the
+ * managed profile and the {@link #ACTION_MANAGED_PROFILE_PROVISIONED} broadcast is sent in
+ * the primary profile.
*
* <p> If provisioning fails, the managedProfile is removed so the device returns to its
* previous state.
@@ -332,6 +334,20 @@
= "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM";
/**
+ * Broadcast Action: This broadcast is sent to indicate that provisioning of a managed profile
+ * has completed successfully.
+ *
+ * <p>The broadcast is limited to the primary profile, to the app specified in the provisioning
+ * intent (@see #ACTION_PROVISION_MANAGED_PROFILE).
+ *
+ * <p>This intent will contain the extra {@link EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE} which
+ * corresponds to the account requested to be migrated at provisioning time, if any.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_MANAGED_PROFILE_PROVISIONED
+ = "android.app.action.MANAGED_PROFILE_PROVISIONED";
+
+ /**
* A boolean extra indicating whether device encryption is required as part of Device Owner
* provisioning.
*