aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-04-06 11:14:20 +0900
committersatok <satok@google.com>2011-04-08 15:24:55 +0900
commitb5d17e52fcda39d540822e615bfb7ed5074e0034 (patch)
tree080e9a7be7204b34104412c42351219acae99a57 /java/src/com/android/inputmethod/latin/LatinIME.java
parent50cce07f592a3d2525a1a103d17cd5c4d189b5f2 (diff)
downloadlatinime-b5d17e52fcda39d540822e615bfb7ed5074e0034.tar.gz
latinime-b5d17e52fcda39d540822e615bfb7ed5074e0034.tar.xz
latinime-b5d17e52fcda39d540822e615bfb7ed5074e0034.zip
Add logOnSeparator
This is a supplement for I9abb8141f23100d Change-Id: I529d2a78f4fe630611db4cba830d933370c8c34f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 35f43124d..6a858fe99 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -30,7 +30,6 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher;
import com.android.inputmethod.keyboard.KeyboardView;
import com.android.inputmethod.keyboard.LatinKeyboard;
import com.android.inputmethod.keyboard.LatinKeyboardView;
-import com.android.inputmethod.latin.Utils.RingCharBuffer;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
@@ -1174,10 +1173,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (primaryCode != Keyboard.CODE_ENTER) {
mJustAddedAutoSpace = false;
}
- RingCharBuffer.getInstance().push((char)primaryCode, x, y);
- LatinImeLogger.logOnInputChar();
if (isWordSeparator(primaryCode)) {
- handleSeparator(primaryCode);
+ handleSeparator(primaryCode, x, y);
} else {
handleCharacter(primaryCode, keyCodes, x, y);
}
@@ -1357,10 +1354,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
switcher.updateShiftState();
if (LatinIME.PERF_DEBUG) measureCps();
- TextEntryState.typedCharacter((char) code, isWordSeparator(code));
+ TextEntryState.typedCharacter((char) code, isWordSeparator(code), x, y);
}
- private void handleSeparator(int primaryCode) {
+ private void handleSeparator(int primaryCode, int x, int y) {
mVoiceProxy.handleSeparator();
// Should dismiss the "Touch again to save" message when handling separator
@@ -1381,7 +1378,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// in Italian dov' should not be expanded to dove' because the elision
// requires the last vowel to be removed.
if (mAutoCorrectOn && primaryCode != '\'') {
- pickedDefault = pickDefaultSuggestion();
+ pickedDefault = pickDefaultSuggestion(primaryCode);
// Picked the suggestion by the space key. We consider this
// as "added an auto space".
if (primaryCode == Keyboard.CODE_SPACE) {
@@ -1403,7 +1400,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
reswapPeriodAndSpace();
}
- TextEntryState.typedCharacter((char) primaryCode, true);
+ TextEntryState.typedCharacter((char) primaryCode, true, x, y);
if (TextEntryState.isPunctuationAfterAccepted() && primaryCode != Keyboard.CODE_ENTER) {
swapPunctuationAndSpace();
} else if (isSuggestionsRequested() && primaryCode == Keyboard.CODE_SPACE) {
@@ -1592,14 +1589,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
setCandidatesViewShown(isCandidateStripVisible());
}
- private boolean pickDefaultSuggestion() {
+ private boolean pickDefaultSuggestion(int separatorCode) {
// Complete any pending candidate query first
if (mHandler.hasPendingUpdateSuggestions()) {
mHandler.cancelUpdateSuggestions();
updateSuggestions();
}
if (mBestWord != null && mBestWord.length() > 0) {
- TextEntryState.acceptedDefault(mWord.getTypedWord(), mBestWord);
+ TextEntryState.acceptedDefault(mWord.getTypedWord(), mBestWord, separatorCode);
mJustAccepted = true;
pickSuggestion(mBestWord);
// Add the word to the auto dictionary if it's not a known word
@@ -1688,7 +1685,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
// Fool the state watcher so that a subsequent backspace will not do a revert, unless
// we just did a correction, in which case we need to stay in
// TextEntryState.State.PICKED_SUGGESTION state.
- TextEntryState.typedCharacter((char) Keyboard.CODE_SPACE, true);
+ TextEntryState.typedCharacter((char) Keyboard.CODE_SPACE, true,
+ WordComposer.NOT_A_COORDINATE, WordComposer.NOT_A_COORDINATE);
setPunctuationSuggestions();
} else if (!showingAddToDictionaryHint) {
// If we're not showing the "Touch again to save", then show corrections again.
@@ -1895,7 +1893,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
ic.commitText(mComposing, 1);
TextEntryState.acceptedTyped(mComposing);
ic.commitText(punctuation, 1);
- TextEntryState.typedCharacter(punctuation.charAt(0), true);
+ TextEntryState.typedCharacter(punctuation.charAt(0), true,
+ WordComposer.NOT_A_COORDINATE, WordComposer.NOT_A_COORDINATE);
// Clear composing text
mComposing.setLength(0);
} else {