Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[tklock] Delay tklock removal until exit from LPM state is finished
While device is locked, removing tklock is not allowed and get substituted
with "show device unlock" request. If these get emitted while LPM display
state is active, devicelock ui can get confused.

When leaving LPM_ON state, delay tklock processing until the display
state transition is finished.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Aug 15, 2018
1 parent 0f3b845 commit 98f3e7e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tklock.c
Expand Up @@ -5388,6 +5388,18 @@ static bool tklock_ui_notify_must_be_delayed(void)
delay = true;
}
else if( display_state_curr != display_state_next ) {
switch( display_state_curr ) {
case MCE_DISPLAY_LPM_ON:
/* Making transition from lpm state. In order not
* to confuse device lock ui, finish the display
* state transition before acting on tklock state.
*/
delay = true;
break;
default:
break;
}

switch( display_state_next ) {
case MCE_DISPLAY_OFF:
case MCE_DISPLAY_LPM_OFF:
Expand Down

0 comments on commit 98f3e7e

Please sign in to comment.