From c916ed5ff29854cb1ea96673b735eaa1ced60d02 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 19 Nov 2013 16:51:45 +0100 Subject: [PATCH] android/hal-bluetooth: Add support for get remote device property cmd This command is used to get remote device property of specifided type. --- android/hal-bluetooth.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index 69c304a9b..4a09a5c40 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -531,13 +531,22 @@ static int get_remote_device_properties(bt_bdaddr_t *remote_addr) static int get_remote_device_property(bt_bdaddr_t *remote_addr, bt_property_type_t type) { + struct hal_cmd_get_remote_device_prop cmd; + DBG("bdaddr: %s prop: %s", bdaddr2str(remote_addr), bt_property_type_t2str(type)); if (!interface_ready()) return BT_STATUS_NOT_READY; - return BT_STATUS_UNSUPPORTED; + memcpy(cmd.bdaddr, remote_addr, sizeof(cmd.bdaddr)); + + /* type match IPC type */ + cmd.type = type; + + return hal_ipc_cmd(HAL_SERVICE_ID_BLUETOOTH, + HAL_OP_GET_REMOTE_DEVICE_PROP, + sizeof(cmd), &cmd, 0, NULL, NULL); } static int set_remote_device_property(bt_bdaddr_t *remote_addr, -- 2.47.3