Remove screen reader check from tts_stop() 24/304624/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Mon, 22 Jan 2024 11:19:23 +0000 (20:19 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Mon, 22 Jan 2024 11:19:23 +0000 (20:19 +0900)
- Issue:
App receives screen_reader_off error when the app call tts_stop() on
playing state.

- Solution:
The screen reader mode is only available when the screen reader option
is on. So, the framework checks the screen reader option when the client
sets the screen reader mode. However, sometimes the client wants to stop
playing TTS to handle screen reader off situation. But, in this case,
the client has to get the screen_reader_off error because of the reason
that described above.
Thus, this patch removes the screen reader option check logic from the
tts_stop() function. Through this change, the client can stops the TTS
playback even though the client sets the screen reader mode.

Change-Id: I41b91634d3aaa1fd0fd4cc6dc3198a9baa9d46a1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
client/tts.c

index 5bb7037..c66b02d 100644 (file)
@@ -872,8 +872,6 @@ int tts_stop(tts_h tts)
        tts_state_e current_state = tts_client_get_current_state(client);
        RETVM_IF(TTS_STATE_CREATED == current_state, TTS_ERROR_INVALID_STATE, "[ERROR] The current state(%d) is invalid", current_state);
 
-       RETVM_IF(false == tts_core_check_screen_reader(client), TTS_ERROR_SCREEN_READER_OFF, "[ERROR] Screen reader option is not available");
-
        int ret = tts_core_stop(client);
        if (TTS_ERROR_NONE != ret) {
                SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to request stop. ret(%s)", tts_core_covert_error_code(ret));