OSDN Git Service

Allow Carkit to trigger play immediately after call
authorAyan Ghosh <abghosh@codeaurora.org>
Wed, 7 Aug 2013 14:35:29 +0000 (20:05 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 25 Mar 2016 20:01:40 +0000 (13:01 -0700)
Removing check in stack where AVRCP Play and Pause commands
are being dropped if carkit initiates play or pause within
six seconds.
This addresses the scenario where JCI-Mazda CK pauses the
streaming by initiating Avrcp Pause right before making call
and can not resume the streaming by sending Avrcp Play right
after call ends.

Bug: 27852645
Change-Id: Ibb04223de746f528b356e78bd65130d3fd526a44

btif/src/btif_rc.c

index 72c9034..c773524 100644 (file)
@@ -727,22 +727,6 @@ void handle_rc_passthrough_cmd ( tBTA_AV_REMOTE_CMD *p_remote_cmd)
         pressed = 1;
     }
 
-    /* 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_DEBUG("%s:Dropping the play/Pause command received right after call end cmd:%d",
-                           __FUNCTION__,p_remote_cmd->rc_id);
-        return;
-    }
-
     if (p_remote_cmd->rc_id == BTA_AV_RC_FAST_FOR || p_remote_cmd->rc_id == BTA_AV_RC_REWIND) {
         HAL_CBACK(bt_rc_callbacks, passthrough_cmd_cb, p_remote_cmd->rc_id, pressed);
         return;