From f8accd8839d291f10b218e64aa6b8eb154c92c4c Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 13 Mar 2014 17:37:16 +0900 Subject: [CB04] Add an event array to WordComposer. Bug: 13406701 Change-Id: I9ecd2709c8f1c678a85b0cfaf7c5ed4f78459821 --- .../com/android/inputmethod/latin/LastComposedWord.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/LastComposedWord.java') 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 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(), 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 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(events); mCommittedWord = committedWord; mSeparatorString = separatorString; mActive = true; -- cgit v1.2.3-83-g751a