summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/admin/DeviceAdminReceiver.java16
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java37
2 files changed, 49 insertions, 4 deletions
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index 00e7da4..6f4533c 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -164,13 +164,21 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
public static final String ACTION_PASSWORD_EXPIRING
= "android.app.action.ACTION_PASSWORD_EXPIRING";
-
/**
- * Action broadcasted when provisioning of a managed profile has completed.
+ * Broadcast Action: This broadcast is sent to the newly created profile when
+ * the provisioning of a managed profile has completed successfully.
+ *
+ * <p>The broadcast is limited to the package which started the provisioning as specified in
+ * the extra {@link DevicePolicyManager#EXTRA_PROVISIONING_MDM_PACKAGE_NAME} of the
+ * {@link DevicePolicyManager#ACTION_PROVISION_MANAGED_PROFILE} intent that started the
+ * provisioning. It is also limited to the managed profile.
+ *
+ * <p>Input: Nothing.</p>
+ * <p>Output: Nothing</p>
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- public static final String ACTION_PROFILE_PROVISIONING_COMPLETE
- = "android.managedprovisioning.ACTION_PROVISIONING_COMPLETE";
+ public static final String ACTION_PROFILE_PROVISIONING_COMPLETE =
+ "android.app.action.ACTION_PROFILE_PROVISIONING_COMPLETE";
/**
* Name under which a DevicePolicy component publishes information
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 1f41c56..e06cf38 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -77,6 +77,43 @@ public class DevicePolicyManager {
}
/**
+ * Activity action: Starts the provisioning flow which sets up a managed profile.
+ * This intent will typically be sent by a mobile device management application(mdm).
+ * Managed profile provisioning creates a profile, moves the mdm to the profile,
+ * sets the mdm as the profile owner and removes all non required applications from the profile.
+ * As a profile owner the mdm than has full control over the managed profile.
+ *
+ * <p>The intent must contain the extras {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME} and
+ * {@link #EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME}.
+ *
+ * <p> When managed provisioning has completed, an intent of the type
+ * {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE} is broadcasted to the
+ * mdm app on the managed profile.
+ *
+ * <p>Input: Nothing.</p>
+ * <p>Output: Nothing</p>
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_PROVISION_MANAGED_PROFILE
+ = "android.managedprovisioning.ACTION_PROVISION_MANAGED_PROFILE";
+
+ /**
+ * A String extra holding the name of the package of the mobile device management application
+ * that starts the managed provisioning flow. This package will be set as the profile owner.
+ * <p>Use with {@link #ACTION_PROVISION_MANAGED_PROFILE}.
+ */
+ public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME
+ = "deviceAdminPackageName";
+
+ /**
+ * A String extra holding the default name of the profile that is created during managed profile
+ * provisioning.
+ * <p>Use with {@link #ACTION_PROVISION_MANAGED_PROFILE}
+ */
+ public static final String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME
+ = "defaultManagedProfileName";
+
+ /**
* Activity action: ask the user to add a new device administrator to the system.
* The desired policy is the ComponentName of the policy in the
* {@link #EXTRA_DEVICE_ADMIN} extra field. This will invoke a UI to