From 389b576d248967ba8491c1fadaa07e67b2b67540 Mon Sep 17 00:00:00 2001 From: "bhutani.92" Date: Tue, 29 Nov 2016 16:27:18 +0530 Subject: [PATCH] Fixed TSAM-9282 launch of Sound Player during call Change-Id: I84de57d49b62ce14f48accafe44fc0c2b018465a Signed-off-by: bhutani.92 --- src/mp-main.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/mp-main.c b/src/mp-main.c index 29c3fd6..6d7d886 100755 --- a/src/mp-main.c +++ b/src/mp-main.c @@ -1080,9 +1080,24 @@ mp_create(void *data) free(path); PROFILE_IN("bindtextdomain"); bindtextdomain(DOMAIN_NAME, locale_path); - PROFILE_OUT("bindtextdomain"); +#ifdef MP_SOUND_PLAYER + if (_mp_is_current_focus_available(ad) != 0) { + 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 false; + } +#endif + PROFILE_IN("mp_create_win"); ad->win_main = mp_create_win("music-player"); mp_retv_if(ad->win_main == NULL, EINA_FALSE); -- 2.34.1