Skip to content
Snippets Groups Projects
Commit 70852c91 authored by Jean Chalard's avatar Jean Chalard
Browse files

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
parent 89ffb212
No related branches found
No related tags found
No related merge requests found
...@@ -235,6 +235,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar ...@@ -235,6 +235,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private final ComposingStateManager mComposingStateManager = private final ComposingStateManager mComposingStateManager =
ComposingStateManager.getInstance(); ComposingStateManager.getInstance();
private boolean mIsAutoCorrectionIndicatorOn;
public final UIHandler mHandler = new UIHandler(this); public final UIHandler mHandler = new UIHandler(this);
...@@ -1293,6 +1294,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar ...@@ -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 // all inputs that do not result in a special state. Each character handling is then
// free to override the state as they see fit. // free to override the state as they see fit.
final int spaceState = mSpaceState; final int spaceState = mSpaceState;
if (!mWordComposer.isComposingWord()) mIsAutoCorrectionIndicatorOn = false;
// TODO: Consolidate the double space timer, mLastKeyTime, and the space state. // TODO: Consolidate the double space timer, mLastKeyTime, and the space state.
if (primaryCode != Keyboard.CODE_SPACE) { if (primaryCode != Keyboard.CODE_SPACE) {
...@@ -1745,6 +1747,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar ...@@ -1745,6 +1747,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
+ " -> " + newAutoCorrectionIndicator); + " -> " + newAutoCorrectionIndicator);
} }
if (mWordComposer.isComposingWord()) { if (mWordComposer.isComposingWord()) {
mIsAutoCorrectionIndicatorOn = newAutoCorrectionIndicator;
final CharSequence textWithUnderline = final CharSequence textWithUnderline =
getTextWithUnderline(mWordComposer.getTypedWord()); getTextWithUnderline(mWordComposer.getTypedWord());
ic.setComposingText(textWithUnderline, 1); ic.setComposingText(textWithUnderline, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment