am 7593f935: Merge "[IL95] Inline a method that\'s always called in sequence"
* commit '7593f93565766be82365ba4af8d947e7b5e08a50': [IL95] Inline a method that's always called in sequencemain
commit
c03fd7bac4
|
@ -1010,8 +1010,7 @@ 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
|
||||||
setSuggestedWords(suggestedWords);
|
setSuggestedWords(suggestedWords, true /* shouldShow */);
|
||||||
setSuggestionStripShown(true);
|
|
||||||
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
|
||||||
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
|
||||||
}
|
}
|
||||||
|
@ -1329,7 +1328,7 @@ 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 setSuggestedWords(final SuggestedWords words) {
|
public void setSuggestedWords(final SuggestedWords words, final boolean shouldShow) {
|
||||||
if (mSuggestionStripView != null) {
|
if (mSuggestionStripView != null) {
|
||||||
mSuggestionStripView.setSuggestions(words);
|
mSuggestionStripView.setSuggestions(words);
|
||||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
||||||
|
@ -1348,6 +1347,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// the practice.
|
// the practice.
|
||||||
mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
|
mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
|
||||||
}
|
}
|
||||||
|
setSuggestionStripShown(shouldShow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO[IL]: Move this out of LatinIME.
|
// TODO[IL]: Move this out of LatinIME.
|
||||||
|
@ -1436,8 +1436,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (SuggestedWords.EMPTY != suggestedWords) {
|
if (SuggestedWords.EMPTY != suggestedWords) {
|
||||||
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
||||||
}
|
}
|
||||||
setSuggestedWords(suggestedWords);
|
setSuggestedWords(suggestedWords, isSuggestionsStripVisible());
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
|
||||||
// Cache the auto-correction in accessibility code so we can speak it if the user
|
// Cache the auto-correction in accessibility code so we can speak it if the user
|
||||||
// touches a key that will insert it.
|
// touches a key that will insert it.
|
||||||
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord);
|
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord);
|
||||||
|
@ -1550,11 +1549,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
public void setNeutralSuggestionStrip() {
|
public void setNeutralSuggestionStrip() {
|
||||||
final SettingsValues currentSettings = mSettings.getCurrent();
|
final SettingsValues currentSettings = mSettings.getCurrent();
|
||||||
if (currentSettings.mBigramPredictionEnabled) {
|
if (currentSettings.mBigramPredictionEnabled) {
|
||||||
setSuggestedWords(SuggestedWords.EMPTY);
|
setSuggestedWords(SuggestedWords.EMPTY, isSuggestionsStripVisible());
|
||||||
} else {
|
} else {
|
||||||
setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList);
|
setSuggestedWords(currentSettings.mSpacingAndPunctuations.mSuggestPuncList,
|
||||||
|
isSuggestionsStripVisible());
|
||||||
}
|
}
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip(
|
public void unsetIsAutoCorrectionIndicatorOnAndCallShowSuggestionStrip(
|
||||||
|
|
Loading…
Reference in New Issue