From e79eaef05e0778917dcc77d95292370d5aa4491e Mon Sep 17 00:00:00 2001 From: Sharvil Nanavati Date: Tue, 15 Mar 2016 13:13:45 -0700 Subject: [PATCH] Don't send AT+BCC if local device doesn't support codec negotiation. The current code only checked if the peer supported codec negotiation before sending AT+BCC. But if codec negotation is disabled on the local device, we should definitely not send AT+BCC. Bug: 27213013 Change-Id: Id372a32a61a3d96d5c093bc50594ef0b8c2eff2e --- btif/src/btif_hf_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/btif/src/btif_hf_client.c b/btif/src/btif_hf_client.c index 5458dac21..bdf08749c 100644 --- a/btif/src/btif_hf_client.c +++ b/btif/src/btif_hf_client.c @@ -272,7 +272,8 @@ static bt_status_t connect_audio( bt_bdaddr_t *bd_addr ) if (is_connected(bd_addr)) { - if (btif_hf_client_cb.peer_feat & BTA_HF_CLIENT_PEER_CODEC) + if ((BTIF_HF_CLIENT_FEATURES & BTA_HF_CLIENT_FEAT_CODEC) && + (btif_hf_client_cb.peer_feat & BTA_HF_CLIENT_PEER_CODEC)) { BTA_HfClientSendAT(btif_hf_client_cb.handle, BTA_HF_CLIENT_AT_CMD_BCC, 0, 0, NULL); } -- 2.11.0