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

Commit cb566f36 authored by Mark Renouf's avatar Mark Renouf Committed by android-build-merger
Browse files

Revert "Allow power button to close an input method" am: 28f0e5bf

am: fc526f6e

Change-Id: Ifcf2f842c91677128e458dd7256013263543937f
parents d5d209a7 fc526f6e
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -482,16 +482,6 @@ public interface WindowManagerPolicy {
         */
        public void switchInputMethod(boolean forwardDirection);

        /**
         * Returns the visibility of the current input method window (false if there is none).
         */
        public boolean isInputMethodWindowVisible();

        /**
         * Hides the current input method, if visible.
         */
        public void hideCurrentInputMethod();

        public void shutdown(boolean confirm);
        public void reboot(boolean confirm);
        public void rebootSafeMode(boolean confirm);
+0 −9
Original line number Diff line number Diff line
@@ -265,7 +265,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
    static final int SHORT_PRESS_POWER_REALLY_GO_TO_SLEEP = 2;
    static final int SHORT_PRESS_POWER_REALLY_GO_TO_SLEEP_AND_GO_HOME = 3;
    static final int SHORT_PRESS_POWER_GO_HOME = 4;
    static final int SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME = 5;

    static final int LONG_PRESS_POWER_NOTHING = 0;
    static final int LONG_PRESS_POWER_GLOBAL_ACTIONS = 1;
@@ -1346,14 +1345,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                case SHORT_PRESS_POWER_GO_HOME:
                    launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/);
                    break;
                case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME:
                    if (mWindowManagerFuncs.isInputMethodWindowVisible()) {
                        mWindowManagerFuncs.hideCurrentInputMethod();
                    } else {
                        launchHomeFromHotKey(true /* awakenFromDreams */,
                            false /*respectKeyguard*/);
                    }
                    break;
            }
        }
    }
+0 −18
Original line number Diff line number Diff line
@@ -4077,24 +4077,6 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    // Called by window manager policy.  Not exposed externally.
    @Override
    public boolean isInputMethodWindowVisible() {
        synchronized (mWindowMap) {
            return mInputMethodWindow != null && mInputMethodWindow.isVisibleLw();
        }
    }

    // Called by window manager policy.  Not exposed externally.
    @Override
    public void hideCurrentInputMethod() {
        final InputMethodManagerInternal inputMethodManagerInternal =
            LocalServices.getService(InputMethodManagerInternal.class);
        if (inputMethodManagerInternal != null) {
            inputMethodManagerInternal.hideCurrentInputMethod();
        }
    }

    // Called by window manager policy. Not exposed externally.
    @Override
    public void lockDeviceNow() {