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

Commit 2b944f3b authored by Hemant Gupta's avatar Hemant Gupta Committed by Andre Eisenbach
Browse files

SAP: Handle disconnect indication message type properly

Usecase:
1) Connect DUT with Mecapp PC App supporting SAP
2) When SAP is connected, remove SIM card on DUT.

Expected Behaviour:
DUT should send disconnect indication to remote device

Observed behaviour:
DUT not sending disconnect indication to remote device

Root Cause:
DUT is not handling the message type for disconnection received
from RIL layer properly.

Fix:
Use correct message type for disconnect indication from RIL in
handleRilInd() API
(SapMessage.ID_DISCONNECT_IND -> SapMessage.ID_RIL_UNSOL_DISCONNECT_IND).

Test: Checked if disconnect indication is sent out when SIM card is removed.
Bug: 62937720
Change-Id: Ib63b7290d9f7c7af57ee25401d5bcfb7ba600b07
parent 0e535fa8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1248,6 +1248,8 @@ public class SapMessage {
                    return "ID_SET_TRANSPORT_PROTOCOL_RESP";
                case ID_RIL_UNSOL_CONNECTED:
                    return "ID_RIL_UNSOL_CONNECTED";
                case ID_RIL_UNSOL_DISCONNECT_IND:
                    return "ID_RIL_UNSOL_DISCONNECT_IND";
                case ID_RIL_UNKNOWN:
                    return "ID_RIL_UNKNOWN";
                case ID_RIL_GET_SIM_STATUS_REQ:
+1 −1
Original line number Diff line number Diff line
@@ -899,7 +899,7 @@ public class SapServer extends Thread implements Callback {
        }

        switch (sapMsg.getMsgType()) {
            case SapMessage.ID_DISCONNECT_IND: {
            case SapMessage.ID_RIL_UNSOL_DISCONNECT_IND: {
                if (mState != SAP_STATE.DISCONNECTED && mState != SAP_STATE.DISCONNECTING) {
                /* we only send disconnect indication to the client if we are actually connected*/
                    SapMessage reply = new SapMessage(SapMessage.ID_DISCONNECT_IND);