From 12b0496944381437a1e9974b0e79f56e766bbbdc Mon Sep 17 00:00:00 2001 From: Lenka Trochtova Date: Tue, 29 Nov 2016 21:00:12 +0100 Subject: [PATCH] Make UserManager#DISALLOW_OEM_UNLOCK a system API. This is needed for unbundling of OobConfig app. Test: gts-tradefed run gts -m GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerUserRestrictionTest#testDisallowOemUnlock_canSetWithSystemApi Test: gts-tradefed run gts -m GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerUserRestrictionTest#testDisallowOemUnlock_doCannotSet BUG: 32974379 Change-Id: I7710df96006821a5d0eddfe0b411dd3efa0e10f0 --- api/system-current.txt | 1 + core/java/android/os/UserManager.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index da1517636fc80..1ced79cfa8e67 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -32395,6 +32395,7 @@ package android.os { field public static final java.lang.String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts"; field public static final java.lang.String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media"; field public static final java.lang.String DISALLOW_NETWORK_RESET = "no_network_reset"; + field public static final java.lang.String DISALLOW_OEM_UNLOCK = "no_oem_unlock"; field public static final java.lang.String DISALLOW_OUTGOING_BEAM = "no_outgoing_beam"; field public static final java.lang.String DISALLOW_OUTGOING_CALLS = "no_outgoing_calls"; field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user"; diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 0d3b32858f85e..2c0b2a0bfc968 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -634,11 +634,14 @@ public class UserManager { * false. Setting this restriction has no effect if the bootloader is already * unlocked. * + *

Not for use by third-party applications. + * * @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see #getUserRestrictions() * @hide */ + @SystemApi public static final String DISALLOW_OEM_UNLOCK = "no_oem_unlock"; /**