summaryrefslogtreecommitdiff
path: root/plugins/iot/display/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/iot/display/core.c')
-rw-r--r--plugins/iot/display/core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/iot/display/core.c b/plugins/iot/display/core.c
index ea59e445..36ad29a2 100644
--- a/plugins/iot/display/core.c
+++ b/plugins/iot/display/core.c
@@ -819,7 +819,11 @@ static void del_state_cond(void *data, enum state_t state)
del_node(state, tmp);
set_unlock_time(pid, state);
- if (!timeout_src_id)
+ /* Change state only when the two conditions below are satisfied.
+ * 1. There should be no running state-transition timer
+ * 2. Released lock is one of the pm_cur_state's lock
+ * This emulates already expired transition timer */
+ if (!timeout_src_id && pm_cur_state == state)
states[pm_cur_state].trans(EVENT_TIMEOUT);
if (state == S_LCDOFF)