From 4582f8113d1f072087b57acbc915cc066f93917d Mon Sep 17 00:00:00 2001 From: Alan Treadway Date: Tue, 28 Jul 2015 11:49:35 +0100 Subject: [PATCH] Update documentation of DevicePolicyManager intents. Add additional information about the intentions of result codes in device-owner and profile-owner launch intents, in alignment with changes made in http://ag/732321. Bug: 21063241 Change-Id: I0e0a931739cee5f46e8fc7622fe1de49e26dcb0a --- core/java/android/app/admin/DevicePolicyManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index f21422e0d7cb8..8c09e7a5c5d56 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -124,6 +124,12 @@ public class DevicePolicyManager { * *

If provisioning fails, the managedProfile is removed so the device returns to its * previous state. + * + *

If launched with {@link android.app.Activity#startActivityForResult(Intent, int)} a + * result code of {@link android.app.Activity#RESULT_OK} implies that the synchronous part of + * the provisioning flow was successful, although this doesn't guarantee the full flow will + * succeed. Conversely a result code of {@link android.app.Activity#RESULT_CANCELED} implies + * that the user backed-out of provisioning, or some precondition for provisioning wasn't met. */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_PROVISION_MANAGED_PROFILE @@ -158,6 +164,10 @@ public class DevicePolicyManager { * *

If provisioning fails, the device is factory reset. * + *

A result code of {@link android.app.Activity#RESULT_OK} implies that the synchronous part + * of the provisioning flow was successful, although this doesn't guarantee the full flow will + * succeed. Conversely a result code of {@link android.app.Activity#RESULT_CANCELED} implies + * that the user backed-out of provisioning, or some precondition for provisioning wasn't met. */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_PROVISION_MANAGED_DEVICE