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

Commit eafe72a0 authored by Satish.Kulkarni's avatar Satish.Kulkarni Committed by Wink Saville
Browse files

Fix for missing call drop notice in CDMA mode

In case the cdma modem indicates unspecified error as a reason for a
dropped call, then the cause was wrongly being translated to NORMAL call in
DisconnectCause. This has been fixed to report ERROR_UNSPECIFIED as
DisconnectCause in Connection.java.
parent a04aaff2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -56,7 +56,8 @@ public abstract class Connection {
        CDMA_RETRY_ORDER,               /* requeseted service is rejected, retry delay is set */
        CDMA_ACCESS_FAILURE,
        CDMA_PREEMPTED,
        CDMA_NOT_EMERGENCY              /* not an emergency call */
        CDMA_NOT_EMERGENCY,              /* not an emergency call */
        ERROR_UNSPECIFIED
    }

    Object userData;
+3 −1
Original line number Diff line number Diff line
@@ -435,8 +435,10 @@ public class CdmaConnection extends Connection {
                } else if (phone.mCM.getRadioState() != CommandsInterface.RadioState.NV_READY
                        && phone.getIccCard().getState() != RuimCard.State.READY) {
                    return DisconnectCause.ICC_ERROR;
                } else {
                } else if (causeCode==CallFailCause.NORMAL_CLEARING) {
                    return DisconnectCause.NORMAL;
                } else {
                    return DisconnectCause.ERROR_UNSPECIFIED;
                }
        }
    }
+6 −2
Original line number Diff line number Diff line
@@ -381,10 +381,14 @@ public class GsmConnection extends Connection {
                    } else if (phone.mSST.rs.isCsNormalRestricted()) {
                        return DisconnectCause.CS_RESTRICTED_NORMAL;
                    } else {
                        return DisconnectCause.NORMAL;
                        return DisconnectCause.ERROR_UNSPECIFIED;
                    }
                } else {
                } else if (causeCode == CallFailCause.NORMAL_CLEARING) {
                    return DisconnectCause.NORMAL;
                } else {
                    // If nothing else matches, report unknown call drop reason
                    // to app, not NORMAL call end.
                    return DisconnectCause.ERROR_UNSPECIFIED;
                }
        }
    }