summaryrefslogtreecommitdiff
path: root/android/hal-hidhost.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-11-20 12:18:49 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-11-20 16:10:13 +0100
commitdc0108525a6d2e0387f869dc8304e8877adec344 (patch)
treebb7e091ea78ffff129e3f36ac7792ebb32219736 /android/hal-hidhost.c
parent0c2f9d6bf898b1588efa624b047a63affd6212e0 (diff)
downloadbluez-dc0108525a6d2e0387f869dc8304e8877adec344.tar.gz
android/hal-hidhost: Update HidHost HAL for Android 5
Diffstat (limited to 'android/hal-hidhost.c')
-rw-r--r--android/hal-hidhost.c11
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)