summaryrefslogtreecommitdiff
path: root/android/handsfree-client.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-11-19 10:43:39 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-11-19 15:07:32 +0100
commit05bebbaa1fc2223ce0d5dc29cedbfdf4414a64cc (patch)
tree67e47656ec427659eca36748c4903eccda1edabb /android/handsfree-client.c
parent8774912f14f35f10bb0a9b71924f6f8180dc9852 (diff)
downloadbluez-05bebbaa1fc2223ce0d5dc29cedbfdf4414a64cc.tar.gz
android/handsfree-client: Implement query current calls
Diffstat (limited to 'android/handsfree-client.c')
-rw-r--r--android/handsfree-client.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/android/handsfree-client.c b/android/handsfree-client.c
index 955b9ebd8..da260e0b6 100644
--- a/android/handsfree-client.c
+++ b/android/handsfree-client.c
@@ -597,10 +597,26 @@ done:
static void handle_query_current_calls(const void *buf, uint16_t len)
{
- DBG("Not Implemented");
+ struct device *dev;
+ uint8_t status;
+
+ DBG("");
+
+ dev = find_default_device();
+ if (!dev) {
+ status = HAL_STATUS_FAILED;
+ goto done;
+ }
+
+ if (hfp_hf_send_command(dev->hf, cmd_complete_cb, NULL, "AT+CLCC"))
+ status = HAL_STATUS_SUCCESS;
+ else
+ status = HAL_STATUS_FAILED;
+
+done:
ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_HANDSFREE_CLIENT,
HAL_OP_HF_CLIENT_QUERY_CURRENT_CALLS,
- HAL_STATUS_UNSUPPORTED);
+ status);
}
static void handle_query_operator_name(const void *buf, uint16_t len)