int ps_mode_deactivation = 0;
#endif
+ if (_is_name_acquired() == FALSE) {
+ BT_ERR("dbus name is NOT acquired yet");
+ return TRUE;
+ }
+
status = _bt_adapter_get_status();
le_status = _bt_adapter_get_le_status();
BT_DBG("State: %d, LE State: %d", status, le_status);
if (vconf_get_int(BT_OFF_DUE_TO_TIMEOUT, &bt_off_due_to_timeout) != 0)
BT_ERR("Fail to get BT_OFF_DUE_TO_TIMEOUT");
+ if (bt_off_due_to_timeout) {
+ /* Set the vconf flag to 0 here, if BT need to be enabled
+ bt_off_due_to_timeout variable already hold the old value */
+
+ if (vconf_set_int(BT_OFF_DUE_TO_TIMEOUT, 0) != 0)
+ BT_ERR("Set vconf failed");
+ }
+
+
if ((bt_status != VCONFKEY_BT_STATUS_OFF || bt_off_due_to_timeout) &&
(status == BT_DEACTIVATED)) {
BT_DBG("Previous session was enabled.");