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

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

Fix a small bug with rotation.

Bug: 2349475
Change-Id: Id4aa5ce56b1a545e4cb88ca1b01cf24642deade2
parent b7206b6b
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -643,7 +643,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
        final SettingsValues settingsValues = mSettings.getCurrent();
        if (settingsValues.mDisplayOrientation != conf.orientation) {
            mHandler.startOrientationChanging();
            mInputLogic.finishInput();
            // If !isComposingWord, #commitTyped() is a no-op, but still, it's better to avoid
            // the useless IPC of {begin,end}BatchEdit.
            if (mInputLogic.mWordComposer.isComposingWord()) {
                mInputLogic.mConnection.beginBatchEdit();
                // If we had a composition in progress, we need to commit the word so that the
                // suggestionsSpan will be added. This will allow resuming on the same suggestions
                // after rotation is finished.
                mInputLogic.commitTyped(mSettings.getCurrent(), LastComposedWord.NOT_A_SEPARATOR);
                mInputLogic.mConnection.endBatchEdit();
            }
        }
        PersonalizationDictionarySessionRegistrar.onConfigurationChanged(this, conf,
                mDictionaryFacilitator);