OSDN Git Service

Added IWLAN metered APN support
authorJack Yu <jackyu@google.com>
Sun, 21 May 2017 00:06:33 +0000 (17:06 -0700)
committerJack Yu <jackyu@google.com>
Mon, 22 May 2017 23:52:24 +0000 (16:52 -0700)
If the device is in IWLAN mode, when checking if the APN
type is metered, we read the settings from the IWLAN
metered APN list.

Test: Telephony unit tests
bug: 38304530

Merged-In: I46c9e1a15dd0dd40811d5a959d558fc78608b127
Change-Id: I46c9e1a15dd0dd40811d5a959d558fc78608b127

telephony/java/android/telephony/CarrierConfigManager.java

index 7d22a2c..e3d66e7 100644 (file)
@@ -574,11 +574,19 @@ public class CarrierConfigManager {
     public static final String KEY_CARRIER_METERED_APN_TYPES_STRINGS =
             "carrier_metered_apn_types_strings";
     /**
-     * Default APN types that are roamig-metered by the carrier
+     * Default APN types that are roaming-metered by the carrier
      * @hide
      */
     public static final String KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS =
             "carrier_metered_roaming_apn_types_strings";
+
+    /**
+     * Default APN types that are metered on IWLAN by the carrier
+     * @hide
+     */
+    public static final String KEY_CARRIER_METERED_IWLAN_APN_TYPES_STRINGS =
+            "carrier_metered_iwlan_apn_types_strings";
+
     /**
      * CDMA carrier ERI (Enhanced Roaming Indicator) file name
      * @hide
@@ -1443,6 +1451,9 @@ public class CarrierConfigManager {
                 new String[]{"default", "mms", "dun", "supl"});
         sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS,
                 new String[]{"default", "mms", "dun", "supl"});
+        // By default all APNs are unmetered if the device is on IWLAN.
+        sDefaults.putStringArray(KEY_CARRIER_METERED_IWLAN_APN_TYPES_STRINGS,
+                new String[]{});
 
         sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY,
                 new int[]{