Add intent extra for a custom consent screen intent
Bug: 210004718 Test: compiled Change-Id: Ibc5e60561923efe0f6f8b3139fc2b9d3aa58737c
This commit is contained in:
@@ -1046,6 +1046,7 @@ package android.app.admin {
|
||||
field @Deprecated public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL";
|
||||
field public static final String EXTRA_PROVISIONING_ORGANIZATION_NAME = "android.app.extra.PROVISIONING_ORGANIZATION_NAME";
|
||||
field public static final String EXTRA_PROVISIONING_RETURN_BEFORE_POLICY_COMPLIANCE = "android.app.extra.PROVISIONING_RETURN_BEFORE_POLICY_COMPLIANCE";
|
||||
field public static final String EXTRA_PROVISIONING_ROLE_HOLDER_CUSTOM_USER_CONSENT_INTENT = "android.app.extra.PROVISIONING_ROLE_HOLDER_CUSTOM_USER_CONSENT_INTENT";
|
||||
field public static final String EXTRA_PROVISIONING_SKIP_OWNERSHIP_DISCLAIMER = "android.app.extra.PROVISIONING_SKIP_OWNERSHIP_DISCLAIMER";
|
||||
field public static final String EXTRA_PROVISIONING_SUPPORTED_MODES = "android.app.extra.PROVISIONING_SUPPORTED_MODES";
|
||||
field public static final String EXTRA_PROVISIONING_SUPPORT_URL = "android.app.extra.PROVISIONING_SUPPORT_URL";
|
||||
|
||||
@@ -2884,6 +2884,38 @@ public class DevicePolicyManager {
|
||||
@SystemApi
|
||||
public static final int RESULT_UPDATE_DEVICE_MANAGEMENT_ROLE_HOLDER_UNRECOVERABLE_ERROR = 2;
|
||||
|
||||
/**
|
||||
* An {@link Intent} extra which resolves to a custom user consent screen.
|
||||
*
|
||||
* <p>If this extra is provided to the device management role holder via either {@link
|
||||
* #ACTION_ROLE_HOLDER_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE} or {@link
|
||||
* #ACTION_ROLE_HOLDER_PROVISION_MANAGED_PROFILE}, the device management role holder must
|
||||
* launch this intent which shows the custom user consent screen, replacing its own standard
|
||||
* consent screen.
|
||||
*
|
||||
* <p>If this extra is provided, it is the responsibility of the intent handler to show the
|
||||
* list of disclaimers which are normally shown by the standard consent screen:
|
||||
* <ul>
|
||||
* <li>Disclaimers set by the IT admin via the {@link #EXTRA_PROVISIONING_DISCLAIMERS}
|
||||
* provisioning extra</li>
|
||||
* <li>For fully-managed device provisioning, disclaimers defined in system apps via the
|
||||
* {@link #EXTRA_PROVISIONING_DISCLAIMER_HEADER} and {@link
|
||||
* #EXTRA_PROVISIONING_DISCLAIMER_CONTENT} metadata in their manifests</li>
|
||||
* <li>General disclaimer relevant to the provisioning mode</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>If the custom consent screens are granted by the user {@link Activity#RESULT_OK} is
|
||||
* returned, otherwise {@link Activity#RESULT_CANCELED} is returned. The device management
|
||||
* role holder should ensure that the provisioning flow terminates immediately if consent
|
||||
* is not granted by the user.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
|
||||
@SystemApi
|
||||
public static final String EXTRA_PROVISIONING_ROLE_HOLDER_CUSTOM_USER_CONSENT_INTENT =
|
||||
"android.app.extra.PROVISIONING_ROLE_HOLDER_CUSTOM_USER_CONSENT_INTENT";
|
||||
|
||||
/**
|
||||
* Maximum supported password length. Kind-of arbitrary.
|
||||
* @hide
|
||||
|
||||
Reference in New Issue
Block a user