Tiny refactoring (A73)

If !mWordComposer.isComposingWord(), then mWordComposer.getTypedWord()
will always return an empty string.

Change-Id: Ife66d0abc44c743cbc30d31724e833cda168fd5c
This commit is contained in:
Jean Chalard 2012-07-06 12:34:41 +09:00
parent 7a422a0142
commit 347a80f793

View file

@ -1674,17 +1674,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
return;
}
final CharSequence typedWord;
final String typedWord = mWordComposer.getTypedWord();
final SuggestedWords suggestions;
if (!mWordComposer.isComposingWord()) {
if (!mCurrentSettings.mBigramPredictionEnabled) {
setPunctuationSuggestions();
return;
}
typedWord = "";
suggestions = updateBigramPredictions();
} else {
typedWord = mWordComposer.getTypedWord();
suggestions = updateSuggestions(typedWord);
}