Add container handling logic
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-adapter.c
index c760552..ec9f7f3 100644 (file)
@@ -73,13 +73,13 @@ static int __bt_fill_device_list(GArray *out_param2, GPtrArray **dev_list)
 
 BT_EXPORT_API int bluetooth_check_adapter(void)
 {
-       int value = VCONFKEY_BT_STATUS_OFF;
+#ifndef TIZEN_BLUEDROID_PORTING
        int ret;
-
        ret = _bt_get_adapter_path(_bt_get_system_common_conn(), NULL);
-
-       if (ret != BLUETOOTH_ERROR_NONE)
-               return BLUETOOTH_ADAPTER_DISABLED;
+       return ret == BLUETOOTH_ERROR_NONE ? BLUETOOTH_ADAPTER_ENABLED :
+                                               BLUETOOTH_ADAPTER_DISABLED;
+#else
+       int value = VCONFKEY_BT_STATUS_OFF;
 
        /* check VCONFKEY_BT_STATUS */
        if (vconf_get_int(VCONFKEY_BT_STATUS, &value) != 0) {
@@ -89,6 +89,7 @@ BT_EXPORT_API int bluetooth_check_adapter(void)
 
        return value == VCONFKEY_BT_STATUS_OFF ? BLUETOOTH_ADAPTER_DISABLED :
                                                BLUETOOTH_ADAPTER_ENABLED;
+#endif
 }
 
 BT_EXPORT_API int bluetooth_enable_adapter(void)