From e9336144bb19251f1fb8e57265ab43c699262987 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Tue, 22 Oct 2013 15:24:56 +0200 Subject: [PATCH] adapter/hal: Implement adapter enable call --- android/hal-bluetooth.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index 2c8a902e6..d5019a402 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -98,9 +98,19 @@ fail: static int enable(void) { + int ret; + DBG(""); - return BT_STATUS_UNSUPPORTED; + if (!interface_ready()) + return BT_STATUS_NOT_READY; + + ret = hal_ipc_cmd(HAL_SERVICE_ID_CORE, HAL_MSG_OP_BT_ENABLE, 0, NULL, + 0, NULL, NULL); + if (ret < 0) + return -ret; + + return BT_STATUS_SUCCESS; } static int disable(void) -- 2.47.3