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

Commit 2d978c01 authored by Dima Zavin's avatar Dima Zavin
Browse files

charger: ignore key event if value didn't change



Change-Id: Idcb481550eca53209be217361cac38e48368a04f
Signed-off-by: default avatarDima Zavin <dima@android.com>
parent 2471a6a3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -754,6 +754,10 @@ static int set_key_callback(int code, int value, void *data)
    if (code > KEY_MAX)
        return -1;

    /* ignore events that don't modify our state */
    if (charger->keys[code].down == down)
        return -1;

    /* only record the down even timestamp, as the amount
     * of time the key spent not being pressed is not useful */
    if (down)