aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-26 05:17:48 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-26 05:17:48 -0800
commit654fe9724d367a86f9c039fe82a6bedec78fbcc1 (patch)
treee07fad6ec5ab6015d8ac32cc182bdf1e17b5a798 /java/src/com/android/inputmethod/latin/LatinIME.java
parentc3f4239ed7ca57807bd52efe90f40efc8e9ae0a6 (diff)
parentc28f02880c307c1bf7c11a755765ea6354150bd4 (diff)
downloadlatinime-654fe9724d367a86f9c039fe82a6bedec78fbcc1.tar.gz
latinime-654fe9724d367a86f9c039fe82a6bedec78fbcc1.tar.xz
latinime-654fe9724d367a86f9c039fe82a6bedec78fbcc1.zip
am c28f0288: [IL42] Inline getSuggestedWordsOrOlderSuggestionsAsync
* commit 'c28f02880c307c1bf7c11a755765ea6354150bd4': [IL42] Inline getSuggestedWordsOrOlderSuggestionsAsync
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java24
1 files changed, 7 insertions, 17 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 9e312498c..110a7e7c7 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -182,7 +182,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
switch (msg.what) {
case MSG_UPDATE_SUGGESTION_STRIP:
latinIme.mInputLogic.performUpdateSuggestionStripSync(
- latinIme.mSettings.getCurrent(), this);
+ latinIme.mSettings.getCurrent(), this /* handler */,
+ latinIme.mInputUpdater);
break;
case MSG_UPDATE_SHIFT_STATE:
switcher.updateShiftState();
@@ -1245,13 +1246,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// Implementation of {@link KeyboardActionListener}.
@Override
public void onCodeInput(final int primaryCode, final int x, final int y) {
- mInputLogic.onCodeInput(primaryCode, x, y, mHandler, mKeyboardSwitcher, mSubtypeSwitcher);
+ mInputLogic.onCodeInput(primaryCode, x, y, mHandler, mInputUpdater,
+ mKeyboardSwitcher, mSubtypeSwitcher);
}
// Called from PointerTracker through the KeyboardActionListener interface
@Override
public void onTextInput(final String rawText) {
- mInputLogic.onTextInput(mSettings.getCurrent(), rawText, mHandler);
+ mInputLogic.onTextInput(mSettings.getCurrent(), rawText, mHandler, mInputUpdater);
mKeyboardSwitcher.updateShiftState();
mKeyboardSwitcher.onCodeInput(Constants.CODE_OUTPUT_TEXT);
}
@@ -1564,20 +1566,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
additionalFeaturesOptions, sessionId, sequenceNumber, callback);
}
- // TODO[IL]: Move this to InputLogic?
- public void getSuggestedWordsOrOlderSuggestionsAsync(final int sessionId,
- final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {
- mInputUpdater.getSuggestedWords(sessionId, sequenceNumber,
- new OnGetSuggestedWordsCallback() {
- @Override
- public void onGetSuggestedWords(SuggestedWords suggestedWords) {
- callback.onGetSuggestedWords(maybeRetrieveOlderSuggestions(
- mInputLogic.mWordComposer.getTypedWord(), suggestedWords));
- }
- });
- }
-
- private SuggestedWords maybeRetrieveOlderSuggestions(final String typedWord,
+ // TODO[IL]: Move this to InputLogic
+ public SuggestedWords maybeRetrieveOlderSuggestions(final String typedWord,
final SuggestedWords suggestedWords) {
// TODO: consolidate this into getSuggestedWords
// We update the suggestion strip only when we have some suggestions to show, i.e. when