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
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
}
NET_CAPABILITY_NOT_CONGESTED,
NET_CAPABILITY_NOT_SUSPENDED,
NET_CAPABILITY_OEM_PAID,
+ NET_CAPABILITY_MCX
})
public @interface NetCapability { }
@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
(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.
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);
}
}
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;
* 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. */
* 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 = {
TYPE_IMS,
TYPE_CBS,
TYPE_IA,
- TYPE_EMERGENCY
+ TYPE_EMERGENCY,
+ TYPE_MCX
})
@Retention(RetentionPolicy.SOURCE)
public @interface ApnType {}
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");
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);
* {@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;
}
/** 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,
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;