aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-07 15:20:01 +0900
committerJean Chalard <jchalard@google.com>2012-03-07 15:20:01 +0900
commit70852c91dc7209d0aaa875a2cb0f79739c7398e6 (patch)
treeaa7944847e0d2929bae7c54d2a1e060fc5e640dc /java/src
parent89ffb212b469531db4a616afb9bb7ba6d2a56b50 (diff)
downloadlatinime-70852c91dc7209d0aaa875a2cb0f79739c7398e6.tar.gz
latinime-70852c91dc7209d0aaa875a2cb0f79739c7398e6.tar.xz
latinime-70852c91dc7209d0aaa875a2cb0f79739c7398e6.zip
Remember auto-correction status simply (B1)
This duplicates the functionality in ComposingStateManager at a fraction of the cost. It's not used yet. Change-Id: Ica2607fb2f7c41e11189fcb566e253db8f62596f
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index e755fa4a6..6bf278aed 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -235,6 +235,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private final ComposingStateManager mComposingStateManager =
ComposingStateManager.getInstance();
+ private boolean mIsAutoCorrectionIndicatorOn;
public final UIHandler mHandler = new UIHandler(this);
@@ -1293,6 +1294,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// all inputs that do not result in a special state. Each character handling is then
// free to override the state as they see fit.
final int spaceState = mSpaceState;
+ if (!mWordComposer.isComposingWord()) mIsAutoCorrectionIndicatorOn = false;
// TODO: Consolidate the double space timer, mLastKeyTime, and the space state.
if (primaryCode != Keyboard.CODE_SPACE) {
@@ -1745,6 +1747,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
+ " -> " + newAutoCorrectionIndicator);
}
if (mWordComposer.isComposingWord()) {
+ mIsAutoCorrectionIndicatorOn = newAutoCorrectionIndicator;
final CharSequence textWithUnderline =
getTextWithUnderline(mWordComposer.getTypedWord());
ic.setComposingText(textWithUnderline, 1);