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

Commit 5e72532a authored by chiachangwang's avatar chiachangwang
Browse files

Add KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT in CarrierConfigManager

Add a new key to support keepalive customization for different
carriers to support dynamic keepalive. The default value will be
5 minutes when there is no customization.

Bug: 259000745
Test: m make update-api
Change-Id: I3e7950b925c9720afaed35dbfd09bb25e135ef44
parent c891d164
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -446,6 +446,10 @@ package android.telecom {

package android.telephony {

  public class CarrierConfigManager {
    field public static final String KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT = "min_udp_port_4500_nat_timeout_sec_int";
  }

  public abstract class CellSignalStrength {
    method public static int getNumSignalStrengthLevels();
  }
+13 −0
Original line number Diff line number Diff line
@@ -4307,6 +4307,18 @@ public class CarrierConfigManager {
    public static final String KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG =
            "data_switch_validation_timeout_long";

    /**
     * The minimum timeout of UDP port 4500 NAT / firewall entries on the Internet PDN of this
     * carrier network. This will be used by Android platform VPNs to tune IPsec NAT keepalive
     * interval. If this value is too low to provide uninterrupted inbound connectivity, then
     * Android system VPNs may indicate to applications that the VPN cannot support long-lived
     * TCP connections.
     * @hide
     */
    @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
    public static final String KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT =
            "min_udp_port_4500_nat_timeout_sec_int";

    /**
     * Specifies whether the system should prefix the EAP method to the anonymous identity.
     * The following prefix will be added if this key is set to TRUE:
@@ -9130,6 +9142,7 @@ public class CarrierConfigManager {
        sDefaults.putStringArray(KEY_MMI_TWO_DIGIT_NUMBER_PATTERN_STRING_ARRAY, new String[0]);
        sDefaults.putInt(KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT,
                CellSignalStrengthLte.USE_RSRP);
        sDefaults.putInt(KEY_MIN_UDP_PORT_4500_NAT_TIMEOUT_SEC_INT, 300);
        // Default wifi configurations.
        sDefaults.putAll(Wifi.getDefaults());
        sDefaults.putBoolean(ENABLE_EAP_METHOD_PREFIX_BOOL, false);