From: Ji-hoon Lee Date: Mon, 3 Jun 2024 12:37:59 +0000 (+0900) Subject: Assign current client info regardless of wake word existence X-Git-Tag: accepted/tizen/unified/20240607.170507~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fca839b391a5cebaae817b945c9bf82d194e2ee;p=platform%2Fcore%2Fuifw%2Fmulti-assistant-service.git Assign current client info regardless of wake word existence Change-Id: Ie0d5b44df52e9e28f674bcec3da96ddc741158e7 --- diff --git a/src/service_main.cpp b/src/service_main.cpp index 1aa80f0..e667dc8 100644 --- a/src/service_main.cpp +++ b/src/service_main.cpp @@ -615,13 +615,15 @@ int CServiceMain::add_assistant_info(ma_assistant_info_s* info) { if (items.size() < MAX_MACLIENT_INFO_NUM) { index = items.size(); items.push_back(ClientInfoItems()); + } else { + MAS_LOGE("ClientInfoItems size exceeded %d", MAX_MACLIENT_INFO_NUM); } } if (-1 != index) { items[index].used = true; items[index].preprocessing_allow_mode = MA_PREPROCESSING_ALLOW_NONE; items[index].preprocessing_allow_appid = boost::none; - MAS_LOGD("app_id(%s)", info->app_id); + MAS_LOGD("[%d] app_id(%s)", index, info->app_id); items[index].appid = info->app_id; if (is_current_preprocessing_assistant(items[index].appid)) { @@ -1055,9 +1057,8 @@ int CServiceMain::set_current_client_by_appid(const char *appid) std::vector &items = mClientInfo.getItems(); for (int loop = 0; loop < std::min(MAX_MACLIENT_INFO_NUM, items.size()); loop++) { - if (items[loop].used && - 0 < items[loop].appid.length() && - 0 < items[loop].wakeup_word[0].size()) { + LOGD("Comparing appid : [%d] %s %s", loop, appid, items[loop].appid.c_str()); + if (items[loop].used && 0 < items[loop].appid.length()) { if (0 == items[loop].appid.compare(appid)) { MAS_LOGE("mCurrentClientInfo : %d %s", mCurrentClientInfo, appid); mCurrentClientInfo = loop;