If backlight is off and keys are unlocked, power button wakes screen only
tested on erosq On devices with both a backlight and a softlock button, currently pressing the softlock button while the screen is off and the keypad is unlocked will wake the screen and also lock the keypad. Presumably, the user's intention is to use the device when they hit the softlock button in this state, so wake the screen without locking the keypad. Change-Id: Ib00e1c37142e5d3d9317775de5cf0dd67f3f2569
This commit is contained in:
parent
775645e649
commit
d5676fcd90
1 changed files with 9 additions and 0 deletions
|
@ -730,10 +730,19 @@ static inline void do_softlock(action_last_t *last, action_cur_t *cur)
|
|||
{
|
||||
action = do_auto_softlock(last, cur);
|
||||
}
|
||||
|
||||
/* Lock/Unlock toggled by ACTION_STD_KEYLOCK presses*/
|
||||
if ((action == ACTION_STD_KEYLOCK)
|
||||
|| (last->keys_locked && last->unlock_combo == cur->button))
|
||||
{
|
||||
#ifdef HAVE_BACKLIGHT
|
||||
// if backlight is off and keys are unlocked, do nothing and exit.
|
||||
// The backlight should come on without locking keypad.
|
||||
if ((!last->keys_locked) && (!is_backlight_on(false)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
last->unlock_combo = cur->button;
|
||||
do_key_lock(!last->keys_locked);
|
||||
notify_user = true;
|
||||
|
|
Loading…
Reference in a new issue