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)