aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LastComposedWord.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-02-21 23:42:21 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-21 23:42:21 -0800
commite043bf02f2b0a6428a0e6cae20e00cf4432c789f (patch)
treec81612c0405b17b38aa66c147d556c798da970f1 /java/src/com/android/inputmethod/latin/LastComposedWord.java
parent1dfdc8056c93a2ea3e26f821af738ce1504af714 (diff)
parent66bb563535dbe3672f99f75bd71763a551444867 (diff)
downloadlatinime-e043bf02f2b0a6428a0e6cae20e00cf4432c789f.tar.gz
latinime-e043bf02f2b0a6428a0e6cae20e00cf4432c789f.tar.xz
latinime-e043bf02f2b0a6428a0e6cae20e00cf4432c789f.zip
Merge "Give LastComposedWord knowledge of the separator (A2)"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LastComposedWord.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LastComposedWord.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java
index 37be03c3e..f0b91b104 100644
--- a/java/src/com/android/inputmethod/latin/LastComposedWord.java
+++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java
@@ -40,26 +40,31 @@ public class LastComposedWord {
// an auto-correction.
public static final int COMMIT_TYPE_CANCEL_AUTO_CORRECT = 3;
+ public static final int NOT_A_SEPARATOR = -1;
+
public final ArrayList<int[]> mCodes;
public final int[] mXCoordinates;
public final int[] mYCoordinates;
public final String mTypedWord;
public final String mCommittedWord;
+ public final int mSeparatorCode;
private boolean mActive;
public static final LastComposedWord NOT_A_COMPOSED_WORD =
- new LastComposedWord(null, null, null, "", "");
+ new LastComposedWord(null, null, null, "", "", NOT_A_SEPARATOR);
// Warning: this is using the passed objects as is and fully expects them to be
// immutable. Do not fiddle with their contents after you passed them to this constructor.
public LastComposedWord(final ArrayList<int[]> codes, final int[] xCoordinates,
- final int[] yCoordinates, final String typedWord, final String committedWord) {
+ final int[] yCoordinates, final String typedWord, final String committedWord,
+ final int separatorCode) {
mCodes = codes;
mXCoordinates = xCoordinates;
mYCoordinates = yCoordinates;
mTypedWord = typedWord;
mCommittedWord = committedWord;
+ mSeparatorCode = separatorCode;
mActive = true;
}