From c8c082b730910b64dbc38a7ee89bb141be46daa6 Mon Sep 17 00:00:00 2001 From: Mallikarjuna GB Date: Wed, 8 Oct 2014 14:01:16 +0530 Subject: [PATCH] SCO connection should happen after SLC. This change makes sure that SCO audio connection request is not processed until HFP SLC connection is done. Change-Id: Ia2fcad49882deaaf049ae190d90442e5ca7ad71b --- btif/src/btif_hf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index 2046965b7..4ac4735a1 100644 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -802,6 +802,10 @@ static bt_status_t connect_audio( bt_bdaddr_t *bd_addr ) int idx = btif_hf_idx_by_bdaddr(bd_addr); + /* Check if SLC is connected */ + if (btif_hf_check_if_slc_connected() != BT_STATUS_SUCCESS) + return BT_STATUS_NOT_READY; + if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) { BTA_AgAudioOpen(btif_hf_cb[idx].handle); -- 2.11.0