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

Commit b991d946 authored by Roman Birg's avatar Roman Birg Committed by Gerrit Code Review
Browse files

only use proximity checks on wakeup keys



The power button should always wake the screen regardless of the
proximity; only check proximity when the wake up key code is WAKEUP.

Ticket: CYNGNOS-2579

Change-Id: I686ad22d513a3d939be3a0a5c3b752339b2383d3
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent caea16fc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5946,7 +5946,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }

        if (isWakeKey) {
            wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, "android.policy:KEY", true);
            wakeUp(event.getEventTime(), mAllowTheaterModeWakeFromKey, "android.policy:KEY",
                    event.getKeyCode() == KeyEvent.KEYCODE_WAKEUP /* check prox only on wake key*/);
        }

        return result;