diff options
author | Taeyoung Kim <ty317.kim@samsung.com> | 2016-03-15 14:24:19 +0900 |
---|---|---|
committer | Taeyoung Kim <ty317.kim@samsung.com> | 2016-03-15 14:24:19 +0900 |
commit | a9c0ba6ec0ef1ae9f3b4dbad4f656beb38199901 (patch) | |
tree | 3421619a0c51de90170cf589f337c27bfccab16b | |
parent | 99c8910acae257af45a4c8b685005f5b93a94895 (diff) | |
download | deviced-a9c0ba6ec0ef1ae9f3b4dbad4f656beb38199901.tar.gz deviced-a9c0ba6ec0ef1ae9f3b4dbad4f656beb38199901.tar.bz2 deviced-a9c0ba6ec0ef1ae9f3b4dbad4f656beb38199901.zip |
display: fix state change operation for key inputsubmit/tizen/20160315.091555accepted/tizen/wearable/20160315.124457accepted/tizen/tv/20160315.124435accepted/tizen/mobile/20160315.124414accepted/tizen/ivi/20160315.124517accepted/tizen/common/20160315.221845
- The previous codes were legacy and it did not
work. Thus the codes are updated to use
pm_change_internal().
Change-Id: Ic8c175c6b479753be95b231f59215cd95cb72232
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
-rw-r--r-- | src/display/core.c | 4 | ||||
-rw-r--r-- | src/display/key-filter.c | 12 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/display/core.c b/src/display/core.c index 8b8c2f72..6e688b3f 100644 --- a/src/display/core.c +++ b/src/display/core.c @@ -627,6 +627,10 @@ void reset_timeout(int timeout) ecore_timer_del(timeout_src_id); timeout_src_id = NULL; } + + if (trans_table[pm_cur_state][EVENT_TIMEOUT] == pm_cur_state) + return; + if (timeout > 0) timeout_src_id = ecore_timer_add(MSEC_TO_SEC((double)timeout), (Ecore_Task_Cb)timeout_handler, NULL); diff --git a/src/display/key-filter.c b/src/display/key-filter.c index f90ae9de..ab2f27e9 100644 --- a/src/display/key-filter.c +++ b/src/display/key-filter.c @@ -115,9 +115,7 @@ static void longkey_pressed() if (display_has_caps(caps, DISPLAY_CAPA_LCDON)) { /* change state - LCD on */ - recv_data.pid = getpid(); - recv_data.cond = 0x100; - (*pm_callback)(PM_CONTROL_EVENT, &recv_data); + pm_change_internal(getpid(), LCD_NORMAL); (*pm_callback)(INPUT_POLL_EVENT, NULL); } @@ -315,9 +313,7 @@ static int lcdoff_powerkey(void) delete_condition(S_NORMAL); delete_condition(S_LCDDIM); update_lcdoff_source(VCONFKEY_PM_LCDOFF_BY_POWERKEY); - recv_data.pid = getpid(); - recv_data.cond = 0x400; - (*pm_callback)(PM_CONTROL_EVENT, &recv_data); + pm_change_internal(getpid(), LCD_OFF); } } else { ignore = false; @@ -423,9 +419,7 @@ static int process_screenlock_key(struct input_event *pinput) update_lcdoff_source(VCONFKEY_PM_LCDOFF_BY_POWERKEY); /* LCD off forcly */ - recv_data.pid = -1; - recv_data.cond = 0x400; - (*pm_callback)(PM_CONTROL_EVENT, &recv_data); + pm_change_internal(-1, LCD_OFF); } return true; |