From 7fbeac16e26f8dc6a88a8cf9f7043710f9f26eec Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Tue, 22 Nov 2022 20:43:00 +0900 Subject: [PATCH] Revert vc_mgr_set_selected_result() execution condition - Issue: vc_mgr_set_selected_result() should be able to invoked if vc_mgr_all_result_cb() returns false. - Solution: Previous commit changes the execution condition of vc_mgr_set_selected_result() to be invoked only in vc_mgr_all_result_cb(). However, according to the description of vc_mgr_all_result_cb(), vc_mgr_set_selected_result() should be able to be invoked if vc_mgr_all_result_cb() returns false. Thus, this patch reverts the condition of vc_mgr_set_selected_result() and fixes the description of vc_mgr_set_selected_result(). Change-Id: I330a150187698f8179a62956b32a8092986397b4 Signed-off-by: Suyeon Hwang --- client/vc_mgr_core.c | 9 --------- include/voice_control_manager.h | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/client/vc_mgr_core.c b/client/vc_mgr_core.c index fc04ea6..2e69258 100644 --- a/client/vc_mgr_core.c +++ b/client/vc_mgr_core.c @@ -52,8 +52,6 @@ static int g_volume_timer_cnt = 0; static bool g_err_callback_status = false; -static bool g_all_result_callback_status = false; - /* for TTS feedback */ static int g_feedback_rate = 16000; static vc_audio_channel_e g_feedback_audio_channel = 0; @@ -109,9 +107,7 @@ static void __vc_mgr_core_notify_all_result(vc_result_type_e result_type) vc_mgr_client_set_all_result(event, temp_text); vc_mgr_client_use_callback(); - g_all_result_callback_status = true; cb_ret = all_callback(event, vc_cmd_list, temp_text, temp_message, all_user_data); - g_all_result_callback_status = false; vc_mgr_client_not_use_callback(); if (true == vc_mgr_client_get_exclusive_command()) { @@ -295,11 +291,6 @@ void vc_mgr_core_notify_error() int vc_mgr_core_set_selected_results(vc_cmd_list_h vc_cmd_list, int pid) { - if (false == g_all_result_callback_status) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Not in all result callback"); - return VC_ERROR_OPERATION_FAILED; - } - if (NULL != vc_cmd_list) { int event = 0; char* result_text = NULL; diff --git a/include/voice_control_manager.h b/include/voice_control_manager.h index f14e5f6..8978908 100644 --- a/include/voice_control_manager.h +++ b/include/voice_control_manager.h @@ -993,6 +993,7 @@ int vc_mgr_get_recording_volume(float *volume); * @privilege %http://tizen.org/privilege/voicecontrol.manager * * @remarks This function should be called in vc_mgr_all_result_cb(). + * Or this function should be called after that vc_mgr_all_result_cb() returns @c false. * The @a vc_cmd_list can be NULL, in that case the function does nothing. * @param[in] vc_cmd_list The valid result list * -- 2.34.1