Move a method up a level
Change-Id: I6b9a697480127e4745698ab19f8a360b86ff39ca
This commit is contained in:
parent
d02783cb63
commit
5bc2b61274
1 changed files with 6 additions and 2 deletions
|
@ -979,7 +979,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
.setTypedWordValid(false)
|
.setTypedWordValid(false)
|
||||||
.setHasMinimalSuggestion(false);
|
.setHasMinimalSuggestion(false);
|
||||||
// When in fullscreen mode, show completions generated by the application
|
// When in fullscreen mode, show completions generated by the application
|
||||||
setSuggestions(builder.build());
|
final SuggestedWords words = builder.build();
|
||||||
|
setSuggestions(words);
|
||||||
|
setAutoCorrectionIndicator(words);
|
||||||
// TODO: is this the right thing to do? What should we auto-correct to in
|
// TODO: is this the right thing to do? What should we auto-correct to in
|
||||||
// this case? This says to keep whatever the user typed.
|
// this case? This says to keep whatever the user typed.
|
||||||
mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
|
mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
|
||||||
|
@ -1713,6 +1715,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
|
|
||||||
public void clearSuggestions() {
|
public void clearSuggestions() {
|
||||||
setSuggestions(SuggestedWords.EMPTY);
|
setSuggestions(SuggestedWords.EMPTY);
|
||||||
|
setAutoCorrectionIndicator(SuggestedWords.EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSuggestions(final SuggestedWords words) {
|
public void setSuggestions(final SuggestedWords words) {
|
||||||
|
@ -1721,7 +1724,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
mKeyboardSwitcher.onAutoCorrectionStateChanged(
|
mKeyboardSwitcher.onAutoCorrectionStateChanged(
|
||||||
words.hasWordAboveAutoCorrectionScoreThreshold());
|
words.hasWordAboveAutoCorrectionScoreThreshold());
|
||||||
}
|
}
|
||||||
setAutoCorrectionIndicator(words);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setAutoCorrectionIndicator(final SuggestedWords words) {
|
private void setAutoCorrectionIndicator(final SuggestedWords words) {
|
||||||
|
@ -1851,6 +1853,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
}
|
}
|
||||||
mWordComposer.setAutoCorrection(autoCorrection);
|
mWordComposer.setAutoCorrection(autoCorrection);
|
||||||
setSuggestions(suggestedWords);
|
setSuggestions(suggestedWords);
|
||||||
|
setAutoCorrectionIndicator(suggestedWords);
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2024,6 +2027,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
|
|
||||||
public void setPunctuationSuggestions() {
|
public void setPunctuationSuggestions() {
|
||||||
setSuggestions(mSettingsValues.mSuggestPuncList);
|
setSuggestions(mSettingsValues.mSuggestPuncList);
|
||||||
|
setAutoCorrectionIndicator(mSettingsValues.mSuggestPuncList);
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue