Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5eeff7cf authored by Jean Chalard's avatar Jean Chalard
Browse files

Converge paths of an if() branch

This is to help with further refactoring.

Change-Id: Ib2459903862570cf7022fd90f2d5c524a6bbbe19
parent 10445390
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -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();