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

Commit 36439b43 authored by John Spurlock's avatar John Spurlock
Browse files

Decouple IME_ACTIVE and IME_VISIBLE for hardware keyboards.

Reserve IME_VISIBLE for when software keyboards are actually
showing.

Bug:11186297
Change-Id: I4e09a7de353e564bd1a97dadd603d3104254fa56
parent 871cb5d5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -879,8 +879,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
        final boolean isScreenSecurelyLocked =
                isScreenLocked && mKeyguardManager.isKeyguardSecure();
        final boolean inputShown = mInputShown && (!isScreenLocked || mInputBoundToKeyguard);
        mImeWindowVis = (!isScreenSecurelyLocked && (inputShown || hardKeyShown)) ?
                (InputMethodService.IME_ACTIVE | InputMethodService.IME_VISIBLE) : 0;
        final boolean inputActive = !isScreenSecurelyLocked && (inputShown || hardKeyShown);
        // We assume the softkeyboard is shown when the input is active as long as the
        // hard keyboard is not shown.
        final boolean inputVisible = inputActive && !hardKeyShown;
        mImeWindowVis = (inputActive ? InputMethodService.IME_ACTIVE : 0)
                | (inputVisible ? InputMethodService.IME_VISIBLE : 0);
        updateImeWindowStatusLocked();
    }