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

Commit 9da3bf1f authored by Yan Yan's avatar Yan Yan
Browse files

APIs to enable data stall handling in VCN

This commit expose APIs to set VCN Gateway Options for additional VCN
abilities, and the option to allow VCN to detect suspected data stall
and recover with IKE mobility update.

Bug: 261499808
Test: make update-api && make
API-Coverage-Bug: 262297702
Change-Id: If8097d587e7099e9bb9a43328dad3cac3cfb9703
parent 7c2f26f0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -27301,13 +27301,17 @@ package android.net.vcn {
    method @IntRange(from=0x500) public int getMaxMtu();
    method @NonNull public long[] getRetryIntervalsMillis();
    method @NonNull public java.util.List<android.net.vcn.VcnUnderlyingNetworkTemplate> getVcnUnderlyingNetworkPriorities();
    method public boolean hasGatewayOption(int);
    field public static final int VCN_GATEWAY_OPTION_ENABLE_DATA_STALL_RECOVERY_WITH_MOBILITY = 0; // 0x0
  }
  public static final class VcnGatewayConnectionConfig.Builder {
    ctor public VcnGatewayConnectionConfig.Builder(@NonNull String, @NonNull android.net.ipsec.ike.IkeTunnelConnectionParams);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder addExposedCapability(int);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder addGatewayOption(int);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig build();
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder removeExposedCapability(int);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder removeGatewayOption(int);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setMaxMtu(@IntRange(from=0x500) int);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryIntervalsMillis(@NonNull long[]);
    method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setVcnUnderlyingNetworkPriorities(@NonNull java.util.List<android.net.vcn.VcnUnderlyingNetworkTemplate>);
+3 −7
Original line number Diff line number Diff line
@@ -137,8 +137,6 @@ public final class VcnGatewayConnectionConfig {
     * <p>If set, the gatway connection will monitor the data stall detection of the VCN network.
     * When there is a suspected data stall, the gateway connection will attempt recovery by
     * performing a mobility update on the underlying IKE session.
     *
     * @hide
     */
    public static final int VCN_GATEWAY_OPTION_ENABLE_DATA_STALL_RECOVERY_WITH_MOBILITY = 0;

@@ -147,8 +145,7 @@ public final class VcnGatewayConnectionConfig {
    @IntDef(
            prefix = {"VCN_GATEWAY_OPTION_"},
            value = {
                // TODO: b/261499808 Add VCN_GATEWAY_OPTION_ENABLE_DATA_STALL_RECOVERY_WITH_MOBILITY
                // when it is exposed
                VCN_GATEWAY_OPTION_ENABLE_DATA_STALL_RECOVERY_WITH_MOBILITY,
            })
    public @interface VcnGatewayOption {}

@@ -460,7 +457,8 @@ public final class VcnGatewayConnectionConfig {
     *
     * @param option the option to check.
     * @throws IllegalArgumentException if the provided option is invalid.
     * @hide
     * @see Builder#addGatewayOption(int)
     * @see Builder#removeGatewayOption(int)
     */
    public boolean hasGatewayOption(@VcnGatewayOption int option) {
        validateGatewayOption(option);
@@ -711,7 +709,6 @@ public final class VcnGatewayConnectionConfig {
         * @param option the option to be enabled
         * @return this {@link Builder} instance, for chaining
         * @throws IllegalArgumentException if the provided option is invalid
         * @hide
         */
        @NonNull
        public Builder addGatewayOption(@VcnGatewayOption int option) {
@@ -726,7 +723,6 @@ public final class VcnGatewayConnectionConfig {
         * @param option the option to be disabled
         * @return this {@link Builder} instance, for chaining
         * @throws IllegalArgumentException if the provided option is invalid
         * @hide
         */
        @NonNull
        public Builder removeGatewayOption(@VcnGatewayOption int option) {