aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-07-06 12:25:46 +0900
committerJean Chalard <jchalard@google.com>2012-07-09 15:06:16 +0900
commit37eaa24b5a48f5c80bb9ee0fdea477559a2bed1b (patch)
tree38c837dde4230cdc88dce144bdeaf0cb0daf1d48 /java/src
parentdc1b84d96cf7fc4ee21cf7df8a12bc7913ffd64e (diff)
downloadlatinime-37eaa24b5a48f5c80bb9ee0fdea477559a2bed1b.tar.gz
latinime-37eaa24b5a48f5c80bb9ee0fdea477559a2bed1b.tar.xz
latinime-37eaa24b5a48f5c80bb9ee0fdea477559a2bed1b.zip
Simplification (A71)
Change-Id: I7a91d84291bea581ecc8ec5b29b9a87ccec76e7d
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 20f6a8d71..08edbe015 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -205,8 +205,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final KeyboardSwitcher switcher = latinIme.mKeyboardSwitcher;
switch (msg.what) {
case MSG_UPDATE_SUGGESTION_STRIP:
- latinIme.updateSuggestionsOrPredictions(
- !getOuterInstance().mWordComposer.isComposingWord());
+ latinIme.updateSuggestionsOrPredictions();
break;
case MSG_UPDATE_SHIFT_STATE:
switcher.updateShiftState();
@@ -1011,7 +1010,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
LastComposedWord.COMMIT_TYPE_USER_TYPED_WORD, typedWord.toString(),
separatorCode, prevWord);
}
- updateSuggestionsOrPredictions(false /* isPredictions */);
+ updateSuggestionsOrPredictions();
}
public int getCurrentAutoCapsState() {
@@ -1662,8 +1661,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
}
- public void updateSuggestionsOrPredictions(final boolean isPredictions) {
+ public void updateSuggestionsOrPredictions() {
mHandler.cancelUpdateSuggestionStrip();
+ final boolean isPredictions = !mWordComposer.isComposingWord();
// Check if we have a suggestion engine attached.
if (mSuggest == null || !mCurrentSettings.isSuggestionsRequested(mDisplayOrientation)) {
@@ -1677,6 +1677,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final CharSequence typedWord;
final SuggestedWords suggestions;
+ // TODO: cleanup the following, those two mean the same thing
if (isPredictions || !mWordComposer.isComposingWord()) {
if (!mCurrentSettings.mBigramPredictionEnabled) {
setPunctuationSuggestions();
@@ -1754,8 +1755,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private void commitCurrentAutoCorrection(final int separatorCodePoint) {
// Complete any pending suggestions query first
if (mHandler.hasPendingUpdateSuggestions()) {
- mHandler.cancelUpdateSuggestionStrip();
- updateSuggestionsOrPredictions(false /* isPredictions */);
+ updateSuggestionsOrPredictions();
}
final CharSequence autoCorrection = mWordComposer.getAutoCorrectionOrNull();
if (autoCorrection != null) {