diff options
author | 2014-05-08 14:53:56 +0900 | |
---|---|---|
committer | 2014-05-12 15:58:51 +0900 | |
commit | be99616afa2243fe48dc406d0a3f442cb05453b4 (patch) | |
tree | 07e88e670553253aa924da1bfbae3c0d4ae2277c /java/src/com/android/inputmethod/latin/WordComposer.java | |
parent | c41d261b7e1e626aaa4e333c9c4cc73ec13cb68a (diff) | |
download | latinime-be99616afa2243fe48dc406d0a3f442cb05453b4.tar.gz latinime-be99616afa2243fe48dc406d0a3f442cb05453b4.tar.xz latinime-be99616afa2243fe48dc406d0a3f442cb05453b4.zip |
Create the path for specifying combining rules in the subtype
Also add the skeleton of the combining rules for Myanmar
reordering as a pilot.
Bug: 13945569
Change-Id: Iabeb6838f45f1efff482143595ce5b48543e0c43
Diffstat (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/WordComposer.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index d755195f2..cdee496a8 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -41,6 +41,7 @@ public final class WordComposer { public static final int CAPS_MODE_AUTO_SHIFT_LOCKED = 0x7; private CombinerChain mCombinerChain; + private String mCombiningSpec; // Memory so that we don't uselessly recreate the combiner chain // The list of events that served to compose this string. private final ArrayList<Event> mEvents; @@ -91,6 +92,21 @@ public final class WordComposer { } /** + * Restart input with a new combining spec. + * @param combiningSpec The spec string for combining. This is found in the extra value. + */ + public void restart(final String combiningSpec) { + final String nonNullCombiningSpec = null == combiningSpec ? "" : combiningSpec; + if (nonNullCombiningSpec.equals(mCombiningSpec)) { + mCombinerChain.reset(); + } else { + mCombinerChain = new CombinerChain(CombinerChain.createCombiners(nonNullCombiningSpec)); + mCombiningSpec = nonNullCombiningSpec; + } + reset(); + } + + /** * Clear out the keys registered so far. */ public void reset() { |