[IL43] Small cleanup
All calls are already passing this Bug: 8636060 Change-Id: I13accefd7c17039dc5ec12dc9e8133ebc86451admain
parent
c28f02880c
commit
f441047fad
|
@ -1054,9 +1054,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
false /* isObsoleteSuggestions */,
|
false /* isObsoleteSuggestions */,
|
||||||
false /* isPrediction */);
|
false /* isPrediction */);
|
||||||
// When in fullscreen mode, show completions generated by the application
|
// When in fullscreen mode, show completions generated by the application
|
||||||
final boolean isAutoCorrection = false;
|
setSuggestedWords(suggestedWords);
|
||||||
setSuggestedWords(suggestedWords, isAutoCorrection);
|
setAutoCorrectionIndicator(false);
|
||||||
setAutoCorrectionIndicator(isAutoCorrection);
|
|
||||||
setSuggestionStripShown(true);
|
setSuggestionStripShown(true);
|
||||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
||||||
|
@ -1499,16 +1498,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
// TODO[IL]: Define a clear interface for this
|
// TODO[IL]: Define a clear interface for this
|
||||||
public void clearSuggestionStrip() {
|
public void clearSuggestionStrip() {
|
||||||
setSuggestedWords(SuggestedWords.EMPTY, false);
|
setSuggestedWords(SuggestedWords.EMPTY);
|
||||||
setAutoCorrectionIndicator(false);
|
setAutoCorrectionIndicator(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO[IL]: Define a clear interface for this
|
// TODO[IL]: Define a clear interface for this
|
||||||
public void setSuggestedWords(final SuggestedWords words, final boolean isAutoCorrection) {
|
public void setSuggestedWords(final SuggestedWords words) {
|
||||||
mInputLogic.mSuggestedWords = words;
|
mInputLogic.mSuggestedWords = words;
|
||||||
if (mSuggestionStripView != null) {
|
if (mSuggestionStripView != null) {
|
||||||
mSuggestionStripView.setSuggestions(words);
|
mSuggestionStripView.setSuggestions(words);
|
||||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(isAutoCorrection);
|
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1621,7 +1620,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
autoCorrection = typedWord;
|
autoCorrection = typedWord;
|
||||||
}
|
}
|
||||||
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
||||||
setSuggestedWords(suggestedWords, suggestedWords.mWillAutoCorrect);
|
setSuggestedWords(suggestedWords);
|
||||||
setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
|
setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||||
// An auto-correction is available, cache it in accessibility code so
|
// An auto-correction is available, cache it in accessibility code so
|
||||||
|
@ -1740,7 +1739,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (currentSettings.mBigramPredictionEnabled) {
|
if (currentSettings.mBigramPredictionEnabled) {
|
||||||
clearSuggestionStrip();
|
clearSuggestionStrip();
|
||||||
} else {
|
} else {
|
||||||
setSuggestedWords(currentSettings.mSuggestPuncList, false);
|
setSuggestedWords(currentSettings.mSuggestPuncList);
|
||||||
}
|
}
|
||||||
setAutoCorrectionIndicator(false);
|
setAutoCorrectionIndicator(false);
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||||
|
|
|
@ -1391,7 +1391,7 @@ public final class InputLogic {
|
||||||
if (settingsValues.mBigramPredictionEnabled) {
|
if (settingsValues.mBigramPredictionEnabled) {
|
||||||
mLatinIME.clearSuggestionStrip();
|
mLatinIME.clearSuggestionStrip();
|
||||||
} else {
|
} else {
|
||||||
mLatinIME.setSuggestedWords(settingsValues.mSuggestPuncList, false);
|
mLatinIME.setSuggestedWords(settingsValues.mSuggestPuncList);
|
||||||
}
|
}
|
||||||
mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd,
|
mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd,
|
||||||
shouldFinishComposition);
|
shouldFinishComposition);
|
||||||
|
|
Loading…
Reference in New Issue