From 66bb563535dbe3672f99f75bd71763a551444867 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 21 Feb 2012 23:17:54 -0800 Subject: Give LastComposedWord knowledge of the separator (A2) This stores the separator that was used to commit the word in the LastComposedWord. It may be NOT_A_SEPARATOR if there was no separator (for example, the cursor moved causing a commit, or there was a manual pick). This is necessary to implement feature request #5968922. Change-Id: I5fcf19a78ec66d68d4df89418eaef13952588207 --- java/src/com/android/inputmethod/latin/WordComposer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java') diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index 1f9371538..0fa28e49e 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -308,7 +308,8 @@ public class WordComposer { } // `type' should be one of the LastComposedWord.COMMIT_TYPE_* constants above. - public LastComposedWord commitWord(final int type, final String committedWord) { + public LastComposedWord commitWord(final int type, final String committedWord, + final int separatorCode) { // Note: currently, we come here whenever we commit a word. If it's any *other* kind than // DECIDED_WORD, we should deactivate the last composed word so that we don't attempt to // cancel later. @@ -327,7 +328,7 @@ public class WordComposer { mXCoordinates = new int[N]; mYCoordinates = new int[N]; final LastComposedWord lastComposedWord = new LastComposedWord(codes, - xCoordinates, yCoordinates, mTypedWord.toString(), committedWord); + xCoordinates, yCoordinates, mTypedWord.toString(), committedWord, separatorCode); if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD) { lastComposedWord.deactivate(); } -- cgit v1.2.3-83-g751a