From 1dbc9f0c5c26474e747524e8993af3fb2a2ea5d2 Mon Sep 17 00:00:00 2001 From: Corentin Lecouvey Date: Wed, 10 Dec 2014 18:18:06 +0100 Subject: [PATCH] remove some bt enable checks bluetooth adapter doesn't need to be powered on for gettting adapter properties. Remove those checks allows to retrieve adapter properties from tizen.bluetooth.getDefaultAdapter() Web API call even if adapter is powered off. It helps to fix TC-1994. Change-Id: If41ca8ac5a23a73c22e776cf2a19e4c4b0a819c9 Signed-off-by: Corentin Lecouvey --- bt-api/bt-adapter.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/bt-api/bt-adapter.c b/bt-api/bt-adapter.c index acd5f2a..b4794c9 100644 --- a/bt-api/bt-adapter.c +++ b/bt-api/bt-adapter.c @@ -134,7 +134,6 @@ BT_EXPORT_API int bluetooth_get_local_address(bluetooth_device_address_t *local_ int result; BT_CHECK_PARAMETER(local_address, return); - BT_CHECK_ENABLED(return); BT_INIT_PARAMS(); BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param); @@ -157,7 +156,6 @@ BT_EXPORT_API int bluetooth_get_local_name(bluetooth_device_name_t *local_name) int result; BT_CHECK_PARAMETER(local_name, return); - BT_CHECK_ENABLED(return); BT_INIT_PARAMS(); BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param); @@ -231,22 +229,6 @@ BT_EXPORT_API int bluetooth_get_discoverable_mode(bluetooth_discoverable_mode_t BT_CHECK_PARAMETER(discoverable_mode_ptr, return); - /* Requirement in OSP */ - if (bluetooth_check_adapter() == BLUETOOTH_ADAPTER_DISABLED) { - if (vconf_get_int(BT_FILE_VISIBLE_TIME, &timeout) != 0) { - BT_ERR("Fail to get the timeout value"); - return BLUETOOTH_ERROR_INTERNAL; - } - - if (timeout == -1) { - *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_GENERAL_DISCOVERABLE; - } else { - *discoverable_mode_ptr = BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE; - } - - return BLUETOOTH_ERROR_NONE; - } - BT_INIT_PARAMS(); BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param); -- 2.7.4