Added a new network capability MMTEL
Added NET_CAPABILITY_MMTEL to indicate a network support MMTEL (Multimedia telephony). This is for IMS service to request an IMS network that supports voice or PS (VoPS for 4G, VoNR for 5G). Bug: 210774375 Test: atest ConnectivityServiceTest Change-Id: Ifea8b1e40f65c610e925a27be873930fee2df693
This commit is contained in:
@@ -316,6 +316,7 @@ package android.net {
|
||||
field public static final int NET_CAPABILITY_INTERNET = 12; // 0xc
|
||||
field public static final int NET_CAPABILITY_MCX = 23; // 0x17
|
||||
field public static final int NET_CAPABILITY_MMS = 0; // 0x0
|
||||
field public static final int NET_CAPABILITY_MMTEL = 33; // 0x21
|
||||
field public static final int NET_CAPABILITY_NOT_CONGESTED = 20; // 0x14
|
||||
field public static final int NET_CAPABILITY_NOT_METERED = 11; // 0xb
|
||||
field public static final int NET_CAPABILITY_NOT_RESTRICTED = 13; // 0xd
|
||||
|
||||
@@ -274,6 +274,7 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
NET_CAPABILITY_VSIM,
|
||||
NET_CAPABILITY_BIP,
|
||||
NET_CAPABILITY_HEAD_UNIT,
|
||||
NET_CAPABILITY_MMTEL,
|
||||
})
|
||||
public @interface NetCapability { }
|
||||
|
||||
@@ -512,8 +513,13 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
*/
|
||||
public static final int NET_CAPABILITY_HEAD_UNIT = 32;
|
||||
|
||||
/**
|
||||
* Indicates that this network has ability to support MMTEL (Multimedia Telephony service).
|
||||
*/
|
||||
public static final int NET_CAPABILITY_MMTEL = 33;
|
||||
|
||||
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
|
||||
private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_HEAD_UNIT;
|
||||
private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_MMTEL;
|
||||
|
||||
/**
|
||||
* Network capabilities that are expected to be mutable, i.e., can change while a particular
|
||||
@@ -2090,6 +2096,7 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
case NET_CAPABILITY_VSIM: return "VSIM";
|
||||
case NET_CAPABILITY_BIP: return "BIP";
|
||||
case NET_CAPABILITY_HEAD_UNIT: return "HEAD_UNIT";
|
||||
case NET_CAPABILITY_MMTEL: return "MMTEL";
|
||||
default: return Integer.toString(capability);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ import static android.net.NetworkCapabilities.NET_CAPABILITY_IA;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_IMS;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_MMS;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_MMTEL;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED;
|
||||
import static android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED;
|
||||
@@ -3586,7 +3587,7 @@ public class ConnectivityServiceTest {
|
||||
|| capability == NET_CAPABILITY_IA || capability == NET_CAPABILITY_IMS
|
||||
|| capability == NET_CAPABILITY_RCS || capability == NET_CAPABILITY_XCAP
|
||||
|| capability == NET_CAPABILITY_VSIM || capability == NET_CAPABILITY_BIP
|
||||
|| capability == NET_CAPABILITY_ENTERPRISE) {
|
||||
|| capability == NET_CAPABILITY_ENTERPRISE || capability == NET_CAPABILITY_MMTEL) {
|
||||
assertFalse(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
|
||||
} else {
|
||||
assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_RESTRICTED));
|
||||
@@ -3714,6 +3715,7 @@ public class ConnectivityServiceTest {
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_WIFI_P2P);
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_IA);
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_RCS);
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_MMTEL);
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_XCAP);
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_ENTERPRISE);
|
||||
tryNetworkFactoryRequests(NET_CAPABILITY_EIMS);
|
||||
|
||||
Reference in New Issue
Block a user