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

Commit 9e3642a9 authored by czq's avatar czq
Browse files

Fix bug of keyboard hidden after rotating to landscape mode.

Add logic in IMS#onShowInputRequested: if IMS receives a Implicit show request and the keyboard is already shown in full screen mode, there is no need to hide it.

Otherwise it would hide the keyboard after rotating to landscape mode, because the rotation causes recreation of the activity and triggers auto-show behavior of Ime.

Bug: 256739702

Test: manually test

Change-Id: I195c2c6bd6f6815806dc90f0a386b7c0bccee7a1
parent 3daff41c
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2766,12 +2766,12 @@ public class InputMethodService extends AbstractInputMethodService {
            return false;
        }
        if ((flags&InputMethod.SHOW_EXPLICIT) == 0) {
            if (!configChange && onEvaluateFullscreenMode()) {
            if (!configChange && onEvaluateFullscreenMode() && !isInputViewShown()) {
                // Don't show if this is not explicitly requested by the user and
                // the input method is fullscreen.  That would be too disruptive.
                // However, we skip this change for a config change, since if
                // the IME is already shown we do want to go into fullscreen
                // mode at this point.
                // the input method is fullscreen unless it is already shown. That
                // would be too disruptive. However, we skip this change for a
                // config change, since if the IME is already shown we do want to
                // go into fullscreen mode at this point.
                return false;
            }
            if (!mSettingsObserver.shouldShowImeWithHardKeyboard() &&