Fix to check playback focus extra info 46/167946/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 13 Dec 2017 12:39:22 +0000 (21:39 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Tue, 23 Jan 2018 05:34:35 +0000 (05:34 +0000)
Change-Id: I216b31a8357f60f79b32420405b2d0a2bfad225a
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit dc94c30d85056575643e68c3c82391313ecd5cd9)

server/ttsd_player.c

index 54d1ef6..bfa0f4b 100644 (file)
@@ -351,7 +351,9 @@ int ttsd_player_check_current_playback_focus(bool *is_current_interrupt)
 
                ret = sound_manager_get_current_playback_focus(&reason, &sound_behavior, &extra_info);
 
-               if (SOUND_MANAGER_ERROR_NONE == ret && NULL != extra_info) {
+               SLOG(LOG_DEBUG, tts_tag(), "[Player] current playback focus: extra_info(%s), reason(%d), sound_behavior(%d)", extra_info, reason, sound_behavior, extra_info);
+
+               if (SOUND_MANAGER_ERROR_NONE == ret && NULL != extra_info && 0 < strlen(extra_info)) {
                        if (SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION == reason && 0 == strncmp(extra_info, "TTSD_MODE_INTERRUPT", strlen(extra_info))) {
                                SLOG(LOG_DEBUG, tts_tag(), "[Player] The current focus in Interrupt. Cannot play the requested sound data");
                                *is_current_interrupt = true;