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; return;
} }
final CharSequence typedWord; final String typedWord = mWordComposer.getTypedWord();
final SuggestedWords suggestions; final SuggestedWords suggestions;
if (!mWordComposer.isComposingWord()) { if (!mWordComposer.isComposingWord()) {
if (!mCurrentSettings.mBigramPredictionEnabled) { if (!mCurrentSettings.mBigramPredictionEnabled) {
setPunctuationSuggestions(); setPunctuationSuggestions();
return; return;
} }
typedWord = "";
suggestions = updateBigramPredictions(); suggestions = updateBigramPredictions();
} else { } else {
typedWord = mWordComposer.getTypedWord();
suggestions = updateSuggestions(typedWord); suggestions = updateSuggestions(typedWord);
} }