From cf9d92629cae88273805eaf7984fcfdd8afd11f5 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 21 Feb 2012 23:11:07 -0800 Subject: Give LastComposedWord knowledge of the committed word (A1) There is no point storing the prospective autocorrect - we are recomputing it anyway. The committed word however will be necessary to implement feature request #5968922. Change-Id: I588c18e1a5a1050a791d601de465f421ccbe36cd --- java/src/com/android/inputmethod/latin/LastComposedWord.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/LastComposedWord.java') diff --git a/java/src/com/android/inputmethod/latin/LastComposedWord.java b/java/src/com/android/inputmethod/latin/LastComposedWord.java index f34cb5ff9..37be03c3e 100644 --- a/java/src/com/android/inputmethod/latin/LastComposedWord.java +++ b/java/src/com/android/inputmethod/latin/LastComposedWord.java @@ -44,7 +44,7 @@ public class LastComposedWord { public final int[] mXCoordinates; public final int[] mYCoordinates; public final String mTypedWord; - public final String mAutoCorrection; + public final String mCommittedWord; private boolean mActive; @@ -54,12 +54,12 @@ public class LastComposedWord { // Warning: this is using the passed objects as is and fully expects them to be // immutable. Do not fiddle with their contents after you passed them to this constructor. public LastComposedWord(final ArrayList codes, final int[] xCoordinates, - final int[] yCoordinates, final String typedWord, final String autoCorrection) { + final int[] yCoordinates, final String typedWord, final String committedWord) { mCodes = codes; mXCoordinates = xCoordinates; mYCoordinates = yCoordinates; mTypedWord = typedWord; - mAutoCorrection = autoCorrection; + mCommittedWord = committedWord; mActive = true; } @@ -68,7 +68,7 @@ public class LastComposedWord { } public boolean canCancelAutoCorrect() { - return mActive && !TextUtils.isEmpty(mAutoCorrection) - && !TextUtils.equals(mTypedWord, mAutoCorrection); + return mActive && !TextUtils.isEmpty(mCommittedWord) + && !TextUtils.equals(mTypedWord, mCommittedWord); } } -- cgit v1.2.3-83-g751a