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

Commit 35c77cd6 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Fix In Conference MMI codes

According to the 3gpp spec, when in a GSM conference, one of the
participants can be disconnected when a specific MMI code is placed.
This code includes the index of the participant being disconnected.
When the participant is disconnected using this method, the GsmCdmaConnection
stays in the DISCONNECTED state in the GsmCdmaCall until all
GsmCdmaConnections in the conference are disconnected. This causes an
issue in GsmCdmaCallTracker#hangupConnectionByIndex because the
getGsmCdmaIndex() method will always return an Exception if the
connection is in the DISCONNECTED state.

We now explicitly check if the GsmCdmaConnection has been disconnected
before querying the connection index.

Test: Manual
Bug: 29588832
Change-Id: I5f71937fbaa75bb93aa2175791a01fa063cb12ac
parent 9a550b94
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1259,7 +1259,7 @@ public class GsmCdmaCallTracker extends CallTracker {
        int count = call.mConnections.size();
        for (int i = 0; i < count; i++) {
            GsmCdmaConnection cn = (GsmCdmaConnection)call.mConnections.get(i);
            if (cn.getGsmCdmaIndex() == index) {
            if (!cn.mDisconnected && cn.getGsmCdmaIndex() == index) {
                mCi.hangupConnection(index, obtainCompleteMessage());
                return;
            }
@@ -1273,8 +1273,10 @@ public class GsmCdmaCallTracker extends CallTracker {
            int count = call.mConnections.size();
            for (int i = 0; i < count; i++) {
                GsmCdmaConnection cn = (GsmCdmaConnection)call.mConnections.get(i);
                if (!cn.mDisconnected) {
                    mCi.hangupConnection(cn.getGsmCdmaIndex(), obtainCompleteMessage());
                }
            }
        } catch (CallStateException ex) {
            Rlog.e(LOG_TAG, "hangupConnectionByIndex caught " + ex);
        }
@@ -1285,7 +1287,7 @@ public class GsmCdmaCallTracker extends CallTracker {
        int count = call.mConnections.size();
        for (int i = 0; i < count; i++) {
            GsmCdmaConnection cn = (GsmCdmaConnection)call.mConnections.get(i);
            if (cn.getGsmCdmaIndex() == index) {
            if (!cn.mDisconnected && cn.getGsmCdmaIndex() == index) {
                return cn;
            }
        }