From 9f80e4bd5a3755c449799c14ecdd2138035e7f85 Mon Sep 17 00:00:00 2001 From: Sooraj Sasindran Date: Thu, 1 Aug 2019 13:52:32 -0700 Subject: [PATCH] Add carrier config for exit hysteresis time Add carrier config for exit hysteresis time which will be used to decide hysteresis time while switching away from opportunisitc network to a primary network Bug: 135556490 Test: Make Merged-In: Ic4916c11ae470f2440481670bc1e25f570e6ece4 Change-Id: Ic4916c11ae470f2440481670bc1e25f570e6ece4 --- .../java/android/telephony/CarrierConfigManager.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 00a49a1d4f5fe..5498cae50362f 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2663,11 +2663,19 @@ public class CarrierConfigManager { /** * Controls hysteresis time in milli seconds for which OpportunisticNetworkService - * will wait before switching data to a network. + * will wait before switching data to an opportunistic network. */ public static final String KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG = "opportunistic_network_data_switch_hysteresis_time_long"; + /** + * Controls hysteresis time in milli seconds for which OpportunisticNetworkService + * will wait before switching data from opportunistic network to primary network. + * @hide + */ + public static final String KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG = + "opportunistic_network_data_switch_exit_hysteresis_time_long"; + /** * Indicates zero or more emergency number prefix(es), because some carrier requires * if users dial an emergency number address with a specific prefix, the combination of the @@ -3411,6 +3419,8 @@ public class CarrierConfigManager { sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_ENTRY_OR_EXIT_HYSTERESIS_TIME_LONG, 10000); /* Default value is 10 seconds. */ sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG, 10000); + /* Default value is 3 seconds. */ + sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG, 3000); sDefaults.putAll(Gps.getDefaults()); sDefaults.putAll(Wifi.getDefaults()); sDefaults.putIntArray(KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY,