Add condition to remove unnecessary logs in timeout_handler 73/180173/2
authorlokilee73 <changjoo.lee@samsung.com>
Fri, 25 May 2018 07:43:51 +0000 (16:43 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Fri, 25 May 2018 07:50:50 +0000 (16:50 +0900)
Lots of logs in timeout_handler are printed in special condition.
LCD always on + changestate of S_LCDOFF by dbus request
So, add condition of pm_cur_state to remove timer.

Change-Id: Ibaed3baa638097771a53d02028bd0f32694794fb
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
src/display/core.c

index e91264c..25b8016 100755 (executable)
@@ -674,14 +674,17 @@ gboolean timeout_handler(void *data)
 {
        int run_timeout;
 
+       _I("Time out state %s\n", states[pm_cur_state].name);
        /* default setting */
        get_run_timeout(&run_timeout);
 
        /* for sdk
         * if the run_timeout is zero, it regards AlwaysOn state
         */
-       if (run_timeout == 0 || display_conf.lcd_always_on)
+       if (pm_cur_state == S_NORMAL && (run_timeout == 0 || display_conf.lcd_always_on)) {
+               _D("run_timeout is always on");
                return G_SOURCE_CONTINUE;
+       }
 
        if (timeout_src_id) {
                g_source_remove(timeout_src_id);