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

Commit f7808375 authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Add new IMS reasoninfo to handle alternate emergency disconnect scenario.

Adding new ImsReasonInfo and corresponding DisconnectCause code.

Test: Manual, added unit test for code remapping.
Bug: 69024173
Change-Id: I30da4f2493fe19fe04365b9067c7feeb90a917a3
parent 08498c32
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -310,6 +310,13 @@ public class DisconnectCause {
     * {@hide}
     */
    public static final int DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 70;

    /**
     * The network has reported that an alternative emergency number has been dialed, but the user
     * must exit airplane mode to place the call.
     */
    public static final int IMS_SIP_ALTERNATE_EMERGENCY_CALL = 71;

    //*********************************************************************************************
    // When adding a disconnect type:
    // 1) Update toString() with the newly added disconnect type.
@@ -462,6 +469,8 @@ public class DisconnectCause {
            return "EMERGENCY_PERM_FAILURE";
        case NORMAL_UNSPECIFIED:
            return "NORMAL_UNSPECIFIED";
        case IMS_SIP_ALTERNATE_EMERGENCY_CALL:
            return "IMS_SIP_ALTERNATE_EMERGENCY_CALL";
        default:
            return "INVALID: " + cause;
        }
+7 −0
Original line number Diff line number Diff line
@@ -384,6 +384,13 @@ public class ImsReasonInfo implements Parcelable {
    /** Call/IMS registration is failed/dropped because of a network detach */
    public static final int CODE_NETWORK_DETACH = 1513;

    /**
     * Call failed due to SIP code 380 (Alternative Service response) while dialing an "undetected
     * emergency number".  This scenario is important in some regions where the carrier network will
     * identify other non-emergency help numbers (e.g. mountain rescue) when attempting to dial.
     */
    public static final int CODE_SIP_ALTERNATE_EMERGENCY_CALL = 1514;

    /* OEM specific error codes. To be used by OEMs when they don't want to
   reveal error code which would be replaced by ERROR_UNSPECIFIED */
    public static final int CODE_OEM_CAUSE_1 = 0xf001;