Small simplification (A52)
Change-Id: I56bc5b9b584de5a14b41fc32c19f7fefb3b12e88
This commit is contained in:
parent
ea80794dd4
commit
4cba560dbb
1 changed files with 4 additions and 8 deletions
|
@ -1934,21 +1934,17 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
}
|
||||
|
||||
private SuggestedWords updateBigramPredictions(final CharSequence typedWord) {
|
||||
final SuggestedWords suggestedWords;
|
||||
if (mCurrentSettings.mCorrectionEnabled) {
|
||||
final CharSequence prevWord = mConnection.getThisWord(mCurrentSettings.mWordSeparators);
|
||||
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(),
|
||||
mCurrentSettings.mCorrectionEnabled, true);
|
||||
} else {
|
||||
suggestedWords = null;
|
||||
}
|
||||
} else {
|
||||
suggestedWords = null;
|
||||
}
|
||||
|
||||
return suggestedWords;
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setPunctuationSuggestions() {
|
||||
|
|
Loading…
Reference in a new issue