From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> --- android/hal-bluetooth.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index a0ee844..91c5f97 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -254,6 +254,18 @@ static void handle_device_state_changed(void *buf, uint16_t len) device_hal_props_cleanup(props, ev->num_props); } +static void handle_acl_state_changed(void *buf) +{ + struct hal_ev_acl_state_changed *ev = buf; + bt_bdaddr_t *addr = (bt_bdaddr_t *) ev->bdaddr; + + DBG("state %u", ev->state); + + if (bt_hal_cbacks->acl_state_changed_cb) + bt_hal_cbacks->acl_state_changed_cb(ev->status, addr, + ev->state); +} + /* will be called from notification thread context */ void bt_notify_adapter(uint16_t opcode, void *buf, uint16_t len) { @@ -287,6 +299,9 @@ void bt_notify_adapter(uint16_t opcode, void *buf, uint16_t len) case HAL_EV_SSP_REQUEST: handle_ssp_request(buf); break; + case HAL_EV_ACL_STATE_CHANGED: + handle_acl_state_changed(buf); + break; default: DBG("Unhandled callback opcode=0x%x", opcode); break; -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html