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

Commit c138fa64 authored by Ludvig Hansson's avatar Ludvig Hansson Committed by Shreerag Jayakrishnan
Browse files

Make hardware buttons just wake up device

Refrain from propagating hardware button events
to applications when in non-interactive state.

Bug: 159070675
Bug: 151278668
Change-Id: Ifa8c2702084430b1ce81ff41aab4bfef9bb54d9f
(cherry picked from commit 6c139702f6feb783ea93651a2a3ebd7712d71d9d)
(cherry picked from commit ffae2f6b750b3db835404fcdbe37b9e3d94b125a)
parent ac132b65
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -4012,9 +4012,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            return true;
        }

        // Watches handle BACK specially
        // Watches handle BACK and hardware buttons specially
        if (mHasFeatureWatch && (keyCode == KeyEvent.KEYCODE_BACK
                || keyCode == KeyEvent.KEYCODE_STEM_PRIMARY)) {
                || keyCode == KeyEvent.KEYCODE_STEM_PRIMARY
                || keyCode == KeyEvent.KEYCODE_STEM_1
                || keyCode == KeyEvent.KEYCODE_STEM_2
                || keyCode == KeyEvent.KEYCODE_STEM_3)) {
            return false;
        }