summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorMahaver Chopra <mahaver@google.com>2016-11-25 19:15:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-11-25 19:15:35 +0000
commitd0835e45f7663cb6abef383b9d903429c824cd20 (patch)
treef529f418247cdc6e16f36ce9108f574a0e4bbf25 /core/java/android
parentd39d4d7d38c9e27a640ad3ddc0938083f8f539ff (diff)
parent3c58cfe2d98219ec2628835d08ee964c0208ecd7 (diff)
Merge "Add provisioning successful intent"
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 8c2749f5f2d1..e0ec1b111f02 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -159,6 +159,11 @@ public class DevicePolicyManager {
* managed profile and the {@link #ACTION_MANAGED_PROFILE_PROVISIONED} broadcast is sent in
* the primary profile.
*
+ * <p>From version {@link android.os.Build.VERSION_CODES#O}, when managed provisioning has
+ * completed, along with the above broadcast, activity intent
+ * {@link #ACTION_PROVISIONING_SUCCESSFUL} will also be sent to the application specified in
+ * the provisioning intent.
+ *
* <p>If provisioning fails, the managedProfile is removed so the device returns to its
* previous state.
*
@@ -233,6 +238,10 @@ public class DevicePolicyManager {
* {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} is broadcast to the
* device owner.
*
+ * <p>From version {@link android.os.Build.VERSION_CODES#O}, when device owner provisioning has
+ * completed, along with the above broadcast, activity intent
+ * {@link #ACTION_PROVISIONING_SUCCESSFUL} will also be sent to the device owner.
+ *
* <p>If provisioning fails, the device is factory reset.
*
* <p>A result code of {@link android.app.Activity#RESULT_OK} implies that the synchronous part
@@ -322,6 +331,10 @@ public class DevicePolicyManager {
* {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} is broadcast to the
* device owner.
*
+ * <p>From version {@link android.os.Build.VERSION_CODES#O}, when device owner provisioning has
+ * completed, along with the above broadcast, activity intent
+ * {@link #ACTION_PROVISIONING_SUCCESSFUL} will also be sent to the device owner.
+ *
* <p>If provisioning fails, the device is factory reset.
*
* <p>A result code of {@link android.app.Activity#RESULT_OK} implies that the synchronous part
@@ -734,6 +747,22 @@ public class DevicePolicyManager {
= "android.app.action.MANAGED_PROFILE_PROVISIONED";
/**
+ * Activity action: This activity action is sent to indicate that provisioning of a managed
+ * profile or managed device has completed successfully. It'll be sent at the same time as
+ * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} broadcast but this will be
+ * delivered faster as it's an activity intent.
+ *
+ * <p>The intent is only sent to the application on the profile that requested provisioning. In
+ * the device owner case the profile is the primary user.
+ *
+ * @see #ACTION_PROVISION_MANAGED_PROFILE
+ * @see #ACTION_PROVISION_MANAGED_DEVICE
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_PROVISIONING_SUCCESSFUL =
+ "android.app.action.PROVISIONING_SUCCESSFUL";
+
+ /**
* A boolean extra indicating whether device encryption can be skipped as part of device owner
* or managed profile provisioning.
*