Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36791ef4 authored by Amit Mahajan's avatar Amit Mahajan Committed by Gerrit Code Review
Browse files

Merge "Adding new APN type for Mission Critical Services."

parents 693e023b fd3ee578
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -27469,6 +27469,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
@@ -43363,6 +43364,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
  }
+11 −2
Original line number Diff line number Diff line
@@ -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);
        }
    }
+9 −4
Original line number Diff line number Diff line
@@ -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;
            }
+4 −1
Original line number Diff line number Diff line
@@ -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;