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

Commit 54ca9dd9 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android Git Automerger
Browse files

am d147db87: am c500700f: am 19dd34a0: Show view even when IME is explicitly...

am d147db87: am c500700f: am 19dd34a0: Show view even when IME is explicitly shown with physical keyboard

* commit 'd147db87':
  Show view even when IME is explicitly shown with physical keyboard
parents 781d7512 d147db87
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import android.view.WindowManager;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethod;
import android.view.inputmethod.InputMethodSubtype;

import com.android.inputmethod.accessibility.AccessibilityUtils;
@@ -1138,6 +1139,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
        return true;
    }

    @Override
    public boolean onShowInputRequested(final int flags, final boolean configChange) {
        if ((flags & InputMethod.SHOW_EXPLICIT) == 0 && mKeyboardSwitcher.hasHardwareKeyboard()) {
            // Even when IME is implicitly shown and physical keyboard is connected, we should
            // show {@link InputView}.
            // See {@link InputMethodService#onShowInputRequested(int,boolean)}.
            return true;
        }
        return super.onShowInputRequested(flags, configChange);
    }

    @Override
    public boolean onEvaluateFullscreenMode() {
        if (mKeyboardSwitcher.hasHardwareKeyboard()) {