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

Commit ba0e1b43 authored by Mallikarjuna GB's avatar Mallikarjuna GB Committed by Andre Eisenbach
Browse files

Set correct callState for MT/MO call while in Voip Call.

Use case:
Start MO/MT call during VOIP call.

Failure:
Incorrect response sent to AT+CIND? to headset

Root cause:
terminateScoUsingVirtualVoiceCall() resets callState
from INCOMING/DIALING to IDLE. At the same time, if HS sends AT+CIND?
to read call indicators, it will get wrong value of callsetup. This case
is hit only when SCO for VOIP call is not terminated via SDK API call.

Fix:
When VOIP is ended, save current MO/MT call state to
HeadsetPhoneState class to be able to respond with
proper call states when queried by headset.

Change-Id: Ia3a0a2d67dbfffef474de48cab6ee63b82fa4572
parent 72650488
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2656,6 +2656,16 @@ final class HeadsetStateMachine extends StateMachine {
                    || callState.mCallState != HeadsetHalConstants.CALL_STATE_IDLE) {
                terminateScoUsingVirtualVoiceCall();
            }

            // Specific handling for case of starting MO/MT call while VOIP
            // ongoing, terminateScoUsingVirtualVoiceCall() resets callState
            // INCOMING/DIALING to IDLE. Some HS send AT+CIND? to read call
            // and get wrong value of callsetup. This case is hit only
            // SCO for VOIP call is not terminated via SDK API call.
            if (mPhoneState.getCallState() != callState.mCallState) {
                mPhoneState.setCallState(callState.mCallState);
            }

            // at this step: if there is virtual call ongoing, it means there is no CSV call
            // let virtual call continue and skip phone state update
            if (!isVirtualCallInProgress()) {