TSAM-12144No sound of incoming call after turning LCD off with screen unlocked 45/107245/2 submit/tizen_3.0/20161227.121928 submit/tizen_3.0/20161228.074545 submit/tizen_3.0/20161229.001234
authorIgor Olshevskyi <i.olshevskyi@samsung.com>
Mon, 26 Dec 2016 16:37:40 +0000 (18:37 +0200)
committerIgor Olshevskyi <i.olshevskyi@samsung.com>
Tue, 27 Dec 2016 08:42:26 +0000 (10:42 +0200)
Change-Id: I54ea69cad85f674ceea27dc3fc8d439d1de59f8e

inc/callui-display.h
src/callui-display.c
src/callui-proximity-lock-manager.c
src/callui-touch-lock-manager.c

index 5fadbf5..32cabd6 100644 (file)
@@ -37,6 +37,7 @@ typedef enum {
        CALLUI_DISPLAY_CONTROL_ON = 0,
        CALLUI_DISPLAY_CONTROL_ON_LOCK,
        CALLUI_DISPLAY_CONTROL_ON_UNLOCK,
+       CALLUI_DISPLAY_CONTROL_LOCK,
        CALLUI_DISPLAY_CONTROL_UNLOCK,
        CALLUI_DISPLAY_CONTROL_OFF_SLEEP_LOCK,
        CALLUI_DISPLAY_CONTROL_OFF_SLEEP_UNLOCK,
index a7a4f21..8fe9596 100644 (file)
@@ -280,6 +280,8 @@ callui_result_e _callui_display_set_control_state(callui_display_h disp, callui_
                CALLUI_RETURN_VALUE_IF_FAIL(result == DEVICE_ERROR_NONE, CALLUI_RESULT_FAIL);
                result = _callui_window_set_screen_mode(disp->ad->window, CALLUI_WIN_SCREEN_MODE_ALWAYS_ON);
                CALLUI_RETURN_VALUE_IF_FAIL(result == CALLUI_RESULT_OK, result);
+               result = device_power_request_lock(POWER_LOCK_CPU, 0);
+               CALLUI_RETURN_VALUE_IF_FAIL(result == EFL_UTIL_ERROR_NONE, CALLUI_RESULT_FAIL);
                break;
        case CALLUI_DISPLAY_CONTROL_ON_UNLOCK:
                result = device_display_change_state(DISPLAY_STATE_NORMAL);
@@ -289,6 +291,12 @@ callui_result_e _callui_display_set_control_state(callui_display_h disp, callui_
                result = device_power_release_lock(POWER_LOCK_CPU);
                CALLUI_RETURN_VALUE_IF_FAIL(result == DEVICE_ERROR_NONE, CALLUI_RESULT_FAIL);
                break;
+       case CALLUI_DISPLAY_CONTROL_LOCK:
+               result = device_display_change_state(DISPLAY_STATE_NORMAL);
+               CALLUI_RETURN_VALUE_IF_FAIL(result == DEVICE_ERROR_NONE, CALLUI_RESULT_FAIL);
+               result = _callui_window_set_screen_mode(disp->ad->window, CALLUI_WIN_SCREEN_MODE_ALWAYS_ON);
+               CALLUI_RETURN_VALUE_IF_FAIL(result == CALLUI_RESULT_OK, result);
+               break;
        case CALLUI_DISPLAY_CONTROL_UNLOCK:
                result = _callui_window_set_screen_mode(disp->ad->window, CALLUI_WIN_SCREEN_MODE_DEFAULT);
                CALLUI_RETURN_VALUE_IF_FAIL(result == CALLUI_RESULT_OK, result);
index 0cea09c..f28e127 100644 (file)
@@ -317,17 +317,18 @@ static void __callui_plm_view_change_cb(void *user_data, callui_view_type_e prev
        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_INCOMING_CALL_NOTI
+                                       && cur_view_type != CALLUI_VIEW_INCOMING_CALL)
                        || prev_view_type == CALLUI_VIEW_DIALLING) {
-               if (cur_view_type != CALLUI_VIEW_INCOMING_CALL) {
-                       _callui_display_set_timeout(plm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_APP_DEFAULT);
-               }
+               _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 if (cur_view_type != CALLUI_VIEW_INCOMING_CALL) {
-               _callui_display_set_control_state(plm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_ON_UNLOCK);
+       if (cur_view_type != CALLUI_VIEW_INCOMING_CALL && cur_view_type != CALLUI_VIEW_INCOMING_CALL_NOTI) {
+               if (plm_h->lcd_state == CALLUI_PLM_LCD_OFF) {
+                       _callui_display_set_control_state(plm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_UNLOCK);
+               } else {
+                       _callui_display_set_control_state(plm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_ON_UNLOCK);
+               }
        }
 
        switch (cur_view_type) {
index c1caae1..cb5ca94 100755 (executable)
@@ -147,23 +147,30 @@ static void __callui_tlm_view_change_cb(void *user_data, callui_view_type_e prev
 
        _callui_touch_lock_manager_h tlm_h = (_callui_touch_lock_manager_h)user_data;
 
+       callui_view_type_e cur_view_type = _callui_vm_get_cur_view_type(tlm_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_INCOMING_CALL_NOTI
+                                       && cur_view_type != CALLUI_VIEW_INCOMING_CALL)
                        || prev_view_type == CALLUI_VIEW_DIALLING) {
                _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_APP_DEFAULT);
                _callui_display_set_control_state(tlm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_UNLOCK);
        }
 
-       switch (_callui_vm_get_cur_view_type(tlm_h->base.ad->view_manager)) {
+       switch (cur_view_type) {
        case CALLUI_VIEW_INCOMING_CALL:
        case CALLUI_VIEW_INCOMING_CALL_NOTI:
-       case CALLUI_VIEW_DIALLING:
                __callui_tlm_unlock(tlm_h);
-               _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
                if (prev_view_type != CALLUI_VIEW_INCOMING_CALL_NOTI) {
+                       _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
                        _callui_display_set_control_state(tlm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_ON_LOCK);
                }
                break;
+       case CALLUI_VIEW_DIALLING:
+               __callui_tlm_unlock(tlm_h);
+               _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_APP_DEFAULT);
+               _callui_display_set_control_state(tlm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_LOCK);
+               break;
        case CALLUI_VIEW_ENDCALL:
                __callui_tlm_unlock(tlm_h);
                _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
@@ -444,10 +451,13 @@ static void __callui_tlm_update_display_params_on_resume(_callui_touch_lock_mana
        switch (_callui_vm_get_cur_view_type(tlm_h->base.ad->view_manager)) {
        case CALLUI_VIEW_INCOMING_CALL:
        case CALLUI_VIEW_INCOMING_CALL_NOTI:
-       case CALLUI_VIEW_DIALLING:
                _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
                _callui_display_set_control_state(tlm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_ON_LOCK);
                break;
+       case CALLUI_VIEW_DIALLING:
+               _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_APP_DEFAULT);
+               _callui_display_set_control_state(tlm_h->base.ad->display, CALLUI_DISPLAY_CONTROL_LOCK);
+               break;
        case CALLUI_VIEW_ENDCALL:
                _callui_display_set_timeout(tlm_h->base.ad->display, CALLUI_DISPLAY_TIMEOUT_SYS_DEFAULT);
                break;