If we don't call bt_enable_adapter explictly, the device event
callback is not registered such as the recovery situation.
To fix this issue, calls the register function in adapter
enabled callback.
Change-Id: Id110c1fa249e1f9d4f6b1fc8b90e82266a53c686
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
if (BLUETOOTH_ERROR_NONE != _bt_init_profiles())
BT_ERR("Bluetooth profile init failed");
+ _bt_device_state_handle_callback_set_request();
+
_bt_device_handle_adapter_state(TRUE);
/* Update Bluetooth Status to notify other modules */
/* Adapter enable request is successful, setup event handlers */
_bt_service_register_event_handler_callback(
BT_ADAPTER_MODULE, __bt_adapter_event_handler);
- _bt_device_state_handle_callback_set_request();
}
return result;
}