From 30cd3fe33a8735c0b6096a1ff9470f6b0e62b5f1 Mon Sep 17 00:00:00 2001 From: Ganesh Ganapathi Batta Date: Mon, 20 Aug 2012 18:46:17 -0700 Subject: Ignore AVRCP Pause command from carkits right after the call Certain carkits (e.g Audi MMI 2801)send AVRCP Pause command right after the call if there was an active music streaming when the call was answered. This command needs to be ignored as Phone/MediaPlayer will take care of music Play/pause after the call based on the state of the streaming before the call Change-Id: Iddb50089bff0f54bc3ad9665f95e64d3083c568a --- btif/src/btif_rc.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) mode change 100644 => 100755 btif/src/btif_rc.c (limited to 'btif') diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c old mode 100644 new mode 100755 index 248696a..1e8a220 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -353,18 +353,19 @@ void handle_rc_passthrough_cmd ( tBTA_AV_REMOTE_CMD *p_remote_cmd) pressed = 1; } - /* If this is Play command (press or release) before processing, check the following - *a voice call has ended recently - * the remote device is not of type headset - * If the above conditions meet, drop the Play command - *This fix is to interop with certain carkits which sends an automatic PLAY commands right after call ends - */ - if((p_remote_cmd->rc_id == BTA_AV_RC_PLAY )&& + /* If this is Play/Pause command (press or release) before processing, check the following + * a voice call has ended recently + * the remote device is not of type headset + * If the above conditions meet, drop the Play/Pause command + * This fix is to interop with certain carkits which sends an automatic PLAY or PAUSE + * commands right after call ends + */ + if((p_remote_cmd->rc_id == BTA_AV_RC_PLAY || p_remote_cmd->rc_id == BTA_AV_RC_PAUSE)&& (btif_hf_call_terminated_recently() == TRUE) && (check_cod( (const bt_bdaddr_t*)&(btif_rc_cb.rc_addr), COD_AV_HEADSETS) != TRUE)) { - BTIF_TRACE_DEBUG1("%s:Dropping the play command received right after call end", - __FUNCTION__); + BTIF_TRACE_DEBUG2("%s:Dropping the play/Pause command received right after call end cmd:%d", + __FUNCTION__,p_remote_cmd->rc_id); return; } -- cgit v1.1