Once BT_OFF_DUE_TO_TIMEOUT vconf is set it will never unset the vconf. So, on
each boot or bt-service launch bt is enabled even though BT was not enabled in
previous session
Before enabling BT during launch of bt-service, unset this vconf it is set
Change-Id: I34bebcca8ceeae21c9c972bef21371925b29ffba
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.");