Loading java/src/com/android/inputmethod/latin/LastComposedWord.java +2 −4 Original line number Original line Diff line number Diff line Loading @@ -40,7 +40,6 @@ public class LastComposedWord { // an auto-correction. // an auto-correction. public static final int COMMIT_TYPE_CANCEL_AUTO_CORRECT = 3; public static final int COMMIT_TYPE_CANCEL_AUTO_CORRECT = 3; public final int mType; public final ArrayList<int[]> mCodes; public final ArrayList<int[]> mCodes; public final int[] mXCoordinates; public final int[] mXCoordinates; public final int[] mYCoordinates; public final int[] mYCoordinates; Loading @@ -50,11 +49,10 @@ public class LastComposedWord { private boolean mActive; private boolean mActive; public static final LastComposedWord NOT_A_COMPOSED_WORD = public static final LastComposedWord NOT_A_COMPOSED_WORD = new LastComposedWord(COMMIT_TYPE_USER_TYPED_WORD, null, null, null, "", ""); new LastComposedWord(null, null, null, "", ""); public LastComposedWord(final int type, final ArrayList<int[]> codes, final int[] xCoordinates, public LastComposedWord(final ArrayList<int[]> codes, final int[] xCoordinates, final int[] yCoordinates, final String typedWord, final String autoCorrection) { final int[] yCoordinates, final String typedWord, final String autoCorrection) { mType = type; mCodes = codes; mCodes = codes; mXCoordinates = xCoordinates; mXCoordinates = xCoordinates; mYCoordinates = yCoordinates; mYCoordinates = yCoordinates; Loading java/src/com/android/inputmethod/latin/WordComposer.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -309,7 +309,7 @@ public class WordComposer { // LastComposedWord#didAutoCorrectToAnotherWord with #equals(). It would be marginally // LastComposedWord#didAutoCorrectToAnotherWord with #equals(). It would be marginally // cleaner to do it here, but it would be slower (since we would #equals() for each commit, // cleaner to do it here, but it would be slower (since we would #equals() for each commit, // instead of only on cancel), and ultimately we want to figure it out even earlier anyway. // instead of only on cancel), and ultimately we want to figure it out even earlier anyway. final LastComposedWord lastComposedWord = new LastComposedWord(type, mCodes, final LastComposedWord lastComposedWord = new LastComposedWord(mCodes, mXCoordinates, mYCoordinates, mTypedWord.toString(), mXCoordinates, mYCoordinates, mTypedWord.toString(), (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD) || (null == mAutoCorrection) (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD) || (null == mAutoCorrection) ? null : mAutoCorrection.toString()); ? null : mAutoCorrection.toString()); Loading Loading
java/src/com/android/inputmethod/latin/LastComposedWord.java +2 −4 Original line number Original line Diff line number Diff line Loading @@ -40,7 +40,6 @@ public class LastComposedWord { // an auto-correction. // an auto-correction. public static final int COMMIT_TYPE_CANCEL_AUTO_CORRECT = 3; public static final int COMMIT_TYPE_CANCEL_AUTO_CORRECT = 3; public final int mType; public final ArrayList<int[]> mCodes; public final ArrayList<int[]> mCodes; public final int[] mXCoordinates; public final int[] mXCoordinates; public final int[] mYCoordinates; public final int[] mYCoordinates; Loading @@ -50,11 +49,10 @@ public class LastComposedWord { private boolean mActive; private boolean mActive; public static final LastComposedWord NOT_A_COMPOSED_WORD = public static final LastComposedWord NOT_A_COMPOSED_WORD = new LastComposedWord(COMMIT_TYPE_USER_TYPED_WORD, null, null, null, "", ""); new LastComposedWord(null, null, null, "", ""); public LastComposedWord(final int type, final ArrayList<int[]> codes, final int[] xCoordinates, public LastComposedWord(final ArrayList<int[]> codes, final int[] xCoordinates, final int[] yCoordinates, final String typedWord, final String autoCorrection) { final int[] yCoordinates, final String typedWord, final String autoCorrection) { mType = type; mCodes = codes; mCodes = codes; mXCoordinates = xCoordinates; mXCoordinates = xCoordinates; mYCoordinates = yCoordinates; mYCoordinates = yCoordinates; Loading
java/src/com/android/inputmethod/latin/WordComposer.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -309,7 +309,7 @@ public class WordComposer { // LastComposedWord#didAutoCorrectToAnotherWord with #equals(). It would be marginally // LastComposedWord#didAutoCorrectToAnotherWord with #equals(). It would be marginally // cleaner to do it here, but it would be slower (since we would #equals() for each commit, // cleaner to do it here, but it would be slower (since we would #equals() for each commit, // instead of only on cancel), and ultimately we want to figure it out even earlier anyway. // instead of only on cancel), and ultimately we want to figure it out even earlier anyway. final LastComposedWord lastComposedWord = new LastComposedWord(type, mCodes, final LastComposedWord lastComposedWord = new LastComposedWord(mCodes, mXCoordinates, mYCoordinates, mTypedWord.toString(), mXCoordinates, mYCoordinates, mTypedWord.toString(), (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD) || (null == mAutoCorrection) (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD) || (null == mAutoCorrection) ? null : mAutoCorrection.toString()); ? null : mAutoCorrection.toString()); Loading