From: bhutani.92 Date: Sat, 26 Nov 2016 13:22:44 +0000 (+0530) Subject: Fixed TSAM-10437 Incoming call issue X-Git-Tag: submit/tizen_3.0/20161129.124714~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F100318%2F1;p=profile%2Fmobile%2Fapps%2Fnative%2Fmusic-player.git Fixed TSAM-10437 Incoming call issue Change-Id: I787eadca6c3f8ebcd0c2550e35e618d4e32c6f47 Signed-off-by: bhutani.92 --- 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); } }