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/deprecated/VoiceProxy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/deprecated/VoiceProxy.java') diff --git a/java/src/com/android/inputmethod/deprecated/VoiceProxy.java b/java/src/com/android/inputmethod/deprecated/VoiceProxy.java index f632b0e02..5c4e9af68 100644 --- a/java/src/com/android/inputmethod/deprecated/VoiceProxy.java +++ b/java/src/com/android/inputmethod/deprecated/VoiceProxy.java @@ -56,6 +56,7 @@ import com.android.inputmethod.deprecated.voice.VoiceInput; import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.LatinKeyboardView; import com.android.inputmethod.latin.EditingUtils; +import com.android.inputmethod.latin.LastComposedWord; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.LatinIME.UIHandler; import com.android.inputmethod.latin.LatinImeLogger; @@ -553,7 +554,7 @@ public class VoiceProxy implements VoiceInput.UiListener { mHints.registerVoiceResult(bestResult); if (ic != null) ic.beginBatchEdit(); // To avoid extra updates on committing older text - mService.commitTyped(ic); + mService.commitTyped(ic, LastComposedWord.NOT_A_SEPARATOR); EditingUtils.appendText(ic, bestResult); if (ic != null) ic.endBatchEdit(); -- cgit v1.2.3-83-g751a