MAS_LOGE("[ERROR] Fail to send result, ret(%d)", ret);
}
- multi_assistant_service_plugin_update_recognition_result(NULL, MA_RECOGNITION_RESULT_EVENT_SUCCESS);
+ const char* pid_appid = NULL;
+ char buf[MAX_APPID_LEN] = {'\0',};
+ if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) {
+ buf[MAX_APPID_LEN - 1] = '\0';
+ pid_appid = buf;
+ }
+ multi_assistant_service_plugin_update_recognition_result(pid_appid, MA_RECOGNITION_RESULT_EVENT_SUCCESS);
return ret;
}
MAS_LOGE("[ERROR] Fail to send recognition result, ret(%d)", ret);
}
- multi_assistant_service_plugin_update_recognition_result(NULL, result);
+ const char* pid_appid = NULL;
+ char buf[MAX_APPID_LEN] = {'\0',};
+ if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) {
+ buf[MAX_APPID_LEN - 1] = '\0';
+ pid_appid = buf;
+ }
+ multi_assistant_service_plugin_update_recognition_result(pid_appid, result);
return ret;
}
int mas_client_update_voice_feedback_state(int pid, int state)
{
- multi_assistant_service_plugin_update_voice_feedback_state(NULL, state);
+ const char* pid_appid = NULL;
+ char buf[MAX_APPID_LEN] = {'\0',};
+ if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) {
+ buf[MAX_APPID_LEN - 1] = '\0';
+ pid_appid = buf;
+ }
+ multi_assistant_service_plugin_update_voice_feedback_state(pid_appid, state);
return 0;
}
int mas_client_send_assistant_specific_command(int pid, const char *command)
{
- multi_assistant_service_plugin_send_assistant_specific_command(NULL, command);
+ const char* pid_appid = NULL;
+ char buf[MAX_APPID_LEN] = {'\0',};
+ if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) {
+ buf[MAX_APPID_LEN - 1] = '\0';
+ pid_appid = buf;
+ }
+ multi_assistant_service_plugin_send_assistant_specific_command(pid_appid, command);
return 0;
}
int mas_client_set_background_volume(int pid, double ratio)
{
- multi_assistant_service_plugin_set_background_volume(NULL, ratio);
+ const char* pid_appid = NULL;
+ char buf[MAX_APPID_LEN] = {'\0',};
+ if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) {
+ buf[MAX_APPID_LEN - 1] = '\0';
+ pid_appid = buf;
+ }
+ multi_assistant_service_plugin_set_background_volume(pid_appid, ratio);
return 0;
}
int mas_client_set_wake_word_audio_require_flag(int pid, bool require)
{
- multi_assistant_service_plugin_set_wake_word_audio_require_flag(NULL, require);
+ const char* pid_appid = NULL;
+ char buf[MAX_APPID_LEN] = {'\0',};
+ if (AUL_R_OK == aul_app_get_appid_bypid(pid, buf, sizeof(buf))) {
+ buf[MAX_APPID_LEN - 1] = '\0';
+ pid_appid = buf;
+ }
+ multi_assistant_service_plugin_set_wake_word_audio_require_flag(pid_appid, require);
return 0;
}