aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2010-02-25 10:37:19 -0800
committerAmith Yamasani <yamasani@google.com>2010-02-25 10:37:19 -0800
commit9468335a06d2b0e3ef15f4f57f8c1b0857b34ebe (patch)
treed4b1bb330908a42ad4b814d13e715b230f4495d7
parent6516d0fdfcbaa4eb809a8a69bd876293043a68a4 (diff)
downloadlatinime-9468335a06d2b0e3ef15f4f57f8c1b0857b34ebe.tar.gz
latinime-9468335a06d2b0e3ef15f4f57f8c1b0857b34ebe.tar.xz
latinime-9468335a06d2b0e3ef15f4f57f8c1b0857b34ebe.zip
Fix for 2466885 : Key prediction is spilling over to next word.
-rw-r--r--src/com/android/inputmethod/latin/LatinIME.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java
index e08af1ad9..0757f1bb6 100644
--- a/src/com/android/inputmethod/latin/LatinIME.java
+++ b/src/com/android/inputmethod/latin/LatinIME.java
@@ -1439,6 +1439,8 @@ public class LatinIME extends InputMethodService
TextEntryState.acceptedDefault(mWord.getTypedWord(), mBestWord);
mJustAccepted = true;
pickSuggestion(mBestWord);
+ // Add the word to the auto dictionary if it's not a known word
+ checkAddToDictionary(mBestWord, AutoDictionary.FREQUENCY_FOR_TYPED);
}
}
@@ -1476,6 +1478,8 @@ public class LatinIME extends InputMethodService
}
mJustAccepted = true;
pickSuggestion(suggestion);
+ // Add the word to the auto dictionary if it's not a known word
+ checkAddToDictionary(suggestion, AutoDictionary.FREQUENCY_FOR_PICKED);
TextEntryState.acceptedSuggestion(mComposing.toString(), suggestion);
// Follow it with a space
if (mAutoSpace) {
@@ -1509,10 +1513,9 @@ public class LatinIME extends InputMethodService
ic.commitText(suggestion, 1);
}
}
- // Add the word to the auto dictionary if it's not a known word
- checkAddToDictionary(suggestion, AutoDictionary.FREQUENCY_FOR_PICKED);
mPredicting = false;
mCommittedLength = suggestion.length();
+ ((LatinKeyboard) mInputView.getKeyboard()).setPreferredLetters(null);
setNextSuggestions();
updateShiftKeyState(getCurrentInputEditorInfo());
}