aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-01-19 22:53:56 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-19 22:53:56 -0800
commit67ab8ba29db6904792c951adc4280b44e6cc7093 (patch)
treee86d2c3c528c85660939347630cca30942ecd4cc /java/src/com/android/inputmethod/latin/LatinIME.java
parent74ee6cad2b60d3ce878e358273dabc9fddb8a3c4 (diff)
parentaf9fe5c5fcad1db22f605e0568c9a77cef178d22 (diff)
downloadlatinime-67ab8ba29db6904792c951adc4280b44e6cc7093.tar.gz
latinime-67ab8ba29db6904792c951adc4280b44e6cc7093.tar.xz
latinime-67ab8ba29db6904792c951adc4280b44e6cc7093.zip
am af9fe5c5: Fix a bug where the user typed word would not be passed.
* commit 'af9fe5c5fcad1db22f605e0568c9a77cef178d22': Fix a bug where the user typed word would not be passed.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index d36140de6..78e6602d8 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1881,6 +1881,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
return;
}
+ // We need to log before we commit, because the word composer will store away the user
+ // typed word.
+ LatinImeLogger.logOnManualSuggestion(mWordComposer.getTypedWord().toString(),
+ suggestion.toString(), index, suggestions.mWords);
mExpectingUpdateSelection = true;
commitChosenWord(suggestion, WordComposer.COMMIT_TYPE_MANUAL_PICK);
// Add the word to the auto dictionary if it's not a known word
@@ -1890,10 +1894,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
} else {
addToOnlyBigramDictionary(suggestion, 1);
}
- // TODO: the following is fishy, because it seems there may be cases where we are not
- // composing a word at all. Maybe throw an exception if !mWordComposer.isComposingWord() ?
- LatinImeLogger.logOnManualSuggestion(mWordComposer.getTypedWord().toString(),
- suggestion.toString(), index, suggestions.mWords);
// Follow it with a space
if (mInputAttributes.mInsertSpaceOnPickSuggestionManually) {
sendMagicSpace();