From: Suyeon Hwang Date: Thu, 1 Sep 2022 05:02:14 +0000 (+0900) Subject: Save configuratio change before auto language setting X-Git-Tag: accepted/tizen/unified/20220922.062106~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62458e2f4c6eaa2787bfb0945edfde0b3f1bff22;p=platform%2Fcore%2Fuifw%2Ftts.git Save configuratio change before auto language setting - Issue: Setting API did not save the change of auto voice enabling configuration. - Solution: The configuration is stored in memory by tts_parser_set_config_info() and stored in configuration file by other functions from tts_parser module. However, in current logic for change auto voice configuration, tts_config_mgr_set_auto_voice() function tries to store configuration file without storing memory when the auto voice is true. This may cause the situation that the memory and file are not matched. So this patch makes the function store the configuration in memory first. Change-Id: I9602bcc9cbc3aad0e56fad068e159b144b0d1ab9 Signed-off-by: Suyeon Hwang --- diff --git a/common/tts_config_mgr.c b/common/tts_config_mgr.c index f244d789..4d508965 100644 --- a/common/tts_config_mgr.c +++ b/common/tts_config_mgr.c @@ -1796,7 +1796,12 @@ int tts_config_mgr_set_auto_voice(bool value) } else { SLOG(LOG_INFO, TAG_TTSCONFIG, "Client type is default. Skip saving configuration file."); } + config_info.auto_voice = value; + if (0 != tts_parser_set_config_info(&config_info)) { + SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to set configure information"); + return TTS_CONFIG_ERROR_OPERATION_FAILED; + } if (true == config_info.auto_voice) { __tts_config_set_auto_language(); @@ -1813,11 +1818,6 @@ int tts_config_mgr_set_auto_voice(bool value) } } - if (0 != tts_parser_set_config_info(&config_info)){ - SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to set configure information"); - return TTS_CONFIG_ERROR_OPERATION_FAILED; - } - return TTS_CONFIG_ERROR_NONE; }