From 347a80f793c2b3e132b48d87918e331352b142f4 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 6 Jul 2012 12:34:41 +0900 Subject: [PATCH] Tiny refactoring (A73) If !mWordComposer.isComposingWord(), then mWordComposer.getTypedWord() will always return an empty string. Change-Id: Ife66d0abc44c743cbc30d31724e833cda168fd5c --- java/src/com/android/inputmethod/latin/LatinIME.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index f2dc976bf..62d477839 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -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); }