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

Commit f3a8ca3b authored by Anubhav Gupta's avatar Anubhav Gupta Committed by Andre Eisenbach
Browse files

Ignore STOP command if A2DP stream is suspended

Ignore STOP command if A2DP stream is already suspended.
Some carkits send STOP command before VOIP call initiation
but don't send PLAY when call ends which hinders DUT to resume
audio playback after call termination.

Change-Id: I41cc1fc6f4b6cfaa1560d729baa0ca27f6dfe8c8
parent d56a0ace
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -549,6 +549,13 @@ void handle_rc_passthrough_cmd ( tBTA_AV_REMOTE_CMD *p_remote_cmd)
            return;
        }
    }

    if ((p_remote_cmd->rc_id == BTA_AV_RC_STOP) && (!btif_av_stream_started_ready()))
    {
        APPL_TRACE_WARNING("%s: Stream suspended, ignore STOP cmd",__FUNCTION__);
        return;
    }

    if (p_remote_cmd->key_state == AVRC_STATE_RELEASE) {
        status = "released";
        pressed = 0;