From 6312df1ed50e3dc87bcac2c5b144ad5f28be64af Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Fri, 25 Oct 2013 12:50:03 +0200 Subject: [PATCH] android/hal: Add support for sending cancel bond command This allows HAL to cancel pending bonding. --- android/hal-bluetooth.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index 6f7ef454b..ebaa877c1 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -290,12 +290,17 @@ static int create_bond(const bt_bdaddr_t *bd_addr) static int cancel_bond(const bt_bdaddr_t *bd_addr) { + struct hal_cmd_cancel_bond cmd; + DBG(""); if (!interface_ready()) return BT_STATUS_NOT_READY; - return BT_STATUS_UNSUPPORTED; + memcpy(cmd.bdaddr, bd_addr, sizeof(cmd.bdaddr)); + + return hal_ipc_cmd(HAL_SERVICE_ID_BLUETOOTH, HAL_OP_CANCEL_BOND, + sizeof(cmd), &cmd, 0, NULL, NULL); } static int remove_bond(const bt_bdaddr_t *bd_addr) -- 2.47.3