From a93c333ccc5b12d11d5e393f2588c3c481d98f80 Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Fri, 10 Feb 2023 15:45:02 +0000 Subject: [PATCH] RESTRICT AUTOMERGE Add a hidden `KEYGUARD_DISABLE_SHORTCUTS_ALL` constant to DevicePolicyManager KEYGUARD_DISABLE_SHORTCUTS_ALL is a new keyguard restriction that prohibits shortcuts in the keyguard. Bug: 242851438 Test: cts-tradefed run commandAndExit cts-dev -m CtsAdminTestCases Change-Id: I7ad82a76f3a30f4a757f80978b2711e362cba086 (cherry picked from commit 5f9a8e4ab341341df18dd3a60da2326cff9fc3ee) --- core/java/android/app/admin/DevicePolicyManager.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index bab20615cf77b..097f6222f7a83 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -6637,6 +6637,13 @@ public class DevicePolicyManager { */ public static final int KEYGUARD_DISABLE_IRIS = 1 << 8; + /** + * Disable all keyguard shortcuts. + * + * @hide + */ + public static final int KEYGUARD_DISABLE_SHORTCUTS_ALL = 1 << 9; + /** * NOTE: Please remember to update the DevicePolicyManagerTest's testKeyguardDisabledFeatures * CTS test when adding to the list above. @@ -6680,7 +6687,8 @@ public class DevicePolicyManager { */ public static final int ORG_OWNED_PROFILE_KEYGUARD_FEATURES_PARENT_ONLY = DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA - | DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS; + | DevicePolicyManager.KEYGUARD_DISABLE_SECURE_NOTIFICATIONS + | DevicePolicyManager.KEYGUARD_DISABLE_SHORTCUTS_ALL; /** * Keyguard features that when set on a normal or organization-owned managed profile, have