diff options
| -rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index bd3a2fbdce15..90a61f9aa207 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -2842,6 +2842,28 @@ public class CarrierConfigManager { "ping_test_before_data_switch_bool"; /** + * Controls whether to switch data to primary from opportunistic subscription + * if primary is out of service. This control only affects system or 1st party app + * initiated data switch, but will not override data switch initiated by privileged carrier apps + * This carrier config is used to disable this feature. + * @hide + */ + public static final String KEY_SWITCH_DATA_TO_PRIMARY_IF_PRIMARY_IS_OOS_BOOL = + "switch_data_to_primary_if_primary_is_oos_bool"; + + /** + * Controls back off time in milli seconds for switching back to + * opportunistic subscription. This time will be added to + * {@link CarrierConfigManager#KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_HYSTERESIS_TIME_LONG} to + * determine hysteresis time if there is frequent switching + * (determined by system app or 1st party app) between primary and opportunistic + * subscription. + * @hide + */ + public static final String KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG = + "opportunistic_network_backoff_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 * prefix and the address is also a valid emergency number to dial. For example, an emergency @@ -3648,6 +3670,9 @@ public class CarrierConfigManager { /* Default value is 3 seconds. */ sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_DATA_SWITCH_EXIT_HYSTERESIS_TIME_LONG, 3000); sDefaults.putBoolean(KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL, true); + sDefaults.putBoolean(KEY_SWITCH_DATA_TO_PRIMARY_IF_PRIMARY_IS_OOS_BOOL, true); + /* Default value is 10 seconds. */ + sDefaults.putLong(KEY_OPPORTUNISTIC_NETWORK_BACKOFF_TIME_LONG, 10000); sDefaults.putAll(Gps.getDefaults()); sDefaults.putAll(Wifi.getDefaults()); sDefaults.putIntArray(KEY_CDMA_ENHANCED_ROAMING_INDICATOR_FOR_HOME_NETWORK_INT_ARRAY, |