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

Commit dec76b8a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "PhoneWindowManager/KeyEvent: Camera key as WakeKey"

parents b6ae55b1 2deb9b54
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1893,12 +1893,13 @@ public class KeyEvent extends InputEvent implements Parcelable {
    public static final boolean isWakeKey(int keyCode) {
        switch (keyCode) {
            case KeyEvent.KEYCODE_BACK:
            case KeyEvent.KEYCODE_CAMERA:
            case KeyEvent.KEYCODE_MENU:
            case KeyEvent.KEYCODE_WAKEUP:
            case KeyEvent.KEYCODE_PAIRING:
            case KeyEvent.KEYCODE_STEM_1:
            case KeyEvent.KEYCODE_STEM_2:
            case KeyEvent.KEYCODE_STEM_3:
            case KeyEvent.KEYCODE_WAKEUP:
                return true;
        }
        return false;
+1 −2
Original line number Diff line number Diff line
@@ -6482,7 +6482,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_VOLUME_MUTE:
                return mDockMode != Intent.EXTRA_DOCK_STATE_UNDOCKED;

            // ignore media and camera keys
            // ignore media keys
            case KeyEvent.KEYCODE_MUTE:
            case KeyEvent.KEYCODE_HEADSETHOOK:
            case KeyEvent.KEYCODE_MEDIA_PLAY:
@@ -6495,7 +6495,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_MEDIA_RECORD:
            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
            case KeyEvent.KEYCODE_MEDIA_AUDIO_TRACK:
            case KeyEvent.KEYCODE_CAMERA:
                return false;
        }
        return true;