aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LastComposedWord.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-14 04:29:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-03-14 04:29:59 +0000
commit5a1e351751deb67f5b11bd7b8c9b601d5bf653d9 (patch)
tree565f6388435e4dd60e3d495935fd51de62e23053 /java/src/com/android/inputmethod/latin/LastComposedWord.java
parenta9c1a3da63c83dd68424a0851079a55d110cc63a (diff)
parentf8accd8839d291f10b218e64aa6b8eb154c92c4c (diff)
downloadlatinime-5a1e351751deb67f5b11bd7b8c9b601d5bf653d9.tar.gz
latinime-5a1e351751deb67f5b11bd7b8c9b601d5bf653d9.tar.xz
latinime-5a1e351751deb67f5b11bd7b8c9b601d5bf653d9.zip
Merge "[CB04] Add an event array to WordComposer."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LastComposedWord.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LastComposedWord.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java
index 8546cebd5..2a16ab5ab 100644
--- a/java/src/com/android/inputmethod/latin/LastComposedWord.java
+++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java
@@ -18,6 +18,10 @@ package com.android.inputmethod.latin;
import android.text.TextUtils;
+import com.android.inputmethod.event.Event;
+
+import java.util.ArrayList;
+
/**
* This class encapsulates data about a word previously composed, but that has been
* committed already. This is used for resuming suggestion, and cancel auto-correction.
@@ -41,6 +45,7 @@ public final class LastComposedWord {
public static final String NOT_A_SEPARATOR = "";
public final int[] mPrimaryKeyCodes;
+ public final ArrayList<Event> mEvents;
public final String mTypedWord;
public final CharSequence mCommittedWord;
public final String mSeparatorString;
@@ -52,19 +57,21 @@ public final class LastComposedWord {
private boolean mActive;
public static final LastComposedWord NOT_A_COMPOSED_WORD =
- new LastComposedWord(null, null, "", "", NOT_A_SEPARATOR, null,
- WordComposer.CAPS_MODE_OFF);
+ new LastComposedWord(null, new ArrayList<Event>(), null, "", "",
+ NOT_A_SEPARATOR, null, WordComposer.CAPS_MODE_OFF);
// 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 int[] primaryKeyCodes, final InputPointers inputPointers,
- final String typedWord, final CharSequence committedWord, final String separatorString,
+ public LastComposedWord(final int[] primaryKeyCodes, final ArrayList<Event> events,
+ final InputPointers inputPointers, final String typedWord,
+ final CharSequence committedWord, final String separatorString,
final String prevWord, final int capitalizedMode) {
mPrimaryKeyCodes = primaryKeyCodes;
if (inputPointers != null) {
mInputPointers.copy(inputPointers);
}
mTypedWord = typedWord;
+ mEvents = new ArrayList<Event>(events);
mCommittedWord = committedWord;
mSeparatorString = separatorString;
mActive = true;