From: bhutani.92 Date: Sat, 12 Nov 2016 09:30:58 +0000 (+0530) Subject: Fixed TSAM-9723 Abnormal Multimedia Controller X-Git-Tag: submit/tizen_mobile/20161112.124646^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2afa8f79df79d38cba3cf43aa392985cef7a0417;p=profile%2Fmobile%2Fapps%2Fnative%2Fmusic-player.git Fixed TSAM-9723 Abnormal Multimedia Controller Change-Id: I9323a4449ce704cddcd8a4f4ca4246c7456594b1 Signed-off-by: bhutani.92 --- diff --git a/src/common/mp-app.c b/src/common/mp-app.c index 2066111..43c1dab 100755 --- a/src/common/mp-app.c +++ b/src/common/mp-app.c @@ -266,6 +266,7 @@ _mp_add_available_route_changed_cb(sound_device_h device, bool available, void if (!available) { struct appdata *ad = user_data; + MP_CHECK(ad); mp_player_mgr_pause(ad); } @@ -277,6 +278,21 @@ _mp_app_active_device_chaged_cb(sound_device_h in, sound_device_changed_info_e EVENT_TRACE("input=[0x%x], output=[0x%x]", in, out); MP_CHECK(gNotiPipe); + struct appdata *ad = user_data; + MP_CHECK(ad); + + int current_pid = mp_setting_get_nowplaying_id(); + if (current_pid && current_pid != getpid()) { + DEBUG_TRACE("Some other player playing currently"); + ad->paused_by_user = true; + if (ad->win_minicon) { + mp_minicontroller_hide(ad); + } + if (ad->win_lockmini) { + mp_lockscreenmini_hide(ad); + } + } + mp_app_pipe_data_s pipe_data; memset(&pipe_data, 0, sizeof(mp_app_pipe_data_s)); pipe_data.type = MP_APP_PIPE_CB_ACTIVE_DEVICE_CHANGED; diff --git a/src/core/mp-player-mgr.c b/src/core/mp-player-mgr.c index 0f31253..30f6ea6 100755 --- a/src/core/mp-player-mgr.c +++ b/src/core/mp-player-mgr.c @@ -1157,18 +1157,6 @@ void mp_player_focus_callback(sound_stream_info_h stream_info, sound_stream_focu if (state_for_playback == SOUND_STREAM_FOCUS_STATE_RELEASED) { mp_player_mgr_pause(ad); - int current_pid = mp_setting_get_nowplaying_id(); - if (current_pid && current_pid != getpid()) { - DEBUG_TRACE("Some other player playing currently"); - ad->paused_by_user = true; - if (ad->win_minicon) { - mp_minicontroller_hide(ad); - } - if (ad->win_lockmini) { - mp_lockscreenmini_hide(ad); - } - } - sound_manager_get_focus_reacquisition(ad->stream_info, &reacquire_state); DEBUG_TRACE("reason for change is %d", reason_for_change); if (reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOIP || diff --git a/src/widget/mp-minicontroller.c b/src/widget/mp-minicontroller.c index 75c7385..8cc50c6 100755 --- a/src/widget/mp-minicontroller.c +++ b/src/widget/mp-minicontroller.c @@ -808,7 +808,7 @@ _mp_minicontroller_update_layout(struct appdata *ad, bool landscape) DEBUG_TRACE("angle: 90 or 270"); ad->minicontroller_layout = _load_edj(ad->win_minicon, MINICON_EDJ_NAME, "music-minicontroller-ld"); } else { - DEBUG_TRACE("angel: 0"); + DEBUG_TRACE("angle: 0"); ad->minicontroller_layout = _load_edj(ad->win_minicon, MINICON_EDJ_NAME, "music-minicontroller"); }