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

Commit ab68143a authored by Jean Chalard's avatar Jean Chalard
Browse files

Fix a bug where LatinIME would recorrect with no input view

Bug: 18071127
Change-Id: I634d1f63f7d5c5b7453ed7559f9b65fa0433dcd8
parent ae55db95
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1077,11 +1077,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                    + ", cs=" + composingSpanStart + ", ce=" + composingSpanEnd);
        }

        // This call happens when we have a hardware keyboard as well as when we don't. While we
        // don't support hardware keyboards yet we should avoid doing the processing associated
        // with cursor movement when we have a hardware keyboard since we are not in charge.
        // This call happens whether our view is displayed or not, but if it's not then we should
        // not attempt recorrection. This is true even with a hardware keyboard connected: if the
        // view is not displayed we have no means of showing suggestions anyway, and if it is then
        // we want to show suggestions anyway.
        final SettingsValues settingsValues = mSettings.getCurrent();
        if ((!settingsValues.mHasHardwareKeyboard || ProductionFlags.IS_HARDWARE_KEYBOARD_SUPPORTED)
        if (isInputViewShown()
                && mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd,
                        settingsValues)) {
            mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(),