TizenRefApp-7861 [Call UI] Fix issue with turning on display on press by power button... 99/106899/1 submit/tizen_3.0/20161223.145103
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Fri, 23 Dec 2016 12:09:32 +0000 (14:09 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Fri, 23 Dec 2016 12:09:32 +0000 (14:09 +0200)
Change-Id: I3b8ccf9847aba292cb691787eee9daa6d61fb79b

src/callui-proximity-lock-manager.c
src/callui-view-manager.c

index 8a78655..0cea09c 100644 (file)
@@ -314,24 +314,28 @@ static void __callui_plm_view_change_cb(void *user_data, callui_view_type_e prev
        plm_h->running_flags &= ~CALLUI_PLM_STATE_INCOMING_CALL;
        plm_h->running_flags &= ~CALLUI_PLM_STATE_NO_CALLS;
 
+       callui_view_type_e cur_view_type = _callui_vm_get_cur_view_type(plm_h->base.ad->view_manager);
+
        if (prev_view_type == CALLUI_VIEW_INCOMING_CALL
                        || prev_view_type == CALLUI_VIEW_INCOMING_CALL_NOTI
                        || prev_view_type == CALLUI_VIEW_DIALLING) {
-               _callui_display_set_timeout(plm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_APP_DEFAULT);
+               if (cur_view_type != CALLUI_VIEW_INCOMING_CALL) {
+                       _callui_display_set_timeout(plm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_APP_DEFAULT);
+               }
        }
 
        if (plm_h->lcd_state == CALLUI_PLM_LCD_OFF) {
                _callui_display_set_control_state(plm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_UNLOCK);
-       } else {
+       } else if (cur_view_type != CALLUI_VIEW_INCOMING_CALL) {
                _callui_display_set_control_state(plm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_ON_UNLOCK);
        }
 
-       switch (_callui_vm_get_cur_view_type(plm_h->base.ad->view_manager)) {
+       switch (cur_view_type) {
        case CALLUI_VIEW_INCOMING_CALL:
        case CALLUI_VIEW_INCOMING_CALL_NOTI:
                plm_h->running_flags |= CALLUI_PLM_STATE_INCOMING_CALL;
-               _callui_display_set_timeout(plm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
                if (prev_view_type != CALLUI_VIEW_INCOMING_CALL_NOTI) {
+                       _callui_display_set_timeout(plm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
                        __callui_plm_set_lcd_state(plm_h, CALLUI_PLM_LCD_ON);
                        _callui_display_set_control_state(plm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_ON_LOCK);
                }
index 5c428d4..204e094 100644 (file)
@@ -673,6 +673,7 @@ static callui_result_e __change_view(callui_vm_h vm, callui_view_type_e type)
                CALLUI_RETURN_VALUE_IF_FAIL(res == CALLUI_RESULT_OK, res);
 
                if ((prev_type == CALLUI_VIEW_UNDEFINED || vm->ad->on_background)
+                               && prev_type != CALLUI_VIEW_INCOMING_CALL_NOTI
                                && (type == CALLUI_VIEW_DIALLING
                                                || type == CALLUI_VIEW_INCOMING_CALL
                                                || type == CALLUI_VIEW_INCOMING_CALL_NOTI)) {