diff options
| -rwxr-xr-x | api/current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/net/NetworkCapabilities.java | 13 | ||||
| -rw-r--r-- | telephony/java/android/telephony/data/ApnSetting.java | 13 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/PhoneConstants.java | 5 |
4 files changed, 26 insertions, 7 deletions
diff --git a/api/current.txt b/api/current.txt index 074eff10fcaf..ddd0a9cbfa4a 100755 --- a/api/current.txt +++ b/api/current.txt @@ -27467,6 +27467,7 @@ package android.net { field public static final int NET_CAPABILITY_IA = 7; // 0x7 field public static final int NET_CAPABILITY_IMS = 4; // 0x4 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_NOT_CONGESTED = 20; // 0x14 field public static final int NET_CAPABILITY_NOT_METERED = 11; // 0xb @@ -43361,6 +43362,7 @@ package android.telephony.data { field public static final int TYPE_HIPRI = 16; // 0x10 field public static final int TYPE_IA = 256; // 0x100 field public static final int TYPE_IMS = 64; // 0x40 + field public static final int TYPE_MCX = 1024; // 0x400 field public static final int TYPE_MMS = 2; // 0x2 field public static final int TYPE_SUPL = 4; // 0x4 } diff --git a/core/java/android/net/NetworkCapabilities.java b/core/java/android/net/NetworkCapabilities.java index 1d2d81dc4fbe..0a63e75d1a31 100644 --- a/core/java/android/net/NetworkCapabilities.java +++ b/core/java/android/net/NetworkCapabilities.java @@ -143,6 +143,7 @@ public final class NetworkCapabilities implements Parcelable { NET_CAPABILITY_NOT_CONGESTED, NET_CAPABILITY_NOT_SUSPENDED, NET_CAPABILITY_OEM_PAID, + NET_CAPABILITY_MCX }) public @interface NetCapability { } @@ -297,8 +298,14 @@ public final class NetworkCapabilities implements Parcelable { @SystemApi public static final int NET_CAPABILITY_OEM_PAID = 22; + /** + * Indicates this is a network that has the ability to reach a carrier's Mission Critical + * servers. + */ + public static final int NET_CAPABILITY_MCX = 23; + private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS; - private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_OEM_PAID; + private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_MCX; /** * Network capabilities that are expected to be mutable, i.e., can change while a particular @@ -346,7 +353,8 @@ public final class NetworkCapabilities implements Parcelable { (1 << NET_CAPABILITY_IA) | (1 << NET_CAPABILITY_IMS) | (1 << NET_CAPABILITY_RCS) | - (1 << NET_CAPABILITY_XCAP); + (1 << NET_CAPABILITY_XCAP) | + (1 << NET_CAPABILITY_MCX); /** * Capabilities that force network to be restricted. @@ -1614,6 +1622,7 @@ public final class NetworkCapabilities implements Parcelable { case NET_CAPABILITY_NOT_CONGESTED: return "NOT_CONGESTED"; case NET_CAPABILITY_NOT_SUSPENDED: return "NOT_SUSPENDED"; case NET_CAPABILITY_OEM_PAID: return "OEM_PAID"; + case NET_CAPABILITY_MCX: return "MCX"; default: return Integer.toString(capability); } } diff --git a/telephony/java/android/telephony/data/ApnSetting.java b/telephony/java/android/telephony/data/ApnSetting.java index 0e695309fce2..97a2f131d844 100644 --- a/telephony/java/android/telephony/data/ApnSetting.java +++ b/telephony/java/android/telephony/data/ApnSetting.java @@ -19,7 +19,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.content.ContentValues; import android.database.Cursor; -import android.hardware.radio.V1_0.ApnTypes; +import android.hardware.radio.V1_4.ApnTypes; import android.net.Uri; import android.os.Parcel; import android.os.Parcelable; @@ -79,7 +79,7 @@ public class ApnSetting implements Parcelable { * APN type for all APNs. * @hide */ - public static final int TYPE_ALL = ApnTypes.ALL; + public static final int TYPE_ALL = ApnTypes.ALL | ApnTypes.MCX; /** APN type for default data traffic. */ public static final int TYPE_DEFAULT = ApnTypes.DEFAULT | ApnTypes.HIPRI; /** APN type for MMS traffic. */ @@ -103,6 +103,8 @@ public class ApnSetting implements Parcelable { * for access to carrier services in an emergency call situation. */ public static final int TYPE_EMERGENCY = ApnTypes.EMERGENCY; + /** APN type for MCX (Mission Critical Service) where X can be PTT/Video/Data */ + public static final int TYPE_MCX = ApnTypes.MCX; /** @hide */ @IntDef(flag = true, prefix = { "TYPE_" }, value = { @@ -115,7 +117,8 @@ public class ApnSetting implements Parcelable { TYPE_IMS, TYPE_CBS, TYPE_IA, - TYPE_EMERGENCY + TYPE_EMERGENCY, + TYPE_MCX }) @Retention(RetentionPolicy.SOURCE) public @interface ApnType {} @@ -206,6 +209,7 @@ public class ApnSetting implements Parcelable { APN_TYPE_STRING_MAP.put("cbs", TYPE_CBS); APN_TYPE_STRING_MAP.put("ia", TYPE_IA); APN_TYPE_STRING_MAP.put("emergency", TYPE_EMERGENCY); + APN_TYPE_STRING_MAP.put("mcx", TYPE_MCX); APN_TYPE_INT_MAP = new ArrayMap<Integer, String>(); APN_TYPE_INT_MAP.put(TYPE_DEFAULT, "default"); APN_TYPE_INT_MAP.put(TYPE_MMS, "mms"); @@ -217,6 +221,7 @@ public class ApnSetting implements Parcelable { APN_TYPE_INT_MAP.put(TYPE_CBS, "cbs"); APN_TYPE_INT_MAP.put(TYPE_IA, "ia"); APN_TYPE_INT_MAP.put(TYPE_EMERGENCY, "emergency"); + APN_TYPE_INT_MAP.put(TYPE_MCX, "mcx"); PROTOCOL_STRING_MAP = new ArrayMap<String, Integer>(); PROTOCOL_STRING_MAP.put("IP", PROTOCOL_IP); @@ -1833,7 +1838,7 @@ public class ApnSetting implements Parcelable { * {@link ApnSetting} built from this builder otherwise. */ public ApnSetting build() { - if ((mApnTypeBitmask & ApnTypes.ALL) == 0 || TextUtils.isEmpty(mApnName) + if ((mApnTypeBitmask & TYPE_ALL) == 0 || TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) { return null; } diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java index e87d28c6f9e9..d5061a32ba6d 100644 --- a/telephony/java/com/android/internal/telephony/PhoneConstants.java +++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java @@ -141,6 +141,8 @@ public class PhoneConstants { /** APN type for Emergency PDN. This is not an IA apn, but is used * for access to carrier services in an emergency call situation. */ public static final String APN_TYPE_EMERGENCY = "emergency"; + /** APN type for Mission Critical Services */ + public static final String APN_TYPE_MCX = "mcx"; /** Array of all APN types */ public static final String[] APN_TYPES = {APN_TYPE_DEFAULT, APN_TYPE_MMS, @@ -151,7 +153,8 @@ public class PhoneConstants { APN_TYPE_IMS, APN_TYPE_CBS, APN_TYPE_IA, - APN_TYPE_EMERGENCY + APN_TYPE_EMERGENCY, + APN_TYPE_MCX }; public static final int RIL_CARD_MAX_APPS = 8; |