std::vector<std::string> assistant_list;
} wakeup_engine_info;
-//static int g_wakeup_engine_selected = -1;
-static int g_wakeup_engine_selected = 0;
+static int g_wakeup_engine_selected = -1;
static wakeup_engine_info g_wakeup_engine_info[MAX_WAKEUP_ENGINE_NUM];
static char* g_current_language = NULL;
{
if (NULL != g_wakeup_event_cb) {
g_last_wakeup_event_info = info;
+ for (int loop = 0;loop < g_engine_count;loop++) {
+ auto iter = std::find(
+ g_wakeup_engine_info[loop].assistant_list.begin(),
+ g_wakeup_engine_info[loop].assistant_list.end(),
+ std::string{info.wakeup_appid});
+ if (iter != g_wakeup_engine_info[loop].assistant_list.end()) {
+ g_wakeup_engine_selected = loop;
+ MWR_LOGD("Selected : %s", g_wakeup_engine_info[loop].engine_name);
+ }
+ }
g_wakeup_event_cb(info, g_wakeup_event_user_data);
}
}