Loading java/src/com/android/inputmethod/latin/LatinIME.java +27 −28 Original line number Diff line number Diff line Loading @@ -884,15 +884,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final boolean selectionChanged = (newSelStart != candidatesEnd || newSelEnd != candidatesEnd) && mLastSelectionStart != newSelStart; final boolean candidatesCleared = candidatesStart == -1 && candidatesEnd == -1; if (!mExpectingUpdateSelection && ((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars) if (!mExpectingUpdateSelection) { if (((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars) || mVoiceProxy.isVoiceInputHighlighted()) && (selectionChanged || candidatesCleared)) { if (candidatesCleared) { // If the composing span has been cleared, save the typed word in the history for // recorrection before we reset the suggestions strip. Then, we'll be able to show // suggestions for recorrection right away. mRecorrection.saveRecorrectionSuggestion(mWordComposer, mComposingStringBuilder); // If the composing span has been cleared, save the typed word in the history // for recorrection before we reset the suggestions strip. Then, we'll be able // to show suggestions for recorrection right away. mRecorrection.saveRecorrectionSuggestion(mWordComposer, mComposingStringBuilder); } mComposingStringBuilder.setLength(0); mHasUncommittedTypedChars = false; Loading @@ -908,11 +909,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar ic.finishComposingText(); } mVoiceProxy.setVoiceInputHighlighted(false); } else if (!mHasUncommittedTypedChars && !mExpectingUpdateSelection && TextEntryState.isAcceptedDefault()) { } else if (!mHasUncommittedTypedChars && TextEntryState.isAcceptedDefault()) { TextEntryState.reset(); } if (!mExpectingUpdateSelection) { mJustAddedMagicSpace = false; // The user moved the cursor. mJustReplacedDoubleSpace = false; } Loading Loading
java/src/com/android/inputmethod/latin/LatinIME.java +27 −28 Original line number Diff line number Diff line Loading @@ -884,15 +884,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final boolean selectionChanged = (newSelStart != candidatesEnd || newSelEnd != candidatesEnd) && mLastSelectionStart != newSelStart; final boolean candidatesCleared = candidatesStart == -1 && candidatesEnd == -1; if (!mExpectingUpdateSelection && ((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars) if (!mExpectingUpdateSelection) { if (((mComposingStringBuilder.length() > 0 && mHasUncommittedTypedChars) || mVoiceProxy.isVoiceInputHighlighted()) && (selectionChanged || candidatesCleared)) { if (candidatesCleared) { // If the composing span has been cleared, save the typed word in the history for // recorrection before we reset the suggestions strip. Then, we'll be able to show // suggestions for recorrection right away. mRecorrection.saveRecorrectionSuggestion(mWordComposer, mComposingStringBuilder); // If the composing span has been cleared, save the typed word in the history // for recorrection before we reset the suggestions strip. Then, we'll be able // to show suggestions for recorrection right away. mRecorrection.saveRecorrectionSuggestion(mWordComposer, mComposingStringBuilder); } mComposingStringBuilder.setLength(0); mHasUncommittedTypedChars = false; Loading @@ -908,11 +909,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar ic.finishComposingText(); } mVoiceProxy.setVoiceInputHighlighted(false); } else if (!mHasUncommittedTypedChars && !mExpectingUpdateSelection && TextEntryState.isAcceptedDefault()) { } else if (!mHasUncommittedTypedChars && TextEntryState.isAcceptedDefault()) { TextEntryState.reset(); } if (!mExpectingUpdateSelection) { mJustAddedMagicSpace = false; // The user moved the cursor. mJustReplacedDoubleSpace = false; } Loading