diff options
Diffstat (limited to 'btif')
-rwxr-xr-x[-rw-r--r--] | btif/src/btif_av.c | 6 | ||||
-rw-r--r-- | btif/src/btif_rc.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index a2de03e..d25fb61 100644..100755 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -399,7 +399,6 @@ static BOOLEAN btif_av_state_closing_handler(btif_sm_event_t event, void *p_data /* immediately stop transmission of frames */ btif_a2dp_set_tx_flush(TRUE); - /* wait for audioflinger to stop a2dp */ break; @@ -963,7 +962,8 @@ const btav_interface_t *btif_av_get_interface(void) ** Returns boolean ** *******************************************************************************/ -BOOLEAN btif_av_is_rc_open_without_a2dp(void) +BOOLEAN btif_av_is_connected(void) { - return (tle_av_open_on_rc.in_use); + btif_sm_state_t state = btif_sm_get_state(btif_av_cb.sm_handle); + return ((state == BTIF_AV_STATE_OPENED) || (state == BTIF_AV_STATE_STARTED)); } diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c index 530c7f1..68ddf5b 100644 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -100,7 +100,7 @@ static btif_rc_cb_t btif_rc_cb; ******************************************************************************/ extern BOOLEAN btif_hf_call_terminated_recently(); extern BOOLEAN check_cod(const bt_bdaddr_t *remote_bdaddr, uint32_t cod); -BOOLEAN btif_av_is_rc_open_without_a2dp(void); +extern BOOLEAN btif_av_is_connected(void); /***************************************************************************** ** Functions @@ -299,7 +299,7 @@ void handle_rc_passthrough_cmd ( tBTA_AV_REMOTE_CMD *p_remote_cmd) if (p_remote_cmd) { /* queue AVRC PLAY if GAVDTP Open notification to app is pending (2 second timer) */ - if ((p_remote_cmd->rc_id == BTA_AV_RC_PLAY) && btif_av_is_rc_open_without_a2dp()) + if ((p_remote_cmd->rc_id == BTA_AV_RC_PLAY) && (!btif_av_is_connected())) { if (p_remote_cmd->key_state == AVRC_STATE_PRESS) { |