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

Commit 31e4e149 authored by satok's avatar satok
Browse files

Re-start input when the IME is deactivated but window is focused

Bug: 6188159
Change-Id: I9189e6d2ac90aa8c621fdb44989728101e00329d
parent b106153b
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -403,6 +403,9 @@ public final class InputMethodManager {
                                mIInputContext.finishComposingText();
                            } catch (RemoteException e) {
                            }
                            // Check focus again in case that "onWindowFocus" is called before
                            // handling this message.
                            checkFocus(mHasBeenInactive);
                        }
                    }
                    return;
@@ -1173,13 +1176,17 @@ public final class InputMethodManager {
        }
    }

    private void checkFocus(boolean forceNewFocus) {
        if (checkFocusNoStartInput(forceNewFocus)) {
            startInputInner(null, 0, 0, 0);
        }
    }

    /**
     * @hide
     */
    public void checkFocus() {
        if (checkFocusNoStartInput(false)) {
            startInputInner(null, 0, 0, 0);
        }
        checkFocus(false);
    }

    private boolean checkFocusNoStartInput(boolean forceNewFocus) {