diff --git a/core/api/current.txt b/core/api/current.txt index 2ba2f5bd2c859..7ecaf684ce967 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -27285,6 +27285,7 @@ package android.net.vcn { public final class VcnConfig implements android.os.Parcelable { method public int describeContents(); method @NonNull public java.util.Set getGatewayConnectionConfigs(); + method @NonNull public java.util.Set getRestrictedUnderlyingNetworkTransports(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } @@ -27293,6 +27294,7 @@ package android.net.vcn { ctor public VcnConfig.Builder(@NonNull android.content.Context); method @NonNull public android.net.vcn.VcnConfig.Builder addGatewayConnectionConfig(@NonNull android.net.vcn.VcnGatewayConnectionConfig); method @NonNull public android.net.vcn.VcnConfig build(); + method @NonNull public android.net.vcn.VcnConfig.Builder setRestrictedUnderlyingNetworkTransports(@NonNull java.util.Set); } public final class VcnGatewayConnectionConfig { diff --git a/core/java/android/net/vcn/VcnConfig.java b/core/java/android/net/vcn/VcnConfig.java index 8627f5c7a1ba3..dcf002613b80e 100644 --- a/core/java/android/net/vcn/VcnConfig.java +++ b/core/java/android/net/vcn/VcnConfig.java @@ -25,6 +25,7 @@ import static com.android.server.vcn.util.PersistableBundleUtils.INTEGER_SERIALI import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; +import android.net.NetworkCapabilities; import android.net.NetworkRequest; import android.os.Parcel; import android.os.Parcelable; @@ -158,10 +159,9 @@ public final class VcnConfig implements Parcelable { } /** - * Retrieve the transports that need to be restricted by VCN. + * Retrieve the transports that will be restricted by the VCN. * * @see Builder#setRestrictedUnderlyingNetworkTransports(Set) - * @hide */ @NonNull public Set getRestrictedUnderlyingNetworkTransports() { @@ -306,16 +306,15 @@ public final class VcnConfig implements Parcelable { } /** - * Sets transports that need to be restricted by VCN. + * Sets transports that will be restricted by the VCN. * - * @param transports transports that need to be restricted by VCN. Networks that include any + * @param transports transports that will be restricted by VCN. Networks that include any * of the transports will be marked as restricted. Only {@link * NetworkCapabilities#TRANSPORT_WIFI} and {@link * NetworkCapabilities#TRANSPORT_CELLULAR} are allowed. {@link * NetworkCapabilities#TRANSPORT_WIFI} is marked restricted by default. * @return this {@link Builder} instance, for chaining * @throws IllegalArgumentException if the input contains unsupported transport types. - * @hide */ @NonNull public Builder setRestrictedUnderlyingNetworkTransports(@NonNull Set transports) {