diff options
| author | Mahaver Chopra <mahaver@google.com> | 2016-11-01 21:25:59 +0000 |
|---|---|---|
| committer | Mahaver Chopra <mahaver@google.com> | 2016-11-25 16:29:44 +0000 |
| commit | 3c58cfe2d98219ec2628835d08ee964c0208ecd7 (patch) | |
| tree | ca9e6441d0d2e39488bc4a837d9588aad5dacbe3 /core/java | |
| parent | 88dea2dd23e3df5f87826aa6e524233f37b17588 (diff) | |
Add provisioning successful intent
Add a new activity intent action which will be launched after
provisioning has successfully completed.
Currently when provisioning is done we junt send an ordered broadcast
for PO and a normal brodcast for DO case. This results in HOME screen
being launched for 2 sec. To remove this jank we have introduced a
new intent action which can be directly received by the DPC in their
post provisioning activity.
Test: b/33138551, this bug tracks the cts coverage for the new action.
Bug: 30956199
Change-Id: I889b0cec74799bb7be93de48d46d5da68f17be92
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 29 |
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 538e52b97013..d53cfdecc9bb 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -158,6 +158,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. * @@ -232,6 +237,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 @@ -321,6 +330,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 @@ -733,6 +746,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. * |
