diff --git a/core/api/current.txt b/core/api/current.txt index a87bb4a209c8e..80cc6a098b3ba 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -27288,6 +27288,8 @@ package android.net.vcn { ctor public VcnCellUnderlyingNetworkTemplate.Builder(); method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate build(); method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder setMetered(int); + method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder setMinDownstreamBandwidthKbps(int, int); + method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder setMinUpstreamBandwidthKbps(int, int); method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder setOperatorPlmnIds(@NonNull java.util.Set); method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder setOpportunistic(int); method @NonNull public android.net.vcn.VcnCellUnderlyingNetworkTemplate.Builder setRoaming(int); @@ -27348,6 +27350,10 @@ package android.net.vcn { public abstract class VcnUnderlyingNetworkTemplate { method public int getMetered(); + method public int getMinEntryDownstreamBandwidthKbps(); + method public int getMinEntryUpstreamBandwidthKbps(); + method public int getMinExitDownstreamBandwidthKbps(); + method public int getMinExitUpstreamBandwidthKbps(); field public static final int MATCH_ANY = 0; // 0x0 field public static final int MATCH_FORBIDDEN = 2; // 0x2 field public static final int MATCH_REQUIRED = 1; // 0x1 @@ -27361,6 +27367,8 @@ package android.net.vcn { ctor public VcnWifiUnderlyingNetworkTemplate.Builder(); method @NonNull public android.net.vcn.VcnWifiUnderlyingNetworkTemplate build(); method @NonNull public android.net.vcn.VcnWifiUnderlyingNetworkTemplate.Builder setMetered(int); + method @NonNull public android.net.vcn.VcnWifiUnderlyingNetworkTemplate.Builder setMinDownstreamBandwidthKbps(int, int); + method @NonNull public android.net.vcn.VcnWifiUnderlyingNetworkTemplate.Builder setMinUpstreamBandwidthKbps(int, int); method @NonNull public android.net.vcn.VcnWifiUnderlyingNetworkTemplate.Builder setSsids(@NonNull java.util.Set); } diff --git a/core/java/android/net/vcn/VcnCellUnderlyingNetworkTemplate.java b/core/java/android/net/vcn/VcnCellUnderlyingNetworkTemplate.java index 44fe94ca18445..69e63133eb036 100644 --- a/core/java/android/net/vcn/VcnCellUnderlyingNetworkTemplate.java +++ b/core/java/android/net/vcn/VcnCellUnderlyingNetworkTemplate.java @@ -375,40 +375,33 @@ public final class VcnCellUnderlyingNetworkTemplate extends VcnUnderlyingNetwork } /** - * Set the minimum accepted entry and exit upstream bandwidth allowed by this template. + * Set the minimum upstream bandwidths that this template will match. * - *

The minimum upstream bandwidth condition allows for separate entry and exit - * thresholds, allowing for a margin of confidence before matching a network, while - * requiring a minimum bandwidth to continue being matching. In order to match this - * template, a network must fulfill one of the following two cases, depending on whether the - * network being evaluated is the Gateway Connection's underlying network: + *

This template will not match a network that does not provide at least the bandwidth + * passed as the entry bandwidth, except in the case that the network is selected as the VCN + * Gateway Connection's underlying network, where it will continue to match until the + * bandwidth drops under the exit bandwidth. * - *

- * - *

To prevent a network from being selected (fulfilling the entry criteria), and yet be - * unable to meet the conditions for staying selected (exit criteria), the entry criteria - * MUST be greater than, or equal to the exit criteria. + *

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the + * invalid case where a network fulfills the entry criteria, but at the same time fails the + * exit criteria. * *

Estimated bandwidth of a network is provided by the transport layer, and reported in * {@link NetworkCapabilities}. The provided estimates will be used without modification. * - * @param minEntryUpstreamBandwidthKbps the minimum accepted upstream bandwidth for a - * network that IS NOT an already-selected underlying network, or {@code 0} to disable - * this requirement. MUST be greater than, or equal to minExitUpstreamBandwidthKbps. - * Defaults to {@code 0} + * @param minEntryUpstreamBandwidthKbps the minimum accepted upstream bandwidth for networks + * that ARE NOT the already-selected underlying network, or {@code 0} to disable this + * requirement. Disabled by default. * @param minExitUpstreamBandwidthKbps the minimum accepted upstream bandwidth for a network * that IS the already-selected underlying network, or {@code 0} to disable this - * requirement. MUST be less than, or equal to minEntryUpstreamBandwidthKbps. Defaults - * to {@code 0} + * requirement. Disabled by default. * @return this {@link Builder} instance, for chaining - * @hide */ @NonNull + // The getter for the two integers are separated, and in the superclass. Please see {@link + // VcnUnderlyingNetworkTemplate#getMinEntryUpstreamBandwidthKbps()} and {@link + // VcnUnderlyingNetworkTemplate#getMinExitUpstreamBandwidthKbps()} + @SuppressLint("MissingGetterMatchingBuilder") public Builder setMinUpstreamBandwidthKbps( int minEntryUpstreamBandwidthKbps, int minExitUpstreamBandwidthKbps) { validateMinBandwidthKbps(minEntryUpstreamBandwidthKbps, minExitUpstreamBandwidthKbps); @@ -420,40 +413,33 @@ public final class VcnCellUnderlyingNetworkTemplate extends VcnUnderlyingNetwork } /** - * Set the minimum acceptable downstream bandwidths allowed by this template. + * Set the minimum upstream bandwidths that this template will match. * - *

The minimum downstream bandwidth condition allows for separate entry and exit - * thresholds, allowing for a margin of confidence before matching a network, while - * requiring a minimum bandwidth to continue being matching. In order to match this - * template, a network must fulfill one of the following two cases, depending on whether the - * network being evaluated is the Gateway Connection's underlying network: + *

This template will not match a network that does not provide at least the bandwidth + * passed as the entry bandwidth, except in the case that the network is selected as the VCN + * Gateway Connection's underlying network, where it will continue to match until the + * bandwidth drops under the exit bandwidth. * - *

- * - *

To prevent a network from being selected (fulfilling the entry criteria), and yet be - * unable to meet the conditions for staying selected (exit criteria), the entry criteria - * MUST be greater than, or equal to the exit criteria. + *

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the + * invalid case where a network fulfills the entry criteria, but at the same time fails the + * exit criteria. * *

Estimated bandwidth of a network is provided by the transport layer, and reported in * {@link NetworkCapabilities}. The provided estimates will be used without modification. * - * @param minEntryDownstreamBandwidthKbps the minimum accepted downstream bandwidth for a - * network that IS NOT an already-selected underlying network, or {@code 0} to disable - * this requirement. MUST be greater than, or equal to minExitDownstreamBandwidthKbps. - * Defaults to {@code 0} + * @param minEntryDownstreamBandwidthKbps the minimum accepted downstream bandwidth for + * networks that ARE NOT the already-selected underlying network, or {@code 0} to + * disable this requirement. Disabled by default. * @param minExitDownstreamBandwidthKbps the minimum accepted downstream bandwidth for a * network that IS the already-selected underlying network, or {@code 0} to disable this - * requirement. MUST be less than, or equal to minEntryDownstreamBandwidthKbps. Defaults - * to {@code 0} + * requirement. Disabled by default. * @return this {@link Builder} instance, for chaining - * @hide */ @NonNull + // The getter for the two integers are separated, and in the superclass. Please see {@link + // VcnUnderlyingNetworkTemplate#getMinEntryDownstreamBandwidthKbps()} and {@link + // VcnUnderlyingNetworkTemplate#getMinExitDownstreamBandwidthKbps()} + @SuppressLint("MissingGetterMatchingBuilder") public Builder setMinDownstreamBandwidthKbps( int minEntryDownstreamBandwidthKbps, int minExitDownstreamBandwidthKbps) { validateMinBandwidthKbps( diff --git a/core/java/android/net/vcn/VcnUnderlyingNetworkTemplate.java b/core/java/android/net/vcn/VcnUnderlyingNetworkTemplate.java index c39b24f1fc9f8..3a9ca3edded72 100644 --- a/core/java/android/net/vcn/VcnUnderlyingNetworkTemplate.java +++ b/core/java/android/net/vcn/VcnUnderlyingNetworkTemplate.java @@ -262,7 +262,6 @@ public abstract class VcnUnderlyingNetworkTemplate { * * @see VcnWifiUnderlyingNetworkTemplate.Builder#setMinUpstreamBandwidthKbps(int, int) * @see VcnCellUnderlyingNetworkTemplate.Builder#setMinUpstreamBandwidthKbps(int, int) - * @hide */ public int getMinEntryUpstreamBandwidthKbps() { return mMinEntryUpstreamBandwidthKbps; @@ -273,7 +272,6 @@ public abstract class VcnUnderlyingNetworkTemplate { * * @see VcnWifiUnderlyingNetworkTemplate.Builder#setMinUpstreamBandwidthKbps(int, int) * @see VcnCellUnderlyingNetworkTemplate.Builder#setMinUpstreamBandwidthKbps(int, int) - * @hide */ public int getMinExitUpstreamBandwidthKbps() { return mMinExitUpstreamBandwidthKbps; @@ -284,7 +282,6 @@ public abstract class VcnUnderlyingNetworkTemplate { * * @see VcnWifiUnderlyingNetworkTemplate.Builder#setMinDownstreamBandwidthKbps(int, int) * @see VcnCellUnderlyingNetworkTemplate.Builder#setMinDownstreamBandwidthKbps(int, int) - * @hide */ public int getMinEntryDownstreamBandwidthKbps() { return mMinEntryDownstreamBandwidthKbps; @@ -295,7 +292,6 @@ public abstract class VcnUnderlyingNetworkTemplate { * * @see VcnWifiUnderlyingNetworkTemplate.Builder#setMinDownstreamBandwidthKbps(int, int) * @see VcnCellUnderlyingNetworkTemplate.Builder#setMinDownstreamBandwidthKbps(int, int) - * @hide */ public int getMinExitDownstreamBandwidthKbps() { return mMinExitDownstreamBandwidthKbps; diff --git a/core/java/android/net/vcn/VcnWifiUnderlyingNetworkTemplate.java b/core/java/android/net/vcn/VcnWifiUnderlyingNetworkTemplate.java index 43ae8b2d92b7c..23a07abdf0cba 100644 --- a/core/java/android/net/vcn/VcnWifiUnderlyingNetworkTemplate.java +++ b/core/java/android/net/vcn/VcnWifiUnderlyingNetworkTemplate.java @@ -211,40 +211,33 @@ public final class VcnWifiUnderlyingNetworkTemplate extends VcnUnderlyingNetwork } /** - * Set the minimum accepted entry and exit upstream bandwidth allowed by this template. + * Set the minimum upstream bandwidths that this template will match. * - *

The minimum upstream bandwidth condition allows for separate entry and exit - * thresholds, allowing for a margin of confidence before matching a network, while - * requiring a minimum bandwidth to continue being matching. In order to match this - * template, a network must fulfill one of the following two cases, depending on whether the - * network being evaluated is the Gateway Connection's underlying network: + *

This template will not match a network that does not provide at least the bandwidth + * passed as the entry bandwidth, except in the case that the network is selected as the VCN + * Gateway Connection's underlying network, where it will continue to match until the + * bandwidth drops under the exit bandwidth. * - *

- * - *

To prevent a network from being selected (fulfilling the entry criteria), and yet be - * unable to meet the conditions for staying selected (exit criteria), the entry criteria - * MUST be greater than, or equal to the exit criteria. + *

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the + * invalid case where a network fulfills the entry criteria, but at the same time fails the + * exit criteria. * *

Estimated bandwidth of a network is provided by the transport layer, and reported in * {@link NetworkCapabilities}. The provided estimates will be used without modification. * - * @param minEntryUpstreamBandwidthKbps the minimum accepted upstream bandwidth for a - * network that IS NOT an already-selected underlying network, or {@code 0} to disable - * this requirement. MUST be greater than, or equal to minExitUpstreamBandwidthKbps. - * Defaults to {@code 0} + * @param minEntryUpstreamBandwidthKbps the minimum accepted upstream bandwidth for networks + * that ARE NOT the already-selected underlying network, or {@code 0} to disable this + * requirement. Disabled by default. * @param minExitUpstreamBandwidthKbps the minimum accepted upstream bandwidth for a network * that IS the already-selected underlying network, or {@code 0} to disable this - * requirement. MUST be less than, or equal to minEntryUpstreamBandwidthKbps. Defaults - * to {@code 0} + * requirement. Disabled by default. * @return this {@link Builder} instance, for chaining - * @hide */ @NonNull + // The getter for the two integers are separated, and in the superclass. Please see {@link + // VcnUnderlyingNetworkTemplate#getMinEntryUpstreamBandwidthKbps()} and {@link + // VcnUnderlyingNetworkTemplate#getMinExitUpstreamBandwidthKbps()} + @SuppressLint("MissingGetterMatchingBuilder") public Builder setMinUpstreamBandwidthKbps( int minEntryUpstreamBandwidthKbps, int minExitUpstreamBandwidthKbps) { validateMinBandwidthKbps(minEntryUpstreamBandwidthKbps, minExitUpstreamBandwidthKbps); @@ -256,40 +249,33 @@ public final class VcnWifiUnderlyingNetworkTemplate extends VcnUnderlyingNetwork } /** - * Set the minimum acceptable downstream bandwidths allowed by this template. + * Set the minimum upstream bandwidths that this template will match. * - *

The minimum downstream bandwidth condition allows for separate entry and exit - * thresholds, allowing for a margin of confidence before matching a network, while - * requiring a minimum bandwidth to continue being matching. In order to match this - * template, a network must fulfill one of the following two cases, depending on whether the - * network being evaluated is the Gateway Connection's underlying network: + *

This template will not match a network that does not provide at least the bandwidth + * passed as the entry bandwidth, except in the case that the network is selected as the VCN + * Gateway Connection's underlying network, where it will continue to match until the + * bandwidth drops under the exit bandwidth. * - *

- * - *

To prevent a network from being selected (fulfilling the entry criteria), and yet be - * unable to meet the conditions for staying selected (exit criteria), the entry criteria - * MUST be greater than, or equal to the exit criteria. + *

The entry criteria MUST be greater than, or equal to the exit criteria to avoid the + * invalid case where a network fulfills the entry criteria, but at the same time fails the + * exit criteria. * *

Estimated bandwidth of a network is provided by the transport layer, and reported in * {@link NetworkCapabilities}. The provided estimates will be used without modification. * - * @param minEntryDownstreamBandwidthKbps the minimum accepted downstream bandwidth for a - * network that IS NOT an already-selected underlying network, or {@code 0} to disable - * this requirement. MUST be greater than, or equal to minExitDownstreamBandwidthKbps. - * Defaults to {@code 0} + * @param minEntryDownstreamBandwidthKbps the minimum accepted downstream bandwidth for + * networks that ARE NOT the already-selected underlying network, or {@code 0} to + * disable this requirement. Disabled by default. * @param minExitDownstreamBandwidthKbps the minimum accepted downstream bandwidth for a * network that IS the already-selected underlying network, or {@code 0} to disable this - * requirement. MUST be less than, or equal to minEntryDownstreamBandwidthKbps. Defaults - * to {@code 0} + * requirement. Disabled by default. * @return this {@link Builder} instance, for chaining - * @hide */ @NonNull + // The getter for the two integers are separated, and in the superclass. Please see {@link + // VcnUnderlyingNetworkTemplate#getMinEntryDownstreamBandwidthKbps()} and {@link + // VcnUnderlyingNetworkTemplate#getMinExitDownstreamBandwidthKbps()} + @SuppressLint("MissingGetterMatchingBuilder") public Builder setMinDownstreamBandwidthKbps( int minEntryDownstreamBandwidthKbps, int minExitDownstreamBandwidthKbps) { validateMinBandwidthKbps(