Merge "Small simplification (A52)"
This commit is contained in:
commit
9636735c0a
1 changed files with 4 additions and 8 deletions
|
@ -1930,21 +1930,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
|
|
||||||
private SuggestedWords updateBigramPredictions(final CharSequence typedWord) {
|
private SuggestedWords updateBigramPredictions(final CharSequence typedWord) {
|
||||||
final SuggestedWords suggestedWords;
|
|
||||||
if (mCurrentSettings.mCorrectionEnabled) {
|
if (mCurrentSettings.mCorrectionEnabled) {
|
||||||
final CharSequence prevWord = mConnection.getThisWord(mCurrentSettings.mWordSeparators);
|
final CharSequence prevWord = mConnection.getThisWord(mCurrentSettings.mWordSeparators);
|
||||||
if (!TextUtils.isEmpty(prevWord)) {
|
if (!TextUtils.isEmpty(prevWord)) {
|
||||||
suggestedWords = mSuggest.getSuggestedWords(mWordComposer,
|
// If we call getSuggestedWord with mCorrectionEnabled == false or with
|
||||||
|
// an empty prevWord, we'll get a 0-sized list of suggestions.
|
||||||
|
return mSuggest.getSuggestedWords(mWordComposer,
|
||||||
prevWord, mKeyboardSwitcher.getKeyboard().getProximityInfo(),
|
prevWord, mKeyboardSwitcher.getKeyboard().getProximityInfo(),
|
||||||
mCurrentSettings.mCorrectionEnabled, true);
|
mCurrentSettings.mCorrectionEnabled, true);
|
||||||
} else {
|
|
||||||
suggestedWords = null;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
suggestedWords = null;
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return suggestedWords;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPunctuationSuggestions() {
|
public void setPunctuationSuggestions() {
|
||||||
|
|
Loading…
Reference in a new issue