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

Commit de67a21c authored by Felix's avatar Felix Committed by android-build-merger
Browse files

Merge "PhoneWindowManager/KeyEvent: Camera key as WakeKey" am: dec76b8a

am: 1841f6af

Change-Id: I6771fdd3408461fb8343006a05d15c260d0fb256
parents beef45c1 1841f6af
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1934,12 +1934,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
@@ -4149,7 +4149,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            case KeyEvent.KEYCODE_VOLUME_MUTE:
                return mDefaultDisplayPolicy.getDockMode() != 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:
@@ -4162,7 +4162,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;