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).

This was previously submitted as aosp/1927841, but
which got reverted due to breaking the mainline
build, which uses the pre-built module.

Bug: 210774375
Test: atest ConnectivityServiceTest
Change-Id: If8b691ff4999a4dbf54e7567d9ca74d743dc5ded
This commit is contained in:
Jack Yu
2021-12-16 13:15:25 -08:00
parent 05e12e6f79
commit 04bbc5b9b0
3 changed files with 12 additions and 2 deletions

View File

@@ -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);
}
}