Merge "APIs for 5G slicing" into sc-dev
diff --git a/framework/src/android/net/NetworkCapabilities.java b/framework/src/android/net/NetworkCapabilities.java
index 26d14cb..cd76f40 100644
--- a/framework/src/android/net/NetworkCapabilities.java
+++ b/framework/src/android/net/NetworkCapabilities.java
@@ -205,6 +205,7 @@
NET_CAPABILITY_OEM_PRIVATE,
NET_CAPABILITY_VEHICLE_INTERNAL,
NET_CAPABILITY_NOT_VCN_MANAGED,
+ NET_CAPABILITY_ENTERPRISE,
})
public @interface NetCapability { }
@@ -415,8 +416,17 @@
@SystemApi
public static final int NET_CAPABILITY_NOT_VCN_MANAGED = 28;
+ /**
+ * Indicates that this network is intended for enterprise use.
+ * <p>
+ * 5G URSP rules may indicate that all data should use a connection dedicated for enterprise
+ * use. If the enterprise capability is requested, all enterprise traffic will be routed over
+ * the connection with this capability.
+ */
+ public static final int NET_CAPABILITY_ENTERPRISE = 29;
+
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
- private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_NOT_VCN_MANAGED;
+ private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_ENTERPRISE;
/**
* Network capabilities that are expected to be mutable, i.e., can change while a particular
@@ -474,7 +484,8 @@
| (1 << NET_CAPABILITY_MCX)
| (1 << NET_CAPABILITY_RCS)
| (1 << NET_CAPABILITY_VEHICLE_INTERNAL)
- | (1 << NET_CAPABILITY_XCAP);
+ | (1 << NET_CAPABILITY_XCAP)
+ | (1 << NET_CAPABILITY_ENTERPRISE);
/**
* Capabilities that force network to be restricted.
@@ -2028,8 +2039,9 @@
case NET_CAPABILITY_PARTIAL_CONNECTIVITY: return "PARTIAL_CONNECTIVITY";
case NET_CAPABILITY_TEMPORARILY_NOT_METERED: return "TEMPORARILY_NOT_METERED";
case NET_CAPABILITY_OEM_PRIVATE: return "OEM_PRIVATE";
- case NET_CAPABILITY_VEHICLE_INTERNAL: return "NET_CAPABILITY_VEHICLE_INTERNAL";
+ case NET_CAPABILITY_VEHICLE_INTERNAL: return "VEHICLE_INTERNAL";
case NET_CAPABILITY_NOT_VCN_MANAGED: return "NOT_VCN_MANAGED";
+ case NET_CAPABILITY_ENTERPRISE: return "ENTERPRISE";
default: return Integer.toString(capability);
}
}