From 226af1dbfdac3112f41982ebf2e9fd1a0f3cc323 Mon Sep 17 00:00:00 2001 From: Benedict Wong Date: Fri, 12 Mar 2021 16:12:58 -0800 Subject: Hide required underlying caps APIs VCN underlying network capabilities should be transport-dependent in order to allow using anything other than the INTERNET capability for VCN types that support wifi offload. Specifically, if underlying network capabilities are not transport-dependent, and Wifi only ever supports the INTERNET capability, the VCN is unable to utilize wifi offload together with requiring NET_CAPABILITY_IMS or NET_CAPABILITY_CBS, since the IMS or CBS capability would be required for both cellular and wifi underlying networks. Until such time as a per-transport capability set is allowed, hide the exposedCapability pieces, and document that all underlying networks MUST have INTERNET capability in order to be used. Bug: 182219992 Test: atest FrameworksVcnTests Test: atest CtsVcnTestCases Change-Id: I50d7f1be42e0e001f1413a3d5fe8aa4b7afec223 --- core/api/current.txt | 3 --- .../net/vcn/VcnGatewayConnectionConfig.java | 22 ++++++++++------------ core/java/android/net/vcn/VcnManager.java | 2 +- 3 files changed, 11 insertions(+), 16 deletions(-) (limited to 'core') diff --git a/core/api/current.txt b/core/api/current.txt index 0e7ecefbdbdc..b74a82cef9f1 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -25690,17 +25690,14 @@ package android.net.vcn { public final class VcnGatewayConnectionConfig { method @NonNull public int[] getExposedCapabilities(); method @IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) public int getMaxMtu(); - method @NonNull public int[] getRequiredUnderlyingCapabilities(); method @NonNull public long[] getRetryInterval(); } public static final class VcnGatewayConnectionConfig.Builder { ctor public VcnGatewayConnectionConfig.Builder(@NonNull android.net.vcn.VcnControlPlaneConfig); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder addExposedCapability(int); - method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder addRequiredUnderlyingCapability(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 removeRequiredUnderlyingCapability(int); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setMaxMtu(@IntRange(from=android.net.vcn.VcnGatewayConnectionConfig.MIN_MTU_V6) int); method @NonNull public android.net.vcn.VcnGatewayConnectionConfig.Builder setRetryInterval(@NonNull long[]); } diff --git a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java index 9f83b21f0d0c..d4e8e2dca296 100644 --- a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java +++ b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java @@ -52,13 +52,12 @@ import java.util.concurrent.TimeUnit; * Network}s. * *

A VCN connection based on this configuration will be brought up dynamically based on device - * settings, and filed NetworkRequests. Underlying networks will be selected based on the services - * required by this configuration (as represented by network capabilities), and must be part of the - * subscription group under which this configuration is registered (see {@link + * settings, and filed NetworkRequests. Underlying Networks must provide INTERNET connectivity, and + * must be part of the subscription group under which this configuration is registered (see {@link * VcnManager#setVcnConfig}). * - *

As an abstraction of a cellular network, services that can be provided by a VCN network, or - * required for underlying networks are limited to services provided by cellular networks: + *

As an abstraction of a cellular network, services that can be provided by a VCN network are + * limited to services provided by cellular networks: * *