From a63b2793c19d372649628536b7277f459fd0150c Mon Sep 17 00:00:00 2001 From: lokilee73 Date: Fri, 25 May 2018 16:43:51 +0900 Subject: [PATCH] Add condition to remove unnecessary logs in timeout_handler 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 --- src/display/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/display/core.c b/src/display/core.c index e91264c..25b8016 100755 --- a/src/display/core.c +++ b/src/display/core.c @@ -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); -- 2.7.4