diff options
author | 2014-01-28 09:43:09 +0000 | |
---|---|---|
committer | 2014-01-28 09:43:10 +0000 | |
commit | 67d85f663aaad5b14acf089ef0f62a5293d485c1 (patch) | |
tree | c737f3223cc5ddfd9770fd355dcc6207886bdf20 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 9214f17b862aa6b35dcda15ad14d3604e90988bb (diff) | |
parent | 4500dedfa94a0f0da16e04bc758eef6e02ef72af (diff) | |
download | latinime-67d85f663aaad5b14acf089ef0f62a5293d485c1.tar.gz latinime-67d85f663aaad5b14acf089ef0f62a5293d485c1.tar.xz latinime-67d85f663aaad5b14acf089ef0f62a5293d485c1.zip |
Merge "[IL101] Remove a method"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 28d4360f6..c6e0fb731 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -193,9 +193,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (msg.arg2 == ARG2_WITH_TYPED_WORD) { final Pair<SuggestedWords, String> p = (Pair<SuggestedWords, String>) msg.obj; + // [IL]: this is the only place where the second arg is not + // suggestedWords.mTypedWord. latinIme.showSuggestionStripWithTypedWord(p.first, p.second); } else { - latinIme.showSuggestionStrip((SuggestedWords) msg.obj); + final SuggestedWords suggestedWords = (SuggestedWords) msg.obj; + latinIme.showSuggestionStripWithTypedWord(suggestedWords, + suggestedWords.mTypedWord); } } else { latinIme.showGesturePreviewAndSuggestionStrip((SuggestedWords) msg.obj, @@ -1270,7 +1274,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // This method must run on the UI Thread. private void showGesturePreviewAndSuggestionStrip(final SuggestedWords suggestedWords, final boolean dismissGestureFloatingPreviewText) { - showSuggestionStrip(suggestedWords); + showSuggestionStripWithTypedWord(suggestedWords, suggestedWords.mTypedWord); final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView(); mainKeyboardView.showGestureFloatingPreviewText(suggestedWords); if (dismissGestureFloatingPreviewText) { @@ -1405,7 +1409,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - private void showSuggestionStripWithTypedWord(final SuggestedWords sourceSuggestedWords, + // TODO[IL]: Define a clean interface for this + public void showSuggestionStripWithTypedWord(final SuggestedWords sourceSuggestedWords, final String typedWord) { final SuggestedWords suggestedWords = sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords; @@ -1426,11 +1431,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord); } - // TODO[IL]: Define a clean interface for this - public void showSuggestionStrip(final SuggestedWords suggestedWords) { - showSuggestionStripWithTypedWord(suggestedWords, suggestedWords.mTypedWord); - } - // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener} // interface @Override |