DPM: Modify/Remove the DPM APIs and Expose DPM BT-APIs
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-adapter.c
old mode 100755 (executable)
new mode 100644 (file)
index 2874725..2391393
@@ -88,6 +88,11 @@ BT_EXPORT_API int bluetooth_enable_adapter(void)
        retv_if(bluetooth_check_adapter() == BLUETOOTH_ADAPTER_ENABLED,
                                BLUETOOTH_ERROR_DEVICE_ALREADY_ENABLED);
 
+#ifdef TIZEN_DPM_VCONF_ENABLE
+       retv_if(bluetooth_dpm_is_bluetooth_mode_allowed() == BLUETOOTH_DPM_RESULT_ACCESS_DENIED,
+                               BLUETOOTH_ERROR_PERMISSION_DEINED);
+#endif
+
        user_info = _bt_get_user_data(BT_COMMON);
        retv_if(user_info->cb == NULL, BLUETOOTH_ERROR_INTERNAL);