summaryrefslogtreecommitdiffstats
path: root/btif/src
diff options
context:
space:
mode:
authorKausik Sinnaswamy <kausik@broadcom.com>2012-04-04 10:29:06 +0530
committerMatthew Xie <mattx@google.com>2012-07-14 11:19:18 -0700
commit79feed52b5f270f179949c8a85ff9e19a0981557 (patch)
tree3d4b72b3e05901758b1eb5835ca99fcf5c117e47 /btif/src
parent80131bd21889cfecf9389e2709a793e6f53da523 (diff)
downloadexternal_bluetooth_bluedroid-79feed52b5f270f179949c8a85ff9e19a0981557.zip
external_bluetooth_bluedroid-79feed52b5f270f179949c8a85ff9e19a0981557.tar.gz
external_bluetooth_bluedroid-79feed52b5f270f179949c8a85ff9e19a0981557.tar.bz2
Added ACL Connected/Disconnected events/callbacks to Bluetooth HAL
Change-Id: I917dcdf4077a1af790cd7d52da309274ca1d9753
Diffstat (limited to 'btif/src')
-rw-r--r--btif/src/btif_dm.c15
1 files changed, 14 insertions, 1 deletions
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: