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

Commit 61b9c2ee authored by kunleiz's avatar kunleiz
Browse files

hal: Use call state to ensure voice call start

When RIL goes from CALL_ACTIVE to  CALL_INACTIVE,
voice session would be closed. And call_state is
set to INACTIVE whereas in_call flag is not reset.
This would cause any subsequent voice call usecase
cannot set up as in_call flag already is true.

Fix by checking current call state instead of in_call
flag to start voice call.

CRs-Fixed: 2130335
Change-Id: Ib449b2ba71b1e998d51df8ae5d2348f651b08751
parent c4efbf0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3645,7 +3645,7 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
            out->devices = new_dev;

            if (output_drives_call(adev, out)) {
                if(!voice_is_in_call(adev)) {
                if (!voice_is_call_state_active(adev)) {
                    if (adev->mode == AUDIO_MODE_IN_CALL) {
                        adev->current_call_output = out;
                        ret = voice_start_call(adev);