[IL43] Small cleanup
All calls are already passing this Bug: 8636060 Change-Id: I13accefd7c17039dc5ec12dc9e8133ebc86451ad
This commit is contained in:
parent
c28f02880c
commit
f441047fad
2 changed files with 8 additions and 9 deletions
|
@ -1054,9 +1054,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
false /* isObsoleteSuggestions */,
|
||||
false /* isPrediction */);
|
||||
// When in fullscreen mode, show completions generated by the application
|
||||
final boolean isAutoCorrection = false;
|
||||
setSuggestedWords(suggestedWords, isAutoCorrection);
|
||||
setAutoCorrectionIndicator(isAutoCorrection);
|
||||
setSuggestedWords(suggestedWords);
|
||||
setAutoCorrectionIndicator(false);
|
||||
setSuggestionStripShown(true);
|
||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
||||
|
@ -1499,16 +1498,16 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
// TODO[IL]: Define a clear interface for this
|
||||
public void clearSuggestionStrip() {
|
||||
setSuggestedWords(SuggestedWords.EMPTY, false);
|
||||
setSuggestedWords(SuggestedWords.EMPTY);
|
||||
setAutoCorrectionIndicator(false);
|
||||
}
|
||||
|
||||
// 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;
|
||||
if (mSuggestionStripView != null) {
|
||||
mSuggestionStripView.setSuggestions(words);
|
||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(isAutoCorrection);
|
||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1621,7 +1620,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
autoCorrection = typedWord;
|
||||
}
|
||||
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
||||
setSuggestedWords(suggestedWords, suggestedWords.mWillAutoCorrect);
|
||||
setSuggestedWords(suggestedWords);
|
||||
setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
|
||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||
// 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) {
|
||||
clearSuggestionStrip();
|
||||
} else {
|
||||
setSuggestedWords(currentSettings.mSuggestPuncList, false);
|
||||
setSuggestedWords(currentSettings.mSuggestPuncList);
|
||||
}
|
||||
setAutoCorrectionIndicator(false);
|
||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||
|
|
|
@ -1391,7 +1391,7 @@ public final class InputLogic {
|
|||
if (settingsValues.mBigramPredictionEnabled) {
|
||||
mLatinIME.clearSuggestionStrip();
|
||||
} else {
|
||||
mLatinIME.setSuggestedWords(settingsValues.mSuggestPuncList, false);
|
||||
mLatinIME.setSuggestedWords(settingsValues.mSuggestPuncList);
|
||||
}
|
||||
mConnection.resetCachesUponCursorMoveAndReturnSuccess(newSelStart, newSelEnd,
|
||||
shouldFinishComposition);
|
||||
|
|
Loading…
Reference in a new issue