From 611a5bdf650f7bc54bf40176f84f1cd9c87aa9aa Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 5 Mar 2012 17:39:01 +0900 Subject: [PATCH] Refactoring Change-Id: I2f92c01fa1ff6b318128d387f26942b5d47de3e0 --- java/src/com/android/inputmethod/latin/LatinIME.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 59fa66ded..edc4efd1a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1114,12 +1114,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // and the composingStateManager about it. private void resetEntireInputState() { resetComposingState(true /* alsoResetLastComposedWord */); + mComposingStateManager.onFinishComposingText(); updateSuggestions(); final InputConnection ic = getCurrentInputConnection(); if (ic != null) { ic.finishComposingText(); } - mComposingStateManager.onFinishComposingText(); mVoiceProxy.setVoiceInputHighlighted(false); } @@ -1536,8 +1536,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // it entirely and resume suggestions on the previous word, we'd like to still // have touch coordinates for it. resetComposingState(false /* alsoResetLastComposedWord */); - clearSuggestions(); mComposingStateManager.onFinishComposingText(); + clearSuggestions(); } } if (isComposingWord) { @@ -1897,12 +1897,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar mSuggestionsView.clear(); } mKeyboardSwitcher.updateShiftState(); + resetComposingState(true /* alsoResetLastComposedWord */); final InputConnection ic = getCurrentInputConnection(); if (ic != null) { - ic.beginBatchEdit(); final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index]; ic.commitCompletion(completionInfo); - ic.endBatchEdit(); } return; }