diff options
author | Andre Eisenbach <andre@broadcom.com> | 2012-05-16 14:55:03 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:20 -0700 |
commit | 193262bd8e44e392a4bf2f3ac0705e6d3e101ee1 (patch) | |
tree | 9111eebbf2e7b47959caedfe4ba1bcc65c6a7b5d | |
parent | 5ef33f85f610320fc95687f5e2f532101cfabfa4 (diff) | |
download | external_bluetooth_bluedroid-193262bd8e44e392a4bf2f3ac0705e6d3e101ee1.zip external_bluetooth_bluedroid-193262bd8e44e392a4bf2f3ac0705e6d3e101ee1.tar.gz external_bluetooth_bluedroid-193262bd8e44e392a4bf2f3ac0705e6d3e101ee1.tar.bz2 |
Cleaned-up HF/AV profile serialization code
Change-Id: I064e750d7a446aa1785324df3df1b6b9fc80848e
-rw-r--r-- | btif/src/btif_av.c | 10 | ||||
-rwxr-xr-x | btif/src/btif_hf.c | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index d8805df..b350448 100644 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -731,20 +731,16 @@ static bt_status_t connect_int(bt_bdaddr_t *bd_addr) { BTIF_TRACE_EVENT1("%s", __FUNCTION__); - BTIF_TRACE_ERROR1("callbacks is 0x%x", bt_av_callbacks); - CHECK_BTAV_INIT(); - - memcpy(&btif_av_cb.peer_bda, bd_addr, sizeof(bt_bdaddr_t)); - BTA_AvOpen(btif_av_cb.peer_bda.address, btif_av_cb.bta_handle, - TRUE, BTA_SEC_NONE); - btif_sm_change_state(btif_av_cb.sm_handle, BTIF_AV_STATE_OPENING); + btif_sm_dispatch(btif_av_cb.sm_handle, BTIF_AV_CONNECT_REQ_EVT, (char*)bd_addr); return BT_STATUS_SUCCESS; } static bt_status_t connect(bt_bdaddr_t *bd_addr) { + BTIF_TRACE_EVENT1("%s", __FUNCTION__); CHECK_BTAV_INIT(); + return btif_queue_connect(UUID_SERVCLASS_AUDIO_SOURCE, bd_addr, connect_int); } diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index f413c42..2db01fd 100755 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -495,8 +495,6 @@ static bt_status_t init( bthf_callbacks_t* callbacks ) *******************************************************************************/ static bt_status_t connect_int( bt_bdaddr_t *bd_addr ) { - CHECK_BTHF_INIT(); - if (!is_connected(bd_addr)) { btif_hf_cb.state = BTHF_CONNECTION_STATE_CONNECTING; |