From cde947218b6e87da07570e6d09c042277e96fe7d Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Sat, 26 Nov 2016 18:52:44 +0530 Subject: [PATCH] Fixed TSAM-10437 Incoming call issue Change-Id: I787eadca6c3f8ebcd0c2550e35e618d4e32c6f47 Signed-off-by: bhutani.92 --- src/core/mp-player-mgr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/core/mp-player-mgr.c b/src/core/mp-player-mgr.c index ee58c00..4c4fac4 100755 --- a/src/core/mp-player-mgr.c +++ b/src/core/mp-player-mgr.c @@ -1175,6 +1175,21 @@ void mp_player_focus_callback(sound_stream_info_h stream_info, sound_stream_focu sound_manager_set_focus_reacquisition(ad->stream_info, EINA_FALSE); } } else { + if (reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOIP || + reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_CALL || + reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE) { + ERROR_TRACE("Some other application has the focus currently... Returning..."); + char *message = STR_MP_UNABLE_TO_PLAY_DURING_CALL; + if (message) { + int ret = notification_status_message_post(dgettext("music-player", message)); + if (ret != 0) { + ERROR_TRACE("notification_status_message_post()... [0x%x]", ret); + } else { + DEBUG_TRACE("message: [%s]", message); + } + } + return; + } mp_play_control_play_pause(ad, true); } } -- 2.7.4