summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorBenedict Wong <benedictwong@google.com>2020-09-02 18:50:04 -0700
committerBenedict Wong <benedictwong@google.com>2020-11-19 00:07:35 -0800
commit4f040fb77dd2714e02ab3a89090fbaaebbc89e3e (patch)
tree1fdd47e4aa9cc96df840858ce482a681198c9016 /core/java/android
parente8f42976fc6cc03e92eec2c28ff20e0ca6c18e1b (diff)
Add VcnTunnel, UnderlyingNetworkTracker skeletons
This change adds skeletons for each of the various major components used in the VCN. Additionally, this change adds the VcnGatewayConnectionConfig, used to configure each logical connection to the VCN gateway. Each VcnGatewayConnectionConfig specifies a Network that can be brought up on demand for a given telephony service (INTERNET, MMS, DUN, etc) Bug: 163602123 Bug: 163432852 Test: Skeletons only, no major testable pieces Change-Id: I7297690573c1b6ebd0ab9c1d434dd45c1e7d841d
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/net/vcn/VcnGatewayConnectionConfig.java86
1 files changed, 86 insertions, 0 deletions
diff --git a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
new file mode 100644
index 000000000000..8160edc87440
--- /dev/null
+++ b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.net.vcn;
+
+import android.annotation.NonNull;
+
+/**
+ * This class represents a configuration for a connection to a Virtual Carrier Network gateway.
+ *
+ * <p>Each VcnGatewayConnectionConfig represents a single logical connection to a carrier gateway,
+ * and may provide one or more telephony services (as represented by network capabilities). Each
+ * gateway is expected to provide mobility for a given session as the device roams across {@link
+ * Network}s.
+ *
+ * <p>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
+ * VcnManager#setVcnConfig}).
+ *
+ * <p>Services that can be provided by a VCN network, or required for underlying networks are
+ * limited to services provided by cellular networks:
+ *
+ * <ul>
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_MMS}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_SUPL}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_DUN}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_FOTA}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_IMS}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_CBS}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_IA}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_RCS}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_XCAP}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_EIMS}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET}
+ * <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_MCX}
+ * </ul>
+ *
+ * @hide
+ */
+public final class VcnGatewayConnectionConfig {
+ private VcnGatewayConnectionConfig() {
+ validate();
+ }
+
+ // TODO: Implement getters, validators, etc
+
+ /**
+ * Validates this configuration
+ *
+ * @hide
+ */
+ private void validate() {
+ // TODO: implement validation logic
+ }
+
+ // Parcelable methods
+
+ /** This class is used to incrementally build {@link VcnGatewayConnectionConfig} objects */
+ public static class Builder {
+ // TODO: Implement this builder
+
+ /**
+ * Builds and validates the VcnGatewayConnectionConfig
+ *
+ * @return an immutable VcnGatewayConnectionConfig instance
+ */
+ @NonNull
+ public VcnGatewayConnectionConfig build() {
+ return new VcnGatewayConnectionConfig();
+ }
+ }
+}