From 1de59a9c597b0d83f783d9a029f177b123335a9a Mon Sep 17 00:00:00 2001 From: Yomna Nasser Date: Mon, 18 Jan 2021 22:00:55 +0000 Subject: Implementation of "Enable 2G" for Settings. (1) Adds KEY_HIDE_ENABLE_2G_BOOL to CarrierConfigManager, and (2) Adds new reason ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G. Test: manual & atest -c Enable2gPreferenceControllerTest Bug: b/163168917 Change-Id: I81052549f8dde491697c35365320145fd24c3842 Merged-In: I81052549f8dde491697c35365320145fd24c3842 --- core/api/current.txt | 1 + core/api/system-current.txt | 1 + core/java/android/provider/Telephony.java | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/api/current.txt b/core/api/current.txt index 4d55bf90ad40..c2fac3df90f6 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -39225,6 +39225,7 @@ package android.telephony { field public static final String KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY = "gsm_roaming_networks_string_array"; field public static final String KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL = "has_in_call_noise_suppression_bool"; field public static final String KEY_HIDE_CARRIER_NETWORK_SETTINGS_BOOL = "hide_carrier_network_settings_bool"; + field public static final String KEY_HIDE_ENABLE_2G = "hide_enable_2g_bool"; field public static final String KEY_HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool"; field public static final String KEY_HIDE_IMS_APN_BOOL = "hide_ims_apn_bool"; field public static final String KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL = "hide_lte_plus_data_icon_bool"; diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 68be0bfa1f24..dbd17a91a576 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -10216,6 +10216,7 @@ package android.telephony { field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED"; 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_CARRIER = 2; // 0x2 + 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 = 0; // 0x0 field public static final int CALL_WAITING_STATUS_DISABLED = 2; // 0x2 diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index 9cb76c1ffb5d..753abea2cfe2 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -5284,7 +5284,8 @@ public final class Telephony { * which network types are allowed for * {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER}, * {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_POWER}, - * {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER}. + * {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER}, + * {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G}. *

Type: TEXT

* * @hide -- cgit v1.2.3