Revert "Fix: too many calls to getSuggestedWordsForTypingInput"
This reverts commit 7aa895e2e3
.
Bug: 15148015
Change-Id: If39c4f8b897f247d4eb935923d55d81def4c8fb4
main
parent
7aa895e2e3
commit
d941ea1826
|
@ -18,6 +18,7 @@ package com.android.inputmethod.latin;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.android.inputmethod.event.Event;
|
||||||
import com.android.inputmethod.keyboard.ProximityInfo;
|
import com.android.inputmethod.keyboard.ProximityInfo;
|
||||||
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
|
|
@ -802,11 +802,10 @@ public final class InputLogic {
|
||||||
final int codePoint = inputTransaction.mEvent.mCodePoint;
|
final int codePoint = inputTransaction.mEvent.mCodePoint;
|
||||||
final SettingsValues settingsValues = inputTransaction.mSettingsValues;
|
final SettingsValues settingsValues = inputTransaction.mSettingsValues;
|
||||||
boolean didAutoCorrect = false;
|
boolean didAutoCorrect = false;
|
||||||
final boolean wasComposingWord = mWordComposer.isComposingWord();
|
|
||||||
// We avoid sending spaces in languages without spaces if we were composing.
|
// We avoid sending spaces in languages without spaces if we were composing.
|
||||||
final boolean shouldAvoidSendingCode = Constants.CODE_SPACE == codePoint
|
final boolean shouldAvoidSendingCode = Constants.CODE_SPACE == codePoint
|
||||||
&& !settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces
|
&& !settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces
|
||||||
&& wasComposingWord;
|
&& mWordComposer.isComposingWord();
|
||||||
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
|
if (mWordComposer.isCursorFrontOrMiddleOfComposingWord()) {
|
||||||
// If we are in the middle of a recorrection, we need to commit the recorrection
|
// If we are in the middle of a recorrection, we need to commit the recorrection
|
||||||
// first so that we can insert the separator at the current cursor position.
|
// first so that we can insert the separator at the current cursor position.
|
||||||
|
@ -850,7 +849,7 @@ public final class InputLogic {
|
||||||
promotePhantomSpace(settingsValues);
|
promotePhantomSpace(settingsValues);
|
||||||
}
|
}
|
||||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
ResearchLogger.latinIME_handleSeparator(codePoint, wasComposingWord);
|
ResearchLogger.latinIME_handleSeparator(codePoint, mWordComposer.isComposingWord());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!shouldAvoidSendingCode) {
|
if (!shouldAvoidSendingCode) {
|
||||||
|
@ -866,9 +865,7 @@ public final class InputLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
startDoubleSpacePeriodCountdown(inputTransaction);
|
startDoubleSpacePeriodCountdown(inputTransaction);
|
||||||
if (wasComposingWord) {
|
|
||||||
inputTransaction.setRequiresUpdateSuggestions();
|
inputTransaction.setRequiresUpdateSuggestions();
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (swapWeakSpace) {
|
if (swapWeakSpace) {
|
||||||
swapSwapperAndSpace(inputTransaction);
|
swapSwapperAndSpace(inputTransaction);
|
||||||
|
|
Loading…
Reference in New Issue