From b1a0f5fe1ad6e5ddbf393e3f75da020849c6ca70 Mon Sep 17 00:00:00 2001 From: arangelov Date: Tue, 1 Mar 2022 13:46:36 +0000 Subject: [PATCH] Javadoc improvements related to the device policy management role holder updater Fixes: 222073736 Test: none Change-Id: I42c6b85aab11e89d74c549df938dfe79b0c64eaa --- .../app/admin/DevicePolicyManager.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index b944468f10b10..76a8d4d970710 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -242,6 +242,17 @@ public class DevicePolicyManager { * 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. + * + *

If a device policy management role holder (DPMRH) updater is present on the device, an + * internet connection attempt must be made prior to launching this intent. If internet + * connection could not be established, provisioning will fail unless {@link + * #EXTRA_PROVISIONING_ALLOW_OFFLINE} is explicitly set to {@code true}, in which case + * provisioning will continue without using the DPMRH. If an internet connection has been + * established, the DPMRH updater will be launched, which will update the DPMRH if it's not + * present on the device, or if it's present and not valid. + * + *

If a DPMRH is present on the device and valid, the provisioning flow will be deferred to + * it. */ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) public static final String ACTION_PROVISION_MANAGED_PROFILE @@ -398,6 +409,23 @@ public class DevicePolicyManager { * by a privileged app with the permission * {@link android.Manifest.permission#DISPATCH_PROVISIONING_MESSAGE}. * + *

If a device policy management role holder (DPMRH) updater is present on the device, an + * internet connection attempt must be made prior to launching this intent. If internet + * connection could not be established, provisioning will fail unless {@link + * #EXTRA_PROVISIONING_ALLOW_OFFLINE} is explicitly set to {@code true}, in which case + * provisioning will continue without using the DPMRH. If an internet connection has been + * established, the DPMRH updater will be launched via {@link + * #ACTION_UPDATE_DEVICE_MANAGEMENT_ROLE_HOLDER}, which will update the DPMRH if it's not + * present on the device, or if it's present and not valid. + * + *

A DPMRH is considered valid if it has intent filters for {@link + * #ACTION_ROLE_HOLDER_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE}, {@link + * #ACTION_ROLE_HOLDER_PROVISION_MANAGED_PROFILE} and {@link + * #ACTION_ROLE_HOLDER_PROVISION_FINALIZATION}. + * + *

If a DPMRH is present on the device and valid, the provisioning flow will be deferred to + * it via the {@link #ACTION_ROLE_HOLDER_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE} intent. + * *

The provisioning intent contains the following properties: *

* + *

If a device policy management role holder (DPMRH) is present on the device and + * valid, the provisioning flow will be deferred to it via the {@link + * #ACTION_ROLE_HOLDER_PROVISION_FINALIZATION} intent. + * * @hide */ @SystemApi