summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Lin <lucaslin@google.com>2021-04-06 08:40:25 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-04-06 08:40:25 +0000
commit8187cbcc58314125261289cacbd4ba4cfa4e336c (patch)
tree8e12429a10c5ef715637c8cced5456f0d370cb3b
parentee8cbca6e9fb035912ae8722869de8f0239b7e7c (diff)
parentf8bbf65d9c0a5f6163b6a39178be3ed6590f61fe (diff)
downloadnet-8187cbcc58314125261289cacbd4ba4cfa4e336c.tar.gz
Merge "Define TRANSPORT_USB in NetworkCapabilitiesUtils temporarily" into sc-dev
-rw-r--r--common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java b/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
index 552ab21f..122b4994 100644
--- a/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
+++ b/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
@@ -47,6 +47,12 @@ import com.android.internal.annotations.VisibleForTesting;
* @hide
*/
public final class NetworkCapabilitiesUtils {
+ /**
+ * See android.net.NetworkCapabilities.TRANSPORT_USB
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int TRANSPORT_USB = 8;
+
// Transports considered to classify networks in UI, in order of which transport should be
// surfaced when there are multiple transports. Transports not in this list do not have
// an ordering preference (in practice they will have a deterministic order based on the
@@ -64,7 +70,8 @@ public final class NetworkCapabilitiesUtils {
TRANSPORT_WIFI_AWARE,
TRANSPORT_BLUETOOTH,
TRANSPORT_WIFI,
- TRANSPORT_ETHERNET
+ TRANSPORT_ETHERNET,
+ TRANSPORT_USB
// Notably, TRANSPORT_TEST is not in this list as any network that has TRANSPORT_TEST and
// one of the above transports should be counted as that transport, to keep tests as