Converge paths of an if() branch

This is to help with further refactoring.

Change-Id: Ib2459903862570cf7022fd90f2d5c524a6bbbe19
main
Jean Chalard 2012-02-19 18:02:40 -08:00
parent 1044539080
commit 5eeff7cf54
1 changed files with 12 additions and 2 deletions

View File

@ -903,10 +903,20 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mComposingStateManager.onFinishComposingText();
mVoiceProxy.setVoiceInputHighlighted(false);
} else if (!mWordComposer.isComposingWord()) {
// TODO: is the following reset still needed, given that we are not composing
// a word?
// We need to do this to clear the last composed word.
resetComposingState(true /* alsoResetLastComposedWord */);
updateSuggestions();
// Calling finishComposingText() here is harmless because there
// is no composing word, so it's a no-op.
final InputConnection ic = getCurrentInputConnection();
if (ic != null) {
ic.finishComposingText();
}
// Likewise, this is a no-op since we are not composing text
mComposingStateManager.onFinishComposingText();
// The cursor moved so it's safe to assume that the voice input
// is not highlighted
mVoiceProxy.setVoiceInputHighlighted(false);
}
mHandler.postUpdateShiftState();