From 7ede642df417c0f732573f639970b138f0bee18c Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 14 Mar 2014 22:50:20 +0900 Subject: [CB08] Create a combiner chain in the word composer. Bug: 13406701 Change-Id: I3b9f75de9283f76366d1bef7e14a8f22f2186669 --- java/src/com/android/inputmethod/latin/WordComposer.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java') diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index 2ac11aa29..9e5d9205d 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -16,6 +16,7 @@ package com.android.inputmethod.latin; +import com.android.inputmethod.event.CombinerChain; import com.android.inputmethod.event.Event; import com.android.inputmethod.latin.utils.CollectionUtils; import com.android.inputmethod.latin.utils.CoordinateUtils; @@ -40,6 +41,8 @@ public final class WordComposer { public static final int CAPS_MODE_AUTO_SHIFTED = 0x5; public static final int CAPS_MODE_AUTO_SHIFT_LOCKED = 0x7; + private CombinerChain mCombinerChain; + // An array of code points representing the characters typed so far. // The array is limited to MAX_WORD_LENGTH code points, but mTypedWord extends past that // and mCodePointSize can go past that. If mCodePointSize is greater than MAX_WORD_LENGTH, @@ -87,6 +90,7 @@ public final class WordComposer { private boolean mIsFirstCharCapitalized; public WordComposer() { + mCombinerChain = new CombinerChain(); mPrimaryKeyCodes = new int[MAX_WORD_LENGTH]; mEvents = CollectionUtils.newArrayList(); mTypedWord = new StringBuilder(MAX_WORD_LENGTH); @@ -101,6 +105,7 @@ public final class WordComposer { } public WordComposer(final WordComposer source) { + mCombinerChain = source.mCombinerChain; mPrimaryKeyCodes = Arrays.copyOf(source.mPrimaryKeyCodes, source.mPrimaryKeyCodes.length); mEvents = new ArrayList(source.mEvents); mTypedWord = new StringBuilder(source.mTypedWord); -- cgit v1.2.3-83-g751a