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

Commit d19f44f3 authored by John Wang's avatar John Wang
Browse files

Fix the audio mode glitch during hangup.

Fix bug # 3136179.

Keep audio mode as IN_CALL during hangup DISCONNECTING state

to prevent the NORMAL and IN_CALL glitch in auiod setMode.

Change-Id: I5513a3d5c65bd13ac054c9718c4dbd7d6db9eaf3
parent a784d552
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -380,7 +380,11 @@ public final class CallManager {
                break;
            case OFFHOOK:
                Phone fgPhone = getFgPhone();
                if (hasActiveFgCall() && !(fgPhone instanceof SipPhone)) {
                // Enable IN_CALL mode while foreground call is in DIALING,
                // ALERTING, ACTIVE and DISCONNECTING state and not from sipPhone
                if (getActiveFgCallState() != Call.State.IDLE
                        && getActiveFgCallState() != Call.State.DISCONNECTED
                        && !(fgPhone instanceof SipPhone)) {
                    mode = AudioManager.MODE_IN_CALL;
                }
                break;