summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java53
1 files changed, 40 insertions, 13 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index bd2445a9adf1..fd81a21aabee 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -48,6 +48,7 @@ import android.telephony.ims.feature.RcsFeature;
import com.android.internal.telephony.ICarrierConfigLoader;
import com.android.telephony.Rlog;
+import java.util.List;
import java.util.concurrent.TimeUnit;
/**
@@ -559,9 +560,9 @@ public class CarrierConfigManager {
KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool";
/**
- * List of RIL radio technologies (See {@link ServiceState} {@code RIL_RADIO_TECHNOLOGY_*}
- * constants) which support only a single data connection at a time. Some carriers do not
- * support multiple pdp on UMTS.
+ * List of network type constants which support only a single data connection at a time.
+ * Some carriers do not support multiple PDP on UMTS.
+ * @see TelephonyManager NETWORK_TYPE_*
*/
public static final String
KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY = "only_single_dc_allowed_int_array";
@@ -3669,11 +3670,19 @@ public class CarrierConfigManager {
public static final String KEY_5G_WATCHDOG_TIME_MS_LONG = "5g_watchdog_time_ms_long";
/**
- * Which NR types are unmetered. A string array containing the following keys:
+ * Which network types are unmetered. A string array that can contain network type names from
+ * {@link TelephonyManager#getNetworkTypeName(int)} in addition to the following NR keys:
* NR_NSA - NR NSA is unmetered for sub-6 frequencies
* NR_NSA_MMWAVE - NR NSA is unmetered for mmwave frequencies
* NR_SA - NR SA is unmetered for sub-6 frequencies
* NR_SA_MMWAVE - NR SA is unmetered for mmwave frequencies
+ *
+ * Note that this config only applies if an unmetered SubscriptionPlan is set via
+ * {@link SubscriptionManager#setSubscriptionPlans(int, List)} or an unmetered override is set
+ * via {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, int[], long)}
+ * or {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, long)}.
+ * If neither SubscriptionPlans nor an override are set, then no network types can be unmetered
+ * regardless of the value of this config.
* TODO: remove other unmetered keys and replace with this
* @hide
*/
@@ -3681,6 +3690,27 @@ public class CarrierConfigManager {
"unmetered_network_types_string_array";
/**
+ * Which network types are unmetered when roaming. A string array that can contain network type
+ * names from {@link TelephonyManager#getNetworkTypeName(int)} in addition to the following
+ * NR keys:
+ * NR_NSA - NR NSA is unmetered when roaming for sub-6 frequencies
+ * NR_NSA_MMWAVE - NR NSA is unmetered when roaming for mmwave frequencies
+ * NR_SA - NR SA is unmetered when roaming for sub-6 frequencies
+ * NR_SA_MMWAVE - NR SA is unmetered when roaming for mmwave frequencies
+ *
+ * Note that this config only applies if an unmetered SubscriptionPlan is set via
+ * {@link SubscriptionManager#setSubscriptionPlans(int, List)} or an unmetered override is set
+ * via {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, int[], long)}
+ * or {@link SubscriptionManager#setSubscriptionOverrideUnmetered(int, boolean, long)}.
+ * If neither SubscriptionPlans nor an override are set, then no network types can be unmetered
+ * when roaming regardless of the value of this config.
+ * TODO: remove KEY_UNMETERED_NR_NSA_WHEN_ROAMING_BOOL and replace with this
+ * @hide
+ */
+ public static final String KEY_ROAMING_UNMETERED_NETWORK_TYPES_STRING_ARRAY =
+ "roaming_unmetered_network_types_string_array";
+
+ /**
* Whether NR (non-standalone) should be unmetered for all frequencies.
* If either {@link #KEY_UNMETERED_NR_NSA_MMWAVE_BOOL} or
* {@link #KEY_UNMETERED_NR_NSA_SUB6_BOOL} are true, then this value will be ignored.
@@ -5919,14 +5949,9 @@ public class CarrierConfigManager {
sDefaults.putStringArray(KEY_CARRIER_WLAN_DISALLOWED_APN_TYPES_STRING_ARRAY,
new String[]{""});
sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY,
- new int[]{
- 4, /* IS95A */
- 5, /* IS95B */
- 6, /* 1xRTT */
- 7, /* EVDO_0 */
- 8, /* EVDO_A */
- 12 /* EVDO_B */
- });
+ new int[] {TelephonyManager.NETWORK_TYPE_CDMA, TelephonyManager.NETWORK_TYPE_1xRTT,
+ TelephonyManager.NETWORK_TYPE_EVDO_0, TelephonyManager.NETWORK_TYPE_EVDO_A,
+ TelephonyManager.NETWORK_TYPE_EVDO_B});
sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putString(KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING, null);
@@ -6269,7 +6294,9 @@ public class CarrierConfigManager {
sDefaults.putInt(KEY_NR_ADVANCED_CAPABLE_PCO_ID_INT, 0);
sDefaults.putBoolean(KEY_ENABLE_NR_ADVANCED_WHILE_ROAMING_BOOL, true);
sDefaults.putBoolean(KEY_LTE_ENDC_USING_USER_DATA_FOR_RRC_DETECTION_BOOL, false);
- sDefaults.putStringArray(KEY_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[0]);
+ sDefaults.putStringArray(KEY_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[] {
+ "NR_NSA", "NR_NSA_MMWAVE", "NR_SA", "NR_SA_MMWAVE"});
+ sDefaults.putStringArray(KEY_ROAMING_UNMETERED_NETWORK_TYPES_STRING_ARRAY, new String[0]);
sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_BOOL, false);
sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_MMWAVE_BOOL, false);
sDefaults.putBoolean(KEY_UNMETERED_NR_NSA_SUB6_BOOL, false);