Converge paths of an if() branch
This is to help with further refactoring. Change-Id: Ib2459903862570cf7022fd90f2d5c524a6bbbe19main
parent
1044539080
commit
5eeff7cf54
|
@ -903,10 +903,20 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
mComposingStateManager.onFinishComposingText();
|
mComposingStateManager.onFinishComposingText();
|
||||||
mVoiceProxy.setVoiceInputHighlighted(false);
|
mVoiceProxy.setVoiceInputHighlighted(false);
|
||||||
} else if (!mWordComposer.isComposingWord()) {
|
} else if (!mWordComposer.isComposingWord()) {
|
||||||
// TODO: is the following reset still needed, given that we are not composing
|
// We need to do this to clear the last composed word.
|
||||||
// a word?
|
|
||||||
resetComposingState(true /* alsoResetLastComposedWord */);
|
resetComposingState(true /* alsoResetLastComposedWord */);
|
||||||
updateSuggestions();
|
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();
|
mHandler.postUpdateShiftState();
|
||||||
|
|
Loading…
Reference in New Issue