#endif
#ifdef TIZEN_FEATURE_BT_DPM
- if (vconf_get_int(VCONFKEY_BT_STATUS, &bt_status) < 0)
- BT_ERR("Error in reading VCONFKEY_BT_STATUS");
-
- if (bt_status == VCONFKEY_BT_STATUS_ON) {
+ if (value >= BLUETOOTH_DPM_BT_ALLOWED &&
+ value <= BLUETOOTH_DPM_BT_RESTRICTED) {
if (vconf_set_int(VCONFKEY_BT_DPM_STATUS, value) != 0) {
BT_ERR("Set VCONFKEY_BT_DPM_STATUS failed\n");
result = BLUETOOTH_ERROR_INTERNAL;
- } else {
- BT_ERR("Set VCONFKEY_BT_DPM_STATUS success\n");
+ } else
result = BLUETOOTH_ERROR_NONE;
- }
+ } else
+ result = BLUETOOTH_ERROR_INVALID_PARAM;
+ if (vconf_get_int(VCONFKEY_BT_STATUS, &bt_status) < 0)
+ BT_ERR("Error in reading VCONFKEY_BT_STATUS");
+
+ if (bt_status == VCONFKEY_BT_STATUS_ON) {
BT_INIT_PARAMS();
BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
value == BLUETOOTH_DPM_BT_RESTRICTED) {
result = bluetooth_disable_adapter();
}
- } else {
- if (value >= BLUETOOTH_DPM_BT_ALLOWED &&
- value <= BLUETOOTH_DPM_BT_RESTRICTED) {
- if (vconf_set_int(VCONFKEY_BT_DPM_STATUS, value) != 0) {
- BT_ERR("Set VCONFKEY_BT_DPM_STATUS failed\n");
- result = BLUETOOTH_ERROR_INTERNAL;
- } else
- result = BLUETOOTH_ERROR_NONE;
- } else
- result = BLUETOOTH_ERROR_INVALID_PARAM;
}
#else
BT_INIT_PARAMS();
_bt_dpm_get_bluetooth_limited_discoverable_state(&discoverable_state);
if (discoverable_mode != BLUETOOTH_DISCOVERABLE_MODE_CONNECTABLE &&
discoverable_state == DPM_RESTRICTED) {
- if (headed_plugin_info->plugin_headed_enabled) // TODO: There is no definition headed_plugin_info
+ if (headed_plugin_info->plugin_headed_enabled)
headed_plugin_info->headed_plugin->bt_launch_dpmpopup("DPM_POLICY_DISABLE_BT_HANDSFREE");
return BLUETOOTH_ERROR_ACCESS_DENIED;
}