Fixed TSAM-9547 and TSAM-9629 (Music Chooser Crash), TSAM-9064 (Music Play through... 77/96577/1
authorbhutani.92 <bhutani.92@samsung.com>
Wed, 9 Nov 2016 10:56:00 +0000 (16:26 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Wed, 9 Nov 2016 10:56:00 +0000 (16:26 +0530)
Change-Id: I3c3c9e2f45a2057642d047dee7ceb4a5fdd3b6f9
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
music-chooser/src/mc-group-list.c
src/common/mp-app.c
src/core/mp-player-mgr.c
src/widget/include/mp-minicontroller.h
src/widget/mp-minicontroller.c

index 53ec33a7805dd8cfd6f289e993185a9747ba99bf..52d86b610f62d0bfc270ef60bca7c2f9b17a9525 100644 (file)
@@ -97,7 +97,6 @@ static void _gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
        } else {
                mc_common_push_track_view_by_group_name(ld->ad, track_type, name, playlist_id, NULL);
        }
-       free(folder);
 }
 
 static void
index 7ff64d92efb8ca4b152b716650f8dfc2f2188a32..20661117ff610622ee547720ec4d16c11c2f0902 100755 (executable)
@@ -706,6 +706,17 @@ _mp_app_media_key_event_cb(media_key_e key, media_key_event_e event, void *user_
                return;
        }
 
+       DEBUG_TRACE("Media Key : %d", key);
+       if (_mp_is_current_focus_available(ad) != 0) {
+               if (key == MEDIA_KEY_PLAY) {
+                       ERROR_TRACE("Some other application has the focus currently... Returning...");
+                       return;
+               } else {
+                       ERROR_TRACE("Some other application has the focus currently... Changing state in paused state...");
+                       ad->paused_by_user = TRUE;
+               }
+       }
+
        switch (key) {
        case MEDIA_KEY_PLAY:
                if (released) {
index 272971031cf2dac40e9fadd2fb5237a2814af6f1..2402a676690f40015529ad8476a7b5c4d31c480b 100755 (executable)
@@ -1172,7 +1172,8 @@ void mp_player_focus_callback(sound_stream_info_h stream_info, sound_stream_focu
                DEBUG_TRACE("reason for change is %d", reason_for_change);
                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) {
+                               reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE ||
+                               reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION) {
                        sound_manager_set_focus_reacquisition(ad->stream_info, EINA_TRUE);
                } else if (reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_ALARM &&
                                reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION) {
index 220faa82c5162f518096fa25ca4d70c7c900ea1d..b06ff97c924548b9f3b3a7768646bcb579e1f29e 100644 (file)
@@ -39,5 +39,6 @@ void mp_minicontroller_visible_set(struct appdata *ad, bool visible);
 bool mp_minicontroller_visible_get(struct appdata *ad);
 void mp_minicontroller_on_lcd_event(struct appdata *ad, bool lcd_on);
 void mp_minicontroller_update_progressbar(struct appdata *ad);
+int _mp_is_current_focus_available(struct appdata *ad);
 
 #endif
index 80ff21ec254875983000c4f40be0210276505065..d751d39ce2f54d9a420f781acc6045771ebf09b3 100755 (executable)
@@ -642,7 +642,7 @@ static void _mp_minicontroller_shuffle_btn_clicked_cb(void *data, Evas_Object *o
 }
 #endif
 
-static int _mp_is_current_focus_available(struct appdata *ad)
+int _mp_is_current_focus_available(struct appdata *ad)
 {
        sound_stream_focus_change_reason_e changed_by = SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA;
        int ret = SOUND_MANAGER_ERROR_NONE;