From 5fe75dc26d55a86f223fa5571b64e30731341564 Mon Sep 17 00:00:00 2001 From: yuemingw Date: Wed, 29 Nov 2017 15:52:56 +0000 Subject: Add DISALLOW_AIRPLANE_MODE. Bug: 67675441 Test: cts test will be added for b/67675455 Design doc: https://docs.google.com/document/d/1rvEg5jE3lMhjH-OA0iTLBUY2opM96fg7BrP81MoPnmg/edit# Change-Id: I902b281695a7e734639c9d6d4852a0e96fea8305 --- core/java/android/os/UserManager.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'core/java/android/os/UserManager.java') diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 9306973210fa..dd9fd93ed472 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -193,6 +193,21 @@ public class UserManager { */ public static final String DISALLOW_SHARE_LOCATION = "no_share_location"; + /** + * Specifies if airplane mode is disallowed on the device. + * + *

This restriction can only be set by the device owner and the profile owner on the + * primary user and it applies globally - i.e. it disables airplane mode on the entire device. + *

The default value is false. + * + *

Key for user restrictions. + *

Type: Boolean + * @see DevicePolicyManager#addUserRestriction(ComponentName, String) + * @see DevicePolicyManager#clearUserRestriction(ComponentName, String) + * @see #getUserRestrictions() + */ + public static final String DISALLOW_AIRPLANE_MODE = "no_airplane_mode"; + /** * Specifies if a user is disallowed from enabling the * "Unknown Sources" setting, that allows installation of apps from unknown sources. -- cgit v1.2.3