Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1323e370 authored by Pawit Pornkitprasan's avatar Pawit Pornkitprasan
Browse files

charger: allow home button to wake

On certain devices (e.g. galaxysmtd), the user expects the physical
home button to be able to wake the device as well as the power button.

Change-Id: If764f36aba3810dfa5233af8baf0a740b04889e0
parent d2c2b10b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -870,6 +870,9 @@ static void process_key(struct charger *charger, int code, int64_t now)
            if (key->pending)
                kick_animation(charger->batt_anim);
        }
    } else {
        if (key->pending)
            kick_animation(charger->batt_anim);
    }

    key->pending = false;
@@ -878,6 +881,7 @@ static void process_key(struct charger *charger, int code, int64_t now)
static void handle_input_state(struct charger *charger, int64_t now)
{
    process_key(charger, KEY_POWER, now);
    process_key(charger, KEY_HOME, now);

    if (charger->next_key_check != -1 && now > charger->next_key_check)
        charger->next_key_check = -1;