From 79feed52b5f270f179949c8a85ff9e19a0981557 Mon Sep 17 00:00:00 2001 From: Kausik Sinnaswamy Date: Wed, 4 Apr 2012 10:29:06 +0530 Subject: Added ACL Connected/Disconnected events/callbacks to Bluetooth HAL Change-Id: I917dcdf4077a1af790cd7d52da309274ca1d9753 --- btif/src/btif_dm.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'btif/src') diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 28b0bd3..4c0c15a 100644 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -1048,8 +1048,21 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param) } }break; - case BTA_DM_AUTHORIZE_EVT: + case BTA_DM_LINK_UP_EVT: + bdcpy(bd_addr.address, p_data->link_up.bd_addr); + BTIF_TRACE_DEBUG0("BTA_DM_LINK_UP_EVT. Sending BT_ACL_STATE_CONNECTED"); + HAL_CBACK(bt_hal_cbacks, acl_state_changed_cb, BT_STATUS_SUCCESS, + &bd_addr, BT_ACL_STATE_CONNECTED); + break; + case BTA_DM_LINK_DOWN_EVT: + bdcpy(bd_addr.address, p_data->link_down.bd_addr); + BTIF_TRACE_DEBUG0("BTA_DM_LINK_DOWN_EVT. Sending BT_ACL_STATE_DISCONNECTED"); + HAL_CBACK(bt_hal_cbacks, acl_state_changed_cb, BT_STATUS_SUCCESS, + &bd_addr, BT_ACL_STATE_DISCONNECTED); + break; + + case BTA_DM_AUTHORIZE_EVT: case BTA_DM_SIG_STRENGTH_EVT: case BTA_DM_SP_RMT_OOB_EVT: case BTA_DM_SP_KEYPRESS_EVT: -- cgit v1.1