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

Commit fd063e77 authored by Sanket Padawe's avatar Sanket Padawe Committed by Android Partner Code Review
Browse files

Merge "Add OEM specific error code space which can by used to replace Generic...

Merge "Add OEM specific error code space which can by used to replace Generic errors." into mm-wireless-dev
parents 9c96807d cd3800ef
Loading
Loading
Loading
Loading
+75 −0
Original line number Diff line number Diff line
@@ -76,6 +76,31 @@ public class CommandException extends RuntimeException {
        NO_SMS_TO_ACK,
        NETWORK_ERR,
        REQUEST_RATE_LIMITED,
        OEM_ERROR_1,
        OEM_ERROR_2,
        OEM_ERROR_3,
        OEM_ERROR_4,
        OEM_ERROR_5,
        OEM_ERROR_6,
        OEM_ERROR_7,
        OEM_ERROR_8,
        OEM_ERROR_9,
        OEM_ERROR_10,
        OEM_ERROR_11,
        OEM_ERROR_12,
        OEM_ERROR_13,
        OEM_ERROR_14,
        OEM_ERROR_15,
        OEM_ERROR_16,
        OEM_ERROR_17,
        OEM_ERROR_18,
        OEM_ERROR_19,
        OEM_ERROR_20,
        OEM_ERROR_21,
        OEM_ERROR_22,
        OEM_ERROR_23,
        OEM_ERROR_24,
        OEM_ERROR_25,
    }

    public CommandException(Error e) {
@@ -190,6 +215,56 @@ public class CommandException extends RuntimeException {
                return new CommandException(Error.NETWORK_ERR);
            case RILConstants.REQUEST_RATE_LIMITED:
                return new CommandException(Error.REQUEST_RATE_LIMITED);
            case RILConstants.OEM_ERROR_1:
                return new CommandException(Error.OEM_ERROR_1);
            case RILConstants.OEM_ERROR_2:
                return new CommandException(Error.OEM_ERROR_2);
            case RILConstants.OEM_ERROR_3:
                return new CommandException(Error.OEM_ERROR_3);
            case RILConstants.OEM_ERROR_4:
                return new CommandException(Error.OEM_ERROR_4);
            case RILConstants.OEM_ERROR_5:
                return new CommandException(Error.OEM_ERROR_5);
            case RILConstants.OEM_ERROR_6:
                return new CommandException(Error.OEM_ERROR_6);
            case RILConstants.OEM_ERROR_7:
                return new CommandException(Error.OEM_ERROR_7);
            case RILConstants.OEM_ERROR_8:
                return new CommandException(Error.OEM_ERROR_8);
            case RILConstants.OEM_ERROR_9:
                return new CommandException(Error.OEM_ERROR_9);
            case RILConstants.OEM_ERROR_10:
                return new CommandException(Error.OEM_ERROR_10);
            case RILConstants.OEM_ERROR_11:
                return new CommandException(Error.OEM_ERROR_11);
            case RILConstants.OEM_ERROR_12:
                return new CommandException(Error.OEM_ERROR_12);
            case RILConstants.OEM_ERROR_13:
                return new CommandException(Error.OEM_ERROR_13);
            case RILConstants.OEM_ERROR_14:
                return new CommandException(Error.OEM_ERROR_14);
            case RILConstants.OEM_ERROR_15:
                return new CommandException(Error.OEM_ERROR_15);
            case RILConstants.OEM_ERROR_16:
                return new CommandException(Error.OEM_ERROR_16);
            case RILConstants.OEM_ERROR_17:
                return new CommandException(Error.OEM_ERROR_17);
            case RILConstants.OEM_ERROR_18:
                return new CommandException(Error.OEM_ERROR_18);
            case RILConstants.OEM_ERROR_19:
                return new CommandException(Error.OEM_ERROR_19);
            case RILConstants.OEM_ERROR_20:
                return new CommandException(Error.OEM_ERROR_20);
            case RILConstants.OEM_ERROR_21:
                return new CommandException(Error.OEM_ERROR_21);
            case RILConstants.OEM_ERROR_22:
                return new CommandException(Error.OEM_ERROR_22);
            case RILConstants.OEM_ERROR_23:
                return new CommandException(Error.OEM_ERROR_23);
            case RILConstants.OEM_ERROR_24:
                return new CommandException(Error.OEM_ERROR_24);
            case RILConstants.OEM_ERROR_25:
                return new CommandException(Error.OEM_ERROR_25);

            default:
                Rlog.e("GSM", "Unrecognized RIL errno " + ril_errno);
+54 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ public enum DcFailCause {
    // This series of errors as specified by the standards
    // specified in ril.h
    OPERATOR_BARRED(0x08),                  /* no retry */
    NAS_SIGNALLING(0x0E),
    LLC_SNDCP(0x19),
    INSUFFICIENT_RESOURCES(0x1A),
    MISSING_UNKNOWN_APN(0x1B),              /* no retry */
    UNKNOWN_PDP_ADDRESS_TYPE(0x1C),         /* no retry */
@@ -39,10 +41,62 @@ public enum DcFailCause {
    SERVICE_OPTION_OUT_OF_ORDER(0x22),
    NSAPI_IN_USE(0x23),                     /* no retry */
    REGULAR_DEACTIVATION(0x24),             /* possibly restart radio, based on config */
    QOS_NOT_ACCEPTED(0x25),
    NETWORK_FAILURE(0x26),
    UMTS_REACTIVATION_REQ(0x27),
    FEATURE_NOT_SUPP(0x28),
    TFT_SEMANTIC_ERROR(0x29),
    TFT_SYTAX_ERROR(0x2A),
    UNKNOWN_PDP_CONTEXT(0x2B),
    FILTER_SEMANTIC_ERROR(0x2C),
    FILTER_SYTAX_ERROR(0x2D),
    PDP_WITHOUT_ACTIVE_TFT(0x2E),
    ONLY_IPV4_ALLOWED(0x32),                /* no retry */
    ONLY_IPV6_ALLOWED(0x33),                /* no retry */
    ONLY_SINGLE_BEARER_ALLOWED(0x34),
    ESM_INFO_NOT_RECEIVED(0x35),
    PDN_CONN_DOES_NOT_EXIST(0x36),
    MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED(0x37),
    MAX_ACTIVE_PDP_CONTEXT_REACHED(0x41),
    UNSUPPORTED_APN_IN_CURRENT_PLMN(0x42),
    INVALID_TRANSACTION_ID(0x51),
    MESSAGE_INCORRECT_SEMANTIC(0x5F),
    INVALID_MANDATORY_INFO(0x60),
    MESSAGE_TYPE_UNSUPPORTED(0x61),
    MSG_TYPE_NONCOMPATIBLE_STATE(0x62),
    UNKNOWN_INFO_ELEMENT(0x63),
    CONDITIONAL_IE_ERROR(0x64),
    MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE(0x65),
    PROTOCOL_ERRORS(0x6F),                  /* no retry */
    APN_TYPE_CONFLICT(0x70),
    INVALID_PCSCF_ADDR(0x71),
    INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN(0x72),
    EMM_ACCESS_BARRED(0x73),
    EMERGENCY_IFACE_ONLY(0x74),
    IFACE_MISMATCH(0x75),
    COMPANION_IFACE_IN_USE(0x76),
    IP_ADDRESS_MISMATCH(0x77),
    IFACE_AND_POL_FAMILY_MISMATCH(0x78),
    EMM_ACCESS_BARRED_INFINITE_RETRY(0x79),
    AUTH_FAILURE_ON_EMERGENCY_CALL(0x7A),

    // OEM sepecific error codes. To be used by OEMs when they don't
    // want to reveal error code which would be replaced by ERROR_UNSPECIFIED
    OEM_DCFAILCAUSE_1(0x1001),
    OEM_DCFAILCAUSE_2(0x1002),
    OEM_DCFAILCAUSE_3(0x1003),
    OEM_DCFAILCAUSE_4(0x1004),
    OEM_DCFAILCAUSE_5(0x1005),
    OEM_DCFAILCAUSE_6(0x1006),
    OEM_DCFAILCAUSE_7(0x1007),
    OEM_DCFAILCAUSE_8(0x1008),
    OEM_DCFAILCAUSE_9(0x1009),
    OEM_DCFAILCAUSE_10(0x100A),
    OEM_DCFAILCAUSE_11(0x100B),
    OEM_DCFAILCAUSE_12(0x100C),
    OEM_DCFAILCAUSE_13(0x100D),
    OEM_DCFAILCAUSE_14(0x100E),
    OEM_DCFAILCAUSE_15(0x100F),

    // Local errors generated by Vendor RIL
    // specified in ril.h