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

Commit 82f64dcd authored by jtang's avatar jtang Committed by Adnan Begovic
Browse files

fw: Move HOME key interception logic to interceptKeyBeforeDispatching

TICKET: FEIJ-522
Change-Id: I290016413c6cad6f5c35f3ef2ee01779991eece8
parent 11254354
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -3157,6 +3157,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        // timeout.
        if (keyCode == KeyEvent.KEYCODE_HOME) {

            if (mTopFullscreenOpaqueWindowState != null &&
                    (mTopFullscreenOpaqueWindowState.getAttrs().privateFlags
                            & WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS) != 0
                    && mScreenOnFully) {
                return 0;
            }
            // If we have released the home key, and didn't do anything else
            // while it was pressed, then it is time to go home!
            if (!down) {
@@ -5767,13 +5773,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            }

            case KeyEvent.KEYCODE_HOME:
                if (mTopFullscreenOpaqueWindowState != null &&
                        (mTopFullscreenOpaqueWindowState.getAttrs().privateFlags
                                & WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS) != 0
                        && mScreenOnFully) {
                    return result;
                }

                if (down && !interactive && mHomeWakeScreen) {
                    isWakeKey = true;
                }