From 7c711e2fd005873b7ead3c861dbeff4227a2abef Mon Sep 17 00:00:00 2001 From: Gil Cukierman Date: Thu, 26 Jan 2023 20:29:33 +0000 Subject: [PATCH] Remove ALLOWED_NETWORK_TYPES_USER_RESTRICTIONS The constant is not needed for 2g admin policies. Bug: 266472206 Test: atest TelephonyManagerTest # cts test coverage Change-Id: Ia6dc4a8b0bc2f7db5ede9a82105dfcd5929f064f --- core/api/system-current.txt | 1 - .../java/android/telephony/TelephonyManager.java | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index c098adb7ea5d5..b2a1755dae5ea 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -14345,7 +14345,6 @@ package android.telephony { field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED"; field public static final int ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G = 3; // 0x3 field public static final int ALLOWED_NETWORK_TYPES_REASON_POWER = 1; // 0x1 - field public static final int ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS = 4; // 0x4 field public static final int CALL_WAITING_STATUS_DISABLED = 2; // 0x2 field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1 field public static final int CALL_WAITING_STATUS_FDN_CHECK_FAILURE = 5; // 0x5 diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 0921834436bda..c65faea3110e8 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -9432,7 +9432,6 @@ public class TelephonyManager { ALLOWED_NETWORK_TYPES_REASON_POWER, ALLOWED_NETWORK_TYPES_REASON_CARRIER, ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G, - ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS, }) @Retention(RetentionPolicy.SOURCE) public @interface AllowedNetworkTypesReason { @@ -9470,15 +9469,6 @@ public class TelephonyManager { @SystemApi 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. @@ -9503,7 +9493,6 @@ public class TelephonyManager { * {@link android.Manifest.permission#MODIFY_PHONE_STATE} permissions. *
    *
  1. {@code TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G}
  2. - *
  3. {@code TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_USER_RESTRICTIONS}
  4. *
*/ @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @@ -9578,7 +9567,6 @@ 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;