diff options
| author | 2022-01-11 17:05:16 +0000 | |
|---|---|---|
| committer | 2022-01-20 12:17:24 +0000 | |
| commit | d3a5461b7ff0f90ec63fa439c0b7587b2656761f (patch) | |
| tree | 23f97191407c1344e3ad99c403a1de88eaac7dc2 | |
| parent | ce65b04d56109b19c393818e8ea6ecb0a9d46540 (diff) | |
Add EXTRA_PROVISIONING_ALLOW_OFFLINE
Bug: 214038662
Test: compiled
Change-Id: I9056ea20c25c9f5c1116c54503cfcae97e58c6ae
| -rw-r--r-- | core/api/current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 69422212fb84..8b2b12897e6b 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -7554,6 +7554,7 @@ package android.app.admin { field public static final String EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE = "android.app.extra.PROVISIONING_ACCOUNT_TO_MIGRATE"; field public static final String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.PROVISIONING_ADMIN_EXTRAS_BUNDLE"; field public static final String EXTRA_PROVISIONING_ALLOWED_PROVISIONING_MODES = "android.app.extra.PROVISIONING_ALLOWED_PROVISIONING_MODES"; + field public static final String EXTRA_PROVISIONING_ALLOW_OFFLINE = "android.app.extra.PROVISIONING_ALLOW_OFFLINE"; field public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME = "android.app.extra.PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME"; field public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE = "android.app.extra.PROVISIONING_DEVICE_ADMIN_MINIMUM_VERSION_CODE"; field public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM"; diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 96825933b17c..658dcf393d5d 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -622,6 +622,32 @@ public class DevicePolicyManager { "android.app.extra.FORCE_UPDATE_ROLE_HOLDER"; /** + * A boolean extra indicating whether offline provisioning is allowed. + * + * <p>For the online provisioning flow, there will be an attempt to download and install + * the latest version of the device management role holder. The platform will then delegate + * provisioning to the device management role holder via role holder-specific provisioning + * actions. + * + * <p>For the offline provisioning flow, the provisioning flow will always be handled by + * the platform. + * + * <p>If this extra is set to {@code false}, the provisioning flow will enforce that an + * internet connection is established, which will start the online provisioning flow. If an + * internet connection cannot be established, provisioning will fail. + * + * <p>If this extra is set to {@code true}, the provisioning flow will still try to connect to + * the internet, but if it fails it will start the offline provisioning flow. + * + * <p>The default value is {@code false}. + * + * <p>This extra is respected when provided via the provisioning intent actions such as {@link + * #ACTION_PROVISION_MANAGED_PROFILE}. + */ + public static final String EXTRA_PROVISIONING_ALLOW_OFFLINE = + "android.app.extra.PROVISIONING_ALLOW_OFFLINE"; + + /** * Action: Bugreport sharing with device owner has been accepted by the user. * * @hide |