diff options
author | 2012-07-06 11:33:16 +0900 | |
---|---|---|
committer | 2012-07-09 15:06:16 +0900 | |
commit | a6757f400a7a1acc66b2c64f4aa84137dd4395cd (patch) | |
tree | 526cd005d51bec2bec65dc2b091bd95e8021ffc1 /java/src | |
parent | 8f9c9377fc8944c9e96e6dcf661f0d673c23b83f (diff) | |
download | latinime-a6757f400a7a1acc66b2c64f4aa84137dd4395cd.tar.gz latinime-a6757f400a7a1acc66b2c64f4aa84137dd4395cd.tar.xz latinime-a6757f400a7a1acc66b2c64f4aa84137dd4395cd.zip |
Code simplification (A69)
Change-Id: I2a77e437795fbbea47fd2e604ee6c26f8d0e458a
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index bb83ba6c0..c8fdbca5e 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -217,9 +217,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - public void postUpdateSuggestionStrip(final boolean isComposing) { + public void postUpdateSuggestionStrip() { cancelUpdateSuggestionStrip(); - if (isComposing) { + if (getOuterInstance().mWordComposer.isComposingWord()) { sendMessageDelayed(obtainMessage(MSG_UPDATE_SUGGESTIONS), mDelayUpdateSuggestions); } else { sendMessageDelayed(obtainMessage(MSG_SET_BIGRAM_PREDICTIONS), @@ -1394,7 +1394,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mWordComposer.deleteLast(); } mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1); - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); } else { mConnection.deleteSurroundingText(1, 0); if (ProductionFlag.IS_EXPERIMENTAL) { @@ -1550,7 +1550,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // In case the "add to dictionary" hint was still displayed. if (null != mSuggestionsView) mSuggestionsView.dismissAddToDictionaryHint(); } - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); Utils.Stats.onNonSeparator((char)primaryCode, x, y); } @@ -1592,7 +1592,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mHandler.startDoubleSpacesTimer(); if (!mConnection.isCursorTouchingWord(mCurrentSettings)) { - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); } } else { if (swapWeakSpace) { @@ -1877,7 +1877,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mSuggestionsView.showAddToDictionaryHint(suggestion, mCurrentSettings.mHintToSaveText); } else { // If we're not showing the "Touch again to save", then update the suggestion strip. - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); } } @@ -1969,7 +1969,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen ResearchLogger.latinIME_deleteSurroundingText(length); } mConnection.setComposingText(word, 1); - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); } private void revertCommit() { @@ -2014,7 +2014,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // separator. mLastComposedWord = LastComposedWord.NOT_A_COMPOSED_WORD; // We have a separator between the word and the cursor: we should show predictions. - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); } public boolean isWordSeparator(int code) { @@ -2039,7 +2039,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Since we just changed languages, we should re-evaluate suggestions with whatever word // we are currently composing. If we are not composing anything, we may want to display // predictions or punctuation signs (which is done by the updateSuggestionStrip anyway). - mHandler.postUpdateSuggestionStrip(mWordComposer.isComposingWord()); + mHandler.postUpdateSuggestionStrip(); } // TODO: Remove this method from {@link LatinIME} and move {@link FeedbackManager} to |