From a4f9dc1cf0297dc93615e638fd490e4ef346a249 Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Fri, 12 Jun 2015 13:27:59 +0100 Subject: [PATCH] Update doc of ACTION_PROVISION_MANAGED_DEVICE It also supports an optional extra EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE Bug: 21797182 Change-Id: Ie145e6a79dd7eebdbb4cc58e1baba761b9cc5bbf --- .../android/app/admin/DevicePolicyManager.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 42d0dcb4f4933..9f4915463ff81 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -149,6 +149,7 @@ public class DevicePolicyManager { *
  • {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME}
  • *
  • {@link #EXTRA_PROVISIONING_SKIP_ENCRYPTION}, optional
  • *
  • {@link #EXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED}, optional
  • + *
  • {@link #EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE}, optional
  • * * *

    When device owner provisioning has completed, an intent of the type @@ -163,14 +164,19 @@ public class DevicePolicyManager { = "android.app.action.PROVISION_MANAGED_DEVICE"; /** - * A {@link android.os.Parcelable} extra of type {@link android.os.PersistableBundle} that allows - * a mobile device management application that starts managed profile provisioning to pass data - * to itself on the managed profile when provisioning completes. The mobile device management - * application sends this extra in an intent with the action - * {@link #ACTION_PROVISION_MANAGED_PROFILE} and receives it in + * A {@link android.os.Parcelable} extra of type {@link android.os.PersistableBundle} that + * allows a mobile device management application which starts managed provisioning to pass data + * to itself. + *

    + * If used with {@link #ACTION_PROVISION_MANAGED_PROFILE} it can be used by the application that + * sends the intent to pass data to itself on the newly created profile. + * If used with {@link #ACTION_PROVISION_MANAGED_DEVICE} it allows passing data to the same + * instance of the app on the primary user. + *

    + * In both cases the application receives the data in * {@link DeviceAdminReceiver#onProfileProvisioningComplete} via an intent with the action * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE}. The bundle is not changed - * during the managed profile provisioning. + * during the managed provisioning. */ public static final String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE";