aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-12-24 22:52:34 +0900
committerJean Chalard <jchalard@google.com>2013-12-26 22:12:22 +0900
commitc28f02880c307c1bf7c11a755765ea6354150bd4 (patch)
treee07fad6ec5ab6015d8ac32cc182bdf1e17b5a798 /java/src/com/android/inputmethod/latin/LatinIME.java
parent70433efc41970b4dc475b7e446388430aaf801b9 (diff)
downloadlatinime-c28f02880c307c1bf7c11a755765ea6354150bd4.tar.gz
latinime-c28f02880c307c1bf7c11a755765ea6354150bd4.tar.xz
latinime-c28f02880c307c1bf7c11a755765ea6354150bd4.zip
[IL42] Inline getSuggestedWordsOrOlderSuggestionsAsync
Bug: 8636060 Change-Id: I5c47370a3ea5962caff4d40db2faa62accfc7147
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