From 4729106513f3f7e1b46e0e58c2e022bfa42f416c Mon Sep 17 00:00:00 2001 From: Hiroto Tarui Date: Thu, 14 Feb 2019 14:37:09 +0900 Subject: [PATCH] Add CarrierConfig to use WFC home network mode in roaming network Add a config whether the carrier will use the WFC home network mode in roaming netork. Test: manual - Checked that use the WFC mode according to CarrierConfig value. Bug: 79666081 Merged-In: I19fd3818c97db2565e13c5272c5307deef1331d1 Change-Id: I19fd3818c97db2565e13c5272c5307deef1331d1 --- .../telephony/CarrierConfigManager.java | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index aef3dbf5ff26a..e34b1d8b61f4d 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1812,16 +1812,31 @@ public class CarrierConfigManager { /** * Determine whether user can change Wi-Fi Calling preference in roaming. - * {@code false} - roaming preference {@link KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT} is - * the same as home preference {@link KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} - * and cannot be changed. - * {@code true} - roaming preference can be changed by user independently. - * + * {@code false} - roaming preference cannot be changed by user independently. If + * {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is false, + * {@link #KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT} is used as the default + * value. If {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is + * true, roaming preference is the same as home preference and + * {@link #KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} is used as the default value. + * {@code true} - roaming preference can be changed by user independently if + * {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is false. If + * {@link #KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL} is true, this + * configuration is ignored and roaming preference cannot be changed. * @hide */ public static final String KEY_EDITABLE_WFC_ROAMING_MODE_BOOL = "editable_wfc_roaming_mode_bool"; + /** + * Flag specifying whether the carrier will use the WFC home network mode in roaming network. + * {@code false} - roaming preference can be selected separately from the home preference. + * {@code true} - roaming preference is the same as home preference and + * {@link #KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT} is used as the default value. + * @hide + */ + public static final String KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL = + "use_wfc_home_network_mode_in_roaming_network_bool"; + /** * Determine whether current lpp_mode used for E-911 needs to be kept persistently. * {@code false} - not keeping the lpp_mode means using default configuration of gps.conf @@ -2723,6 +2738,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL, false); sDefaults.putStringArray(KEY_FILTERED_CNAP_NAMES_STRING_ARRAY, null); sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false); + sDefaults.putBoolean(KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL, false); sDefaults.putBoolean(KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL, false); sDefaults.putBoolean(KEY_PERSIST_LPP_MODE_BOOL, true); sDefaults.putStringArray(KEY_CARRIER_WIFI_STRING_ARRAY, null);