From 9a961f570559fff4e1afcf1e11557ac46f979f09 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Thu, 17 Aug 2017 15:58:47 -0700 Subject: [PATCH] De-couple data enabled from VT settings. The existing KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS has the impact of decoupling whether VT is enabled from whether mobile data is enabled. Making this TRUE by default. Adding a new carrier config option to indicate whether VILTE data is metered. This, coupled with KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS allows us to ensure that wifi video calls can be made, while still ensuring that mobile data is not used for VT calls. A carrier config update needs to be made for the few instances where KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS was set true to ensure that KEY_VILTE_DATA_IS_METERED_BOOL is false in that case. Test: Manual Bug: 36900451 Change-Id: I037f8930901907b55e4245a655e0480668549185 --- .../telephony/CarrierConfigManager.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 735f09b57efb7..0f6a968902a2b 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -346,13 +346,28 @@ public class CarrierConfigManager { public static final String KEY_DEFAULT_VM_NUMBER_STRING = "default_vm_number_string"; /** - * Flag indicating whether we should downgrade/terminate VT calls and disable VT when - * data enabled changed (e.g. reach data limit or turn off data). + * When {@code true}, changes to the mobile data enabled switch will not cause the VT + * registration state to change. That is, turning on or off mobile data will not cause VT to be + * enabled or disabled. + * When {@code false}, disabling mobile data will cause VT to be de-registered. + *

+ * See also {@link #KEY_VILTE_DATA_IS_METERED_BOOL}. * @hide */ public static final String KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS = "ignore_data_enabled_changed_for_video_calls"; + /** + * Flag indicating whether data used for a video call over LTE is metered or not. + *

+ * When {@code true}, if the device hits the data limit or data is disabled during a ViLTE call, + * the call will be downgraded to audio-only (or paused if + * {@link #KEY_SUPPORT_PAUSE_IMS_VIDEO_CALLS_BOOL} is {@code true}). + * + * @hide + */ + public static final String KEY_VILTE_DATA_IS_METERED_BOOL = "vilte_data_is_metered_bool"; + /** * Flag specifying whether WFC over IMS should be available for carrier: independent of * carrier provisioning. If false: hard disabled. If true: then depends on carrier @@ -1569,7 +1584,8 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_NOTIFY_HANDOVER_VIDEO_FROM_WIFI_TO_LTE_BOOL, false); sDefaults.putBoolean(KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL, true); sDefaults.putString(KEY_DEFAULT_VM_NUMBER_STRING, ""); - sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, false); + sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, true); + sDefaults.putBoolean(KEY_VILTE_DATA_IS_METERED_BOOL, true); sDefaults.putBoolean(KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL, false);