Fixed Sound Manager Focus Issues 51/92851/1
authorbhutani.92 <bhutani.92@samsung.com>
Wed, 19 Oct 2016 06:39:34 +0000 (12:09 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Wed, 19 Oct 2016 06:39:34 +0000 (12:09 +0530)
Change-Id: I03a12e42e26429a25fd9cb0232a212eaa44b5e5a
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
src/core/mp-player-mgr.c
src/widget/mp-minicontroller.c

index bbf6d241418d8fe4b914350c9ff68723944a9a02..c838b3a98d224d47bef0fd661436d2953de32098 100755 (executable)
@@ -786,11 +786,6 @@ mp_player_mgr_play(void *data)
                if (error != SOUND_MANAGER_ERROR_NONE) {
                        ERROR_TRACE("failed to acquire focus [%x]", error);
                }
-
-               sound_manager_get_focus_reacquisition(ad->stream_info, &reacquire_state);
-               if (reacquire_state == EINA_FALSE) {
-                       sound_manager_set_focus_reacquisition(ad->stream_info, EINA_TRUE);
-               }
        }
        err = g_player_apis.start(_player);
        PLAYER_LEAVE_LOG("start");
@@ -890,11 +885,6 @@ mp_player_mgr_resume(void *data)
                                return error;
                        }
                }
-
-               sound_manager_get_focus_reacquisition(ad->stream_info, &reacquire_state);
-               if (reacquire_state == EINA_FALSE) {
-                       sound_manager_set_focus_reacquisition(ad->stream_info, EINA_TRUE);
-               }
        }
 
        if (mp_player_mgr_get_state() != PLAYER_STATE_IDLE) {
@@ -1170,10 +1160,10 @@ void mp_player_focus_callback(sound_stream_info_h stream_info, sound_stream_focu
                if (current_pid && current_pid != getpid()) {
                        DEBUG_TRACE("Some other player playing currently");
                        if (ad->win_minicon) {
-                               mp_minicontroller_destroy(ad);
+                               mp_minicontroller_hide(ad);
                        }
                        if (ad->win_lockmini) {
-                               mp_lockscreenmini_destroy(ad);
+                               mp_lockscreenmini_hide(ad);
                        }
                }
 
@@ -1181,7 +1171,9 @@ 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_ALARM &&
                                reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION) {
-                       if (!strcmp(additional_info, "cam_capture")) {
+                       if (!g_strcmp0(additional_info, "music_playing")) {
+                               sound_manager_set_focus_reacquisition(ad->stream_info, EINA_FALSE);
+                       } else if (!g_strcmp0(additional_info, "cam_capture")) {
                                sound_manager_set_focus_reacquisition(ad->stream_info, EINA_TRUE);
                        } else if (reacquire_state == EINA_TRUE) {
                                sound_manager_set_focus_reacquisition(ad->stream_info, EINA_FALSE);
index 89870036f2dc7ce51fb13261c6b93b154d125e81..dcc569e3e0b635ccbc30f184caa309a963ba813b 100755 (executable)
@@ -382,9 +382,6 @@ static void _quick_panel_cb(minicontrol_viewer_event_e event_type, bundle *event
                yDMove = 0;
                xU = 0;
                yU = 0;
-               if (!ad->is_sdcard_removed) {
-                       elm_exit();
-               }
                ad->is_sdcard_removed = false;
        }
        if (event_type == (minicontrol_viewer_event_e)MINICONTROL_VIEWER_EVENT_REPORT_ANGLE) {
@@ -966,18 +963,8 @@ mp_minicontroller_destroy(struct appdata *ad)
        MP_CHECK_VAL(ad->win_minicon, -1);
 
        if (ad->minicontroller_layout != NULL) {
-               //evas_object_hide(ad->minicontroller_layout);
-               //evas_object_del(ad->minicontroller_layout);
-               //ad->minicontroller_layout = NULL;
                ad->b_minicontroller_show = FALSE;
        }
-       /*
-               if (ad->win_minicon)
-               {
-                       evas_object_del(ad->win_minicon);
-                       ad->win_minicon = NULL;
-               }
-       */
        evas_object_hide(ad->win_minicon);
        mp_ecore_timer_del(ad->minicon_progress_timer);
        mp_ecore_timer_del(ad->minicon_button_timer);