Fixed TSAM-9282 launch of Sound Player during call 40/100840/1
authorbhutani.92 <bhutani.92@samsung.com>
Tue, 29 Nov 2016 10:57:18 +0000 (16:27 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Tue, 29 Nov 2016 10:57:18 +0000 (16:27 +0530)
Change-Id: I84de57d49b62ce14f48accafe44fc0c2b018465a
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
src/mp-main.c

index 29c3fd6..6d7d886 100755 (executable)
@@ -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);