CWakeupEngineManager::~CWakeupEngineManager()
{
+ MWR_LOGI("Wakeup Engine Manager is now being destroyed");
}
CWakeupEngineManager::CWakeupEngineManager(IEngineEventObserver *observer) : CWakeupEngineManager()
void CWakeupEngineManager::deinitialize()
{
+ MWR_LOGI("[START]");
if (mStreamingThread.joinable()) {
MWR_LOGD("mStreamingThread is joinable, trying join()");
mStopStreamingThread.store(true);
if (info.interface.set_audio_data_require_status_callback) {
info.interface.set_audio_data_require_status_callback(nullptr, nullptr);
}
+ MWR_LOGI("Trying to deinitialize engine : %s", info.engine_name.c_str());
if (info.interface.deinitialize) {
- info.interface.deinitialize();
+ int ret = info.interface.deinitialize();
+ MWR_LOGI("Deinitialization [%s] returned %d", info.engine_name.c_str(), ret);
}
} catch (const std::exception& e) {
MWR_LOGE("[ERROR] wakeup engine %s threw exception : %s",
info.engine_name.c_str(), e.what());
}
if (info.engine_handle) {
- dlclose(info.engine_handle);
+ int ret = dlclose(info.engine_handle);
+ MWR_LOGI("Closing [%s] returned %d, [%s]", info.engine_name.c_str(), ret,
+ ((0 == ret) ? "" : dlerror()));
info.engine_handle = nullptr;
}
}
mSelectedEngine = nullptr;
mEngineInfo.clear();
+ MWR_LOGI("[END]");
}
void CWakeupEngineManager::subscribe(IEngineEventObserver *observer)
CWakeupManager::~CWakeupManager()
{
+ MWR_LOGI("Wakeup Manager is now being destroyed");
}
void CWakeupManager::initialize_wakeup_policy()
bool CWakeupManager::deinitialize()
{
- MWR_LOGD("[ENTER]");
+ MWR_LOGI("[ENTER]");
dependency_resolver_deinitialize();
mWakeupSettings.deinitialize();
mAssistantLanguageInfo.clear();
- MWR_LOGD("[END]");
+ MWR_LOGI("[END]");
return true;
}
int wakeup_manager_deinitialize(void)
{
- MWR_LOGD("[ENTER]");
+ MWR_LOGI("[ENTER]");
if (nullptr == g_wakeup_manager) return -1;
return -1;
}
- MWR_LOGD("[END]");
+ MWR_LOGI("[END]");
return 0;
}
static int deinit_plugin(void)
{
+ MAS_LOGI("[ENTER]");
if (0 != multi_assistant_service_plugin_deactivate()) {
MAS_LOGE("Fail to deactivate");
}
if (0 != multi_assistant_service_plugin_deinitialize()) {
MAS_LOGE("Fail to deinitialize");
}
+ MAS_LOGI("[END]");
return 0;
}
static void deinit_wakeup(void)
{
- MAS_LOGD("[Enter] deinit_wakeup ");
+ MAS_LOGI("[Enter] deinit_wakeup");
/* if (NULL != g_current_lang) {
free(g_current_lang);
if (0 != ret) {
MAS_LOGE("[ERROR] Fail to close connection");
}
+ MAS_LOGI("[END]");
}
int mas_get_current_client_pid()
void service_app_terminate(void *data)
{
+ MAS_LOGI("[ENTER]");
if (g_pkgmgr) {
package_manager_unset_event_cb(g_pkgmgr);
package_manager_destroy(g_pkgmgr);
// Todo: add your code here.
deinit_wakeup();
+ MAS_LOGI("[END]");
return;
}
service_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, service_app_lang_changed, &ad);
service_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, service_app_region_changed, &ad);
- return service_app_main(argc, argv, &event_callback, ad);
+ int ret = service_app_main(argc, argv, &event_callback, ad);
+ LOGI("Main function exits with : %d", ret);
+ return ret;
}