aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-05-12 09:33:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-12 09:33:27 +0000
commitfac678e13df2c6073bdd7f9dc2fca1d4e16f8309 (patch)
treed66559a94ae8165f043082c1f598a25b3e238b1b /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
parent4fb490ff90423b17181e5402d7f2056d508f3f0a (diff)
parentbe99616afa2243fe48dc406d0a3f442cb05453b4 (diff)
downloadlatinime-fac678e13df2c6073bdd7f9dc2fca1d4e16f8309.tar.gz
latinime-fac678e13df2c6073bdd7f9dc2fca1d4e16f8309.tar.xz
latinime-fac678e13df2c6073bdd7f9dc2fca1d4e16f8309.zip
Merge "Create the path for specifying combining rules in the subtype"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 75432fbac..e80ee35bd 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -97,6 +97,11 @@ public final class InputLogic {
private boolean mIsAutoCorrectionIndicatorOn;
private long mDoubleSpacePeriodCountdownStart;
+ /**
+ * Create a new instance of the input logic.
+ * @param latinIME the instance of the parent LatinIME. We should remove this when we can.
+ * @param suggestionStripViewAccessor an object to access the suggestion strip view.
+ */
public InputLogic(final LatinIME latinIME,
final SuggestionStripViewAccessor suggestionStripViewAccessor) {
mLatinIME = latinIME;
@@ -117,9 +122,12 @@ public final class InputLogic {
*
* @param restarting whether input is starting in the same field as before. Unused for now.
* @param editorInfo the editorInfo associated with the editor.
+ * @param combiningSpec the combining spec string for this subtype
*/
- public void startInput(final boolean restarting, final EditorInfo editorInfo) {
+ public void startInput(final boolean restarting, final EditorInfo editorInfo,
+ final String combiningSpec) {
mEnteredText = null;
+ mWordComposer.restart(combiningSpec);
resetComposingState(true /* alsoResetLastComposedWord */);
mDeleteCount = 0;
mSpaceState = SpaceState.NONE;
@@ -138,6 +146,14 @@ public final class InputLogic {
}
/**
+ * Call this when the subtype changes.
+ * @param combiningSpec the spec string for the combining rules
+ */
+ public void onSubtypeChanged(final String combiningSpec) {
+ mWordComposer.restart(combiningSpec);
+ }
+
+ /**
* Clean up the input logic after input is finished.
*/
public void finishInput() {