aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LastComposedWord.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-03-13 17:37:16 +0900
committerJean Chalard <jchalard@google.com>2014-03-14 12:44:49 +0900
commitf8accd8839d291f10b218e64aa6b8eb154c92c4c (patch)
treefb28ac4319eb6cc49791bb50cb9aedc9f6b32a69 /java/src/com/android/inputmethod/latin/LastComposedWord.java
parent309773c322adb383a05cf673fd8d8a8339dcb076 (diff)
downloadlatinime-f8accd8839d291f10b218e64aa6b8eb154c92c4c.tar.gz
latinime-f8accd8839d291f10b218e64aa6b8eb154c92c4c.tar.xz
latinime-f8accd8839d291f10b218e64aa6b8eb154c92c4c.zip
[CB04] Add an event array to WordComposer.
Bug: 13406701 Change-Id: I9ecd2709c8f1c678a85b0cfaf7c5ed4f78459821
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;