From: bhutani.92 Date: Tue, 29 Nov 2016 10:57:18 +0000 (+0530) Subject: Fixed TSAM-9282 launch of Sound Player during call X-Git-Tag: submit/tizen_3.0/20161129.124714~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=389b576d248967ba8491c1fadaa07e67b2b67540;p=profile%2Fmobile%2Fapps%2Fnative%2Fmusic-player.git Fixed TSAM-9282 launch of Sound Player during call Change-Id: I84de57d49b62ce14f48accafe44fc0c2b018465a Signed-off-by: bhutani.92 --- 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);