summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorChiachang Wang <chiachangwang@google.com>2021-03-29 10:36:58 +0800
committerAaron Huang <huangaaron@google.com>2021-03-31 17:30:33 +0800
commitc146cf63ec9982e192969f7643cd13145ef33326 (patch)
treeb0378467427d457318f0dc3b7591e6215c5d74ae /common
parent6e8c1a48a45074002d26d18fcc318bf208b8b9e3 (diff)
downloadnet-c146cf63ec9982e192969f7643cd13145ef33326.tar.gz
Break the reference for the new added API constant
RESTRICTED_CAPABILITIES was moved from NetworkCapabilities to frameworks/libs/net. RESTRICTED_CAPABILITIES refers to some S added NET_CAPABILITIES_* definitions. Replace the constants definitions with local constants because this git will downstream to branches without this constants. Downstream will not be able to find the references in NetworkCapailities and cause breakage. Bug: 178777253 Bug: 130869457 Test: m (cherry-picked from ag/14008231) Merged-In: I270593c12c1a7ff9f05d3bcd5f6d5647f89efb63 Change-Id: I270593c12c1a7ff9f05d3bcd5f6d5647f89efb63
Diffstat (limited to 'common')
-rw-r--r--common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java42
1 files changed, 37 insertions, 5 deletions
diff --git a/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java b/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
index 9e4a161b..28214cd8 100644
--- a/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
+++ b/common/framework/com/android/net/module/util/NetworkCapabilitiesUtils.java
@@ -16,11 +16,9 @@
package com.android.net.module.util;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_BIP;
import static android.net.NetworkCapabilities.NET_CAPABILITY_CBS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_DUN;
import static android.net.NetworkCapabilities.NET_CAPABILITY_EIMS;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_ENTERPRISE;
import static android.net.NetworkCapabilities.NET_CAPABILITY_FOTA;
import static android.net.NetworkCapabilities.NET_CAPABILITY_IA;
import static android.net.NetworkCapabilities.NET_CAPABILITY_IMS;
@@ -28,11 +26,8 @@ import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
import static android.net.NetworkCapabilities.NET_CAPABILITY_MCX;
import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_OEM_PAID;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE;
import static android.net.NetworkCapabilities.NET_CAPABILITY_RCS;
import static android.net.NetworkCapabilities.NET_CAPABILITY_SUPL;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_VEHICLE_INTERNAL;
-import static android.net.NetworkCapabilities.NET_CAPABILITY_VSIM;
import static android.net.NetworkCapabilities.NET_CAPABILITY_WIFI_P2P;
import static android.net.NetworkCapabilities.NET_CAPABILITY_XCAP;
import static android.net.NetworkCapabilities.TRANSPORT_BLUETOOTH;
@@ -76,6 +71,43 @@ public final class NetworkCapabilitiesUtils {
};
/**
+ * @See android.net.NetworkCapabilities.NET_CAPABILITY_OEM_PRIVATE
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int NET_CAPABILITY_OEM_PRIVATE = 26;
+
+ /**
+ * @See android.net.NetworkCapabilities.NET_CAPABILITY_VEHICLE_INTERNAL
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int NET_CAPABILITY_VEHICLE_INTERNAL = 27;
+
+ /**
+ * @See android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VCN_MANAGED
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int NET_CAPABILITY_NOT_VCN_MANAGED = 28;
+
+ /**
+ * @See android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VCN_MANAGED
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int NET_CAPABILITY_ENTERPRISE = 29;
+
+ /**
+ * @See android.net.NetworkCapabilities.NET_CAPABILITY_VSIM
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int NET_CAPABILITY_VSIM = 30;
+
+ /**
+ * @See android.net.NetworkCapabilities.NET_CAPABILITY_BIP
+ * TODO: Use API constant when all downstream branches are S-based
+ */
+ public static final int NET_CAPABILITY_BIP = 31;
+
+
+ /**
* Capabilities that suggest that a network is restricted.
* See {@code NetworkCapabilities#maybeMarkCapabilitiesRestricted},
* and {@code FORCE_RESTRICTED_CAPABILITIES}.