Refactoring

Change-Id: I2f92c01fa1ff6b318128d387f26942b5d47de3e0
main
Jean Chalard 2012-03-05 17:39:01 +09:00
parent e5cbc94d10
commit 611a5bdf65
1 changed files with 3 additions and 4 deletions

View File

@ -1114,12 +1114,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// and the composingStateManager about it. // and the composingStateManager about it.
private void resetEntireInputState() { private void resetEntireInputState() {
resetComposingState(true /* alsoResetLastComposedWord */); resetComposingState(true /* alsoResetLastComposedWord */);
mComposingStateManager.onFinishComposingText();
updateSuggestions(); updateSuggestions();
final InputConnection ic = getCurrentInputConnection(); final InputConnection ic = getCurrentInputConnection();
if (ic != null) { if (ic != null) {
ic.finishComposingText(); ic.finishComposingText();
} }
mComposingStateManager.onFinishComposingText();
mVoiceProxy.setVoiceInputHighlighted(false); 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 // it entirely and resume suggestions on the previous word, we'd like to still
// have touch coordinates for it. // have touch coordinates for it.
resetComposingState(false /* alsoResetLastComposedWord */); resetComposingState(false /* alsoResetLastComposedWord */);
clearSuggestions();
mComposingStateManager.onFinishComposingText(); mComposingStateManager.onFinishComposingText();
clearSuggestions();
} }
} }
if (isComposingWord) { if (isComposingWord) {
@ -1897,12 +1897,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mSuggestionsView.clear(); mSuggestionsView.clear();
} }
mKeyboardSwitcher.updateShiftState(); mKeyboardSwitcher.updateShiftState();
resetComposingState(true /* alsoResetLastComposedWord */);
final InputConnection ic = getCurrentInputConnection(); final InputConnection ic = getCurrentInputConnection();
if (ic != null) { if (ic != null) {
ic.beginBatchEdit();
final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index]; final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index];
ic.commitCompletion(completionInfo); ic.commitCompletion(completionInfo);
ic.endBatchEdit();
} }
return; return;
} }