summaryrefslogtreecommitdiff
path: root/common/framework
diff options
context:
space:
mode:
authorlucaslin <lucaslin@google.com>2021-04-06 09:54:45 +0800
committerlucaslin <lucaslin@google.com>2021-04-06 09:54:45 +0800
commitf8bbf65d9c0a5f6163b6a39178be3ed6590f61fe (patch)
treeeb534a1ba50afd0678f5005ced032c4c2aad2d60 /common/framework
parent6331a715d3a53baed90bfeaa61f21b0820f61bff (diff)
downloadnet-f8bbf65d9c0a5f6163b6a39178be3ed6590f61fe.tar.gz
Define TRANSPORT_USB in NetworkCapabilitiesUtils temporarily
The new API constant - TRANSPORT_USB didn't in mainline branch, so the user of TRANSPORT_USB will get build break when it is built in mainline branch. Define TRANSPORT_USB in NetworkCapabilitiesUtils temporarily is a workaround to fix this problem, and it should be removed once downstream branches are S-based. Bug: 184158327 Test: m Change-Id: I83560c75761e7008b457a66296364cb4ce24db50 Ignore-AOSP-First: This should be compiled with ag/14049950.
Diffstat (limited to 'common/framework')
-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