diff options
author | 2022-11-01 13:51:58 +0000 | |
---|---|---|
committer | 2022-11-01 13:51:58 +0000 | |
commit | 6c70a328e5c48d1cd727b9b1aaff75fb3e209d95 (patch) | |
tree | 5b02f4bbdc42066ac09dc3a7a89f3faf1eb38cb5 /telephony | |
parent | 0c35c51d711dd1d154d032c7191349190643d89f (diff) | |
parent | 838637c66065281aec40b9bcef86ef1bfe9416ff (diff) |
Merge changes from topic "cukie-2genterprise-user-restriction"
* changes:
Add TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTION
Add DISALLOW_CELLULAR_2G As a New User Restriction
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 70d82701da66..a081bc320921 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -9358,7 +9358,8 @@ public class TelephonyManager { ALLOWED_NETWORK_TYPES_REASON_USER, ALLOWED_NETWORK_TYPES_REASON_POWER, ALLOWED_NETWORK_TYPES_REASON_CARRIER, - ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G + ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G, + ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS, }) @Retention(RetentionPolicy.SOURCE) public @interface AllowedNetworkTypesReason { @@ -9397,6 +9398,15 @@ public class TelephonyManager { public static final int ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G = 3; /** + * To indicate allowed network type change is requested by an update to the + * {@link android.os.UserManager.DISALLOW_CELLULAR_2G} user restriction. + * + * @hide + */ + @SystemApi + public static final int ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS = 4; + + /** * Set the allowed network types of the device and provide the reason triggering the allowed * network change. * <p>Requires permission: android.Manifest.MODIFY_PHONE_STATE or @@ -9488,6 +9498,7 @@ public class TelephonyManager { case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_POWER: case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER: case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G: + case ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS: return true; } return false; |