diff options
author | 2014-06-06 06:33:58 +0000 | |
---|---|---|
committer | 2014-06-06 06:34:00 +0000 | |
commit | eb771b9dc4300e907fb5cdb256aedd3f174f0de2 (patch) | |
tree | 72b638ce6ca2d2cb1be69a87cfed67b3136a45dc /java/src | |
parent | 3ca65c8fd56724a7b4b3440bccf613e5a1a17513 (diff) | |
parent | c69ba5630dcc8fd2542d0199ff703df027f50ba8 (diff) | |
download | latinime-eb771b9dc4300e907fb5cdb256aedd3f174f0de2.tar.gz latinime-eb771b9dc4300e907fb5cdb256aedd3f174f0de2.tar.xz latinime-eb771b9dc4300e907fb5cdb256aedd3f174f0de2.zip |
Merge "Fix a small bug with rotation."
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 4e12a0a31..0dccba09c 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -644,7 +644,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); |