diff options
Diffstat (limited to 'android/hal-hidhost.c')
-rw-r--r-- | android/hal-hidhost.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c index 58b0218fe..3cfc6b63b 100644 --- a/android/hal-hidhost.c +++ b/android/hal-hidhost.c @@ -102,6 +102,16 @@ static void handle_virtual_unplug(void *buf, uint16_t len, int fd) ev->status); } +static void handle_handshake(void *buf, uint16_t len, int fd) +{ +#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0) + struct hal_ev_hidhost_handshake *ev = buf; + + if (cbacks->handshake_cb) + cbacks->handshake_cb((bt_bdaddr_t *) ev->bdaddr, ev->status); +#endif +} + /* * handlers will be called from notification thread context, * index in table equals to 'opcode - HAL_MINIMUM_EVENT' @@ -120,6 +130,7 @@ static const struct hal_ipc_handler ev_handlers[] = { /* HAL_EV_HIDHOST_VIRTUAL_UNPLUG */ { handle_virtual_unplug, false, sizeof(struct hal_ev_hidhost_virtual_unplug) }, + { handle_handshake, false, sizeof(struct hal_ev_hidhost_handshake) }, }; static bt_status_t hidhost_connect(bt_bdaddr_t *bd_addr) |