aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/WordComposer.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2012-05-23 20:17:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-23 20:17:10 -0700
commit925212ff4b3d6ff4182a94a133c0e4a4f23dd6aa (patch)
tree04337df6e245c67380ec8866237aa1a3029255e8 /java/src/com/android/inputmethod/latin/WordComposer.java
parent074e8c920683d77fae191b34185193c896e3aa00 (diff)
parentc54d558e2e70bdfb2c1078cae7b88440d421dc67 (diff)
downloadlatinime-925212ff4b3d6ff4182a94a133c0e4a4f23dd6aa.tar.gz
latinime-925212ff4b3d6ff4182a94a133c0e4a4f23dd6aa.tar.xz
latinime-925212ff4b3d6ff4182a94a133c0e4a4f23dd6aa.zip
am c54d558e: Cancel adding user history bigram when autocorrection is cancelled
* commit 'c54d558e2e70bdfb2c1078cae7b88440d421dc67': Cancel adding user history bigram when autocorrection is cancelled
Diffstat (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java')
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index e27a546c5..ca9caa1d3 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -313,7 +313,7 @@ public class WordComposer {
// `type' should be one of the LastComposedWord.COMMIT_TYPE_* constants above.
public LastComposedWord commitWord(final int type, final String committedWord,
- final int separatorCode) {
+ final int separatorCode, final CharSequence prevWord) {
// Note: currently, we come here whenever we commit a word. If it's a MANUAL_PICK
// or a DECIDED_WORD we may cancel the commit later; otherwise, we should deactivate
// the last composed word to ensure this does not happen.
@@ -324,7 +324,8 @@ public class WordComposer {
mXCoordinates = new int[N];
mYCoordinates = new int[N];
final LastComposedWord lastComposedWord = new LastComposedWord(primaryKeyCodes,
- xCoordinates, yCoordinates, mTypedWord.toString(), committedWord, separatorCode);
+ xCoordinates, yCoordinates, mTypedWord.toString(), committedWord, separatorCode,
+ prevWord);
if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD
&& type != LastComposedWord.COMMIT_TYPE_MANUAL_PICK) {
lastComposedWord.deactivate();