From d2958fd83c1bd8b6288e7fd4500910634533ae76 Mon Sep 17 00:00:00 2001 From: arangelov Date: Thu, 9 Dec 2021 19:21:04 +0000 Subject: [PATCH] Add provisioning extra to keep screen on Bug: 210000671 Test: compiled Change-Id: I2bc0ca2c0dfcab5f152d1e5d5ea1c4ce349a02f2 --- core/api/current.txt | 1 + .../android/app/admin/DevicePolicyManager.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index 18dfc55c919d1..94f419a226e6d 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -7504,6 +7504,7 @@ package android.app.admin { field @Deprecated public static final String EXTRA_PROVISIONING_EMAIL_ADDRESS = "android.app.extra.PROVISIONING_EMAIL_ADDRESS"; field public static final String EXTRA_PROVISIONING_IMEI = "android.app.extra.PROVISIONING_IMEI"; field public static final String EXTRA_PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION = "android.app.extra.PROVISIONING_KEEP_ACCOUNT_ON_MIGRATION"; + field public static final String EXTRA_PROVISIONING_KEEP_SCREEN_ON = "android.app.extra.PROVISIONING_KEEP_SCREEN_ON"; field public static final String EXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED = "android.app.extra.PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED"; field public static final String EXTRA_PROVISIONING_LOCALE = "android.app.extra.PROVISIONING_LOCALE"; field public static final String EXTRA_PROVISIONING_LOCAL_TIME = "android.app.extra.PROVISIONING_LOCAL_TIME"; diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index ee74bb875a357..7d3d041d75af7 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -2903,6 +2903,20 @@ public class DevicePolicyManager { public static final String EXTRA_PROVISIONING_RETURN_BEFORE_POLICY_COMPLIANCE = "android.app.extra.PROVISIONING_RETURN_BEFORE_POLICY_COMPLIANCE"; + /** + * A {@code boolean} flag that indicates whether the screen should be on throughout the + * provisioning flow. + * + *

The default value is {@code false}. + * + *

This extra can either be passed as an extra to the {@link + * #ACTION_PROVISION_MANAGED_PROFILE} intent, or it can be returned by the + * admin app when performing the admin-integrated provisioning flow as a result of the + * {@link #ACTION_GET_PROVISIONING_MODE} activity. + */ + public static final String EXTRA_PROVISIONING_KEEP_SCREEN_ON = + "android.app.extra.PROVISIONING_KEEP_SCREEN_ON"; + /** * Activity action: Starts the administrator to show policy compliance for the provisioning. * This action is used any time that the administrator has an opportunity to show policy