Diff between 6554000ab752a2b8094f365698481ff2022f040c and 981b04355e4219aefe4af1ff4464327d0ddc9fa7

Changed Files

File Additions Deletions Status
android/hal-bluetooth.c +15 -0 modified

Full Patch

diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c
index a6228d7..d216035 100644
--- a/android/hal-bluetooth.c
+++ b/android/hal-bluetooth.c
@@ -248,6 +248,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)
 {
@@ -279,6 +291,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;