Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1029513 authored by Rambo Wang's avatar Rambo Wang Committed by rambowang
Browse files

Expose metered APN types carrier config keys

Public carrier config KEY_CARRIER_METERED_[ROAMING_]APN_TYPES_STRINGS
which has been stable since the initial release in 2016.

With the ability to customize the metered APN type, carriers can improve
user experience by e.g. improving UI or implementing consistent behavior.

Bug: 238634254
Test: atest TelephonyManagerTest#testIsApnMetered
Change-Id: Ia0d7fccfd38156731d491ba3f57c3489f7de8789
parent 48900f82
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -41337,6 +41337,8 @@ package android.telephony {
    field public static final String KEY_CARRIER_INSTANT_LETTERING_ESCAPED_CHARS_STRING = "carrier_instant_lettering_escaped_chars_string";
    field public static final String KEY_CARRIER_INSTANT_LETTERING_INVALID_CHARS_STRING = "carrier_instant_lettering_invalid_chars_string";
    field public static final String KEY_CARRIER_INSTANT_LETTERING_LENGTH_LIMIT_INT = "carrier_instant_lettering_length_limit_int";
    field public static final String KEY_CARRIER_METERED_APN_TYPES_STRINGS = "carrier_metered_apn_types_strings";
    field public static final String KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS = "carrier_metered_roaming_apn_types_strings";
    field public static final String KEY_CARRIER_NAME_OVERRIDE_BOOL = "carrier_name_override_bool";
    field public static final String KEY_CARRIER_NAME_STRING = "carrier_name_string";
    field public static final String KEY_CARRIER_NR_AVAILABILITIES_INT_ARRAY = "carrier_nr_availabilities_int_array";
+45 −4
Original line number Diff line number Diff line
@@ -1138,14 +1138,55 @@ public class CarrierConfigManager {
            "carrier_data_call_permanent_failure_strings";

    /**
     * Default APN types that are metered by the carrier
     * @hide
     * A string array indicating the default APN types that are metered by the carrier.
     *
     * The string in the array is the name of the APN type. For example, "default" for
     * {@link ApnSetting#TYPE_DEFAULT}, "mms" for {@link ApnSetting#TYPE_MMS}, etc.
     *
     * The default value is {@code {"default", "mms", "dun", "supl"}}.
     *
     * @see ApnSetting#TYPE_DEFAULT
     * @see ApnSetting#TYPE_MMS
     * @see ApnSetting#TYPE_SUPL
     * @see ApnSetting#TYPE_DUN
     * @see ApnSetting#TYPE_HIPRI
     * @see ApnSetting#TYPE_FOTA
     * @see ApnSetting#TYPE_IMS
     * @see ApnSetting#TYPE_CBS
     * @see ApnSetting#TYPE_IA
     * @see ApnSetting#TYPE_EMERGENCY
     * @see ApnSetting#TYPE_MCX
     * @see ApnSetting#TYPE_XCAP
     * @see ApnSetting#TYPE_BIP
     * @see ApnSetting#TYPE_VSIM
     * @see ApnSetting#TYPE_ENTERPRISE
     */
    public static final String KEY_CARRIER_METERED_APN_TYPES_STRINGS =
            "carrier_metered_apn_types_strings";

    /**
     * Default APN types that are roaming-metered by the carrier
     * @hide
     * A string array indicating the default APN types that are roaming-metered by the carrier.
     *
     * The string in the array is the name of the APN type. For example, "default" for
     * {@link ApnSetting#TYPE_DEFAULT}, "mms" for {@link ApnSetting#TYPE_MMS}, etc.
     *
     * The default value is {@code {"default", "mms", "dun", "supl"}}.
     *
     * @see ApnSetting#TYPE_DEFAULT
     * @see ApnSetting#TYPE_MMS
     * @see ApnSetting#TYPE_SUPL
     * @see ApnSetting#TYPE_DUN
     * @see ApnSetting#TYPE_HIPRI
     * @see ApnSetting#TYPE_FOTA
     * @see ApnSetting#TYPE_IMS
     * @see ApnSetting#TYPE_CBS
     * @see ApnSetting#TYPE_IA
     * @see ApnSetting#TYPE_EMERGENCY
     * @see ApnSetting#TYPE_MCX
     * @see ApnSetting#TYPE_XCAP
     * @see ApnSetting#TYPE_BIP
     * @see ApnSetting#TYPE_VSIM
     * @see ApnSetting#TYPE_ENTERPRISE
     */
    public static final String KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS =
            "carrier_metered_roaming_apn_types_strings";