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

Commit 404c1499 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Adding handling for newUnknownConnection on GSM.

This was missed during initial merge.

Bug: 25793157
Change-Id: I25a3e87681fcadcd5e22b860533868a6ae6af747
parent aa0721e5
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@ public class GsmCdmaCallTracker extends CallTracker {
            mIsEcmTimerCanceled = false;
            m3WayCallFlashDelay = 0;
            mCi.registerForCallWaitingInfo(this, EVENT_CALL_WAITING_INFO_CDMA, null);
            //todo: check if this setGeneric call is okay
            mForegroundCall.setGeneric(false);

            // Register receiver for ECM exit
@@ -254,6 +253,7 @@ public class GsmCdmaCallTracker extends CallTracker {
        }
    }

    //GSM
    /**
     * clirMode is one of the CLIR_ constants
     */
@@ -305,8 +305,7 @@ public class GsmCdmaCallTracker extends CallTracker {
        mHangupPendingMO = false;

        if ( mPendingMO.getAddress() == null || mPendingMO.getAddress().length() == 0
                || mPendingMO.getAddress().indexOf(PhoneNumberUtils.WILD) >= 0
        ) {
                || mPendingMO.getAddress().indexOf(PhoneNumberUtils.WILD) >= 0) {
            // Phone number is invalid
            mPendingMO.mCause = DisconnectCause.INVALID_NUMBER;

@@ -491,11 +490,13 @@ public class GsmCdmaCallTracker extends CallTracker {
        }
    }

    //GSM
    Connection
    dial(String dialString, UUSInfo uusInfo, Bundle intentExtras) throws CallStateException {
        return dial(dialString, CommandsInterface.CLIR_DEFAULT, uusInfo, intentExtras);
    }

    //GSM
    Connection
    dial(String dialString, int clirMode, Bundle intentExtras) throws CallStateException {
        return dial(dialString, clirMode, null, intentExtras);
@@ -870,10 +871,14 @@ public class GsmCdmaCallTracker extends CallTracker {
                        newRinging = checkMtFindNewRinging(dc,i);
                        if (newRinging == null) {
                            unknownConnectionAppeared = true;
                            if (isPhoneTypeGsm()) {
                                newUnknownConnectionsGsm.add(mConnections[i]);
                            } else {
                                newUnknownConnectionCdma = mConnections[i];
                            }
                        }
                    }
                }
                hasNonHangupStateChanged = true;
            } else if (conn != null && dc == null) {
                if (isPhoneTypeGsm()) {
@@ -965,8 +970,7 @@ public class GsmCdmaCallTracker extends CallTracker {
                        || (dc.state == DriverCall.State.INCOMING
                            /*&& cm.getOption(cm.OPTION_POLL_INCOMING)*/)
                        || (dc.state == DriverCall.State.WAITING
                            /*&& cm.getOption(cm.OPTION_POLL_WAITING)*/)
                    ) {
                            /*&& cm.getOption(cm.OPTION_POLL_WAITING)*/)) {
                        // Sometimes there's no unsolicited notification
                        // for state transitions
                        needsPollDelay = true;
@@ -1157,6 +1161,7 @@ public class GsmCdmaCallTracker extends CallTracker {
            // the hangup reason is user ignoring or timing out. So conn.onDisconnect()
            // is not called here. Instead, conn.onLocalDisconnect() is called.
            conn.onLocalDisconnect();

            updatePhoneState();
            mPhone.notifyPreciseCallStateChanged();
            return;
@@ -1207,8 +1212,7 @@ public class GsmCdmaCallTracker extends CallTracker {

    //***** Called from GsmCdmaCall

    /* package */ void
    hangup (GsmCdmaCall call) throws CallStateException {
    public void hangup (GsmCdmaCall call) throws CallStateException {
        if (call.getConnections().size() == 0) {
            throw new CallStateException("no connections in call");
        }
@@ -1422,6 +1426,7 @@ public class GsmCdmaCallTracker extends CallTracker {
                    causeCode == CallFailCause.QOS_NOT_AVAIL ||
                    causeCode == CallFailCause.BEARER_NOT_AVAIL ||
                    causeCode == CallFailCause.ERROR_UNSPECIFIED) {

                    CellLocation loc = mPhone.getCellLocation();
                    int cid = -1;
                    if (loc != null) {
@@ -1435,9 +1440,7 @@ public class GsmCdmaCallTracker extends CallTracker {
                            TelephonyManager.getDefault().getNetworkType());
                }

                for (int i = 0, s =  mDroppedDuringPoll.size()
                        ; i < s ; i++
                ) {
                for (int i = 0, s = mDroppedDuringPoll.size(); i < s ; i++) {
                    GsmCdmaConnection conn = mDroppedDuringPoll.get(i);

                    conn.onRemoteDisconnect(causeCode, vendorCause);