aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-28 09:08:44 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-28 09:08:44 +0000
commit281966621705caf9240af4156e62d26d43d40ccb (patch)
treecf3f463a2a329f1ee286f462bc8f1519681f2fec /java/src/com/android/inputmethod/latin/LatinIME.java
parent437fa64af3dfe4785b217177c0c357a75584efbd (diff)
parent4761d2fb002bddd487a24de5965c09538598813c (diff)
downloadlatinime-281966621705caf9240af4156e62d26d43d40ccb.tar.gz
latinime-281966621705caf9240af4156e62d26d43d40ccb.tar.xz
latinime-281966621705caf9240af4156e62d26d43d40ccb.zip
Merge "[IL99] Migrate some code to InputLogic."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java23
1 files changed, 5 insertions, 18 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index adebfc08c..18c22b94c 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1324,25 +1324,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
// TODO[IL]: Define a clear interface for this
- public void setSuggestedWords(final SuggestedWords words, final boolean shouldShow) {
- mInputLogic.mSuggestedWords = words;
- final boolean newAutoCorrectionIndicator = words.mWillAutoCorrect;
- // Put a blue underline to a word in TextView which will be auto-corrected.
- if (mInputLogic.mIsAutoCorrectionIndicatorOn != newAutoCorrectionIndicator
- && mInputLogic.mWordComposer.isComposingWord()) {
- mInputLogic.mIsAutoCorrectionIndicatorOn = newAutoCorrectionIndicator;
- final CharSequence textWithUnderline =
- mInputLogic.getTextWithUnderline(mInputLogic.mWordComposer.getTypedWord());
- // TODO: when called from an updateSuggestionStrip() call that results from a posted
- // message, this is called outside any batch edit. Potentially, this may result in some
- // janky flickering of the screen, although the display speed makes it unlikely in
- // the practice.
- mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
- }
+ public void setSuggestedWords(final SuggestedWords suggestedWords, final boolean shouldShow) {
+ mInputLogic.setSuggestedWords(suggestedWords);
if (mSuggestionStripView != null) {
- mSuggestionStripView.setSuggestions(
- words, SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
- mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
+ mSuggestionStripView.setSuggestions(suggestedWords,
+ SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
+ mKeyboardSwitcher.onAutoCorrectionStateChanged(suggestedWords.mWillAutoCorrect);
setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
}
}