From d529b13fe415b91c83a2361ef24fdb51c6d8ffe4 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Mon, 27 Jun 2022 17:14:21 +0900 Subject: [PATCH] bt-api: Add container handling logic Don't read vconf to check le status Change-Id: Idae35113635cdc0d51ca5cc6930b0cc737da6855 --- bt-api/bt-adapter-le.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bt-api/bt-adapter-le.c b/bt-api/bt-adapter-le.c index efd8ef6..8ef132d 100644 --- a/bt-api/bt-adapter-le.c +++ b/bt-api/bt-adapter-le.c @@ -29,23 +29,24 @@ static gboolean is_le_scanning = FALSE; BT_EXPORT_API int bluetooth_check_adapter_le(void) { +#ifndef TIZEN_BLUEDROID_PORTING int ret; - int value; - ret = _bt_get_adapter_path(_bt_get_system_common_conn(), NULL); - - if (ret != BLUETOOTH_ERROR_NONE) - return BLUETOOTH_ADAPTER_LE_DISABLED; + return ret == BLUETOOTH_ERROR_NONE ? BLUETOOTH_ADAPTER_ENABLED : + BLUETOOTH_ADAPTER_DISABLED; +#else + int value = VCONFKEY_BT_LE_STATUS_OFF; ret = vconf_get_int(VCONFKEY_BT_LE_STATUS, &value); if (ret != 0) { BT_ERR("fail to get vconf key!"); - return ret; + return BLUETOOTH_ADAPTER_LE_DISABLED; } BT_DBG("value : %d", value); return value == VCONFKEY_BT_LE_STATUS_ON ? BLUETOOTH_ADAPTER_LE_ENABLED : BLUETOOTH_ADAPTER_LE_DISABLED; +#endif } BT_EXPORT_API int bluetooth_enable_adapter_le(void) -- 2.7.4