aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2012-04-11 21:42:22 -0700
committerKurt Partridge <kep@google.com>2012-04-16 16:52:25 -0700
commit9bfb6202154e06d7156f2f374dd9359f1be4eb68 (patch)
tree55597afdc782b7a545da9b856488c86524e529fd /java/src/com/android/inputmethod/latin/LatinIME.java
parent473a3dd66952711d76e6d3e74292c0d6c7fa38d2 (diff)
downloadlatinime-9bfb6202154e06d7156f2f374dd9359f1be4eb68.tar.gz
latinime-9bfb6202154e06d7156f2f374dd9359f1be4eb68.tar.xz
latinime-9bfb6202154e06d7156f2f374dd9359f1be4eb68.zip
add logPoint for manual correction (inc touch pos)
Bug: 6188932 Change-Id: Ibcc4901bcfab6632ee4c59cb58d35452218a288d
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index caa7f9312..b30d1e35c 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1817,7 +1817,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
@Override
- public void pickSuggestionManually(final int index, final CharSequence suggestion) {
+ public void pickSuggestionManually(final int index, final CharSequence suggestion,
+ int x, int y) {
final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions();
if (SPACE_STATE_PHANTOM == mSpaceState && suggestion.length() > 0) {
@@ -1840,6 +1841,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (ic != null) {
final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index];
ic.commitCompletion(completionInfo);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_pickApplicationSpecifiedCompletion(index,
+ completionInfo.getText(), x, y);
+ }
}
return;
}
@@ -1850,6 +1855,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// So, LatinImeLogger logs "" as a user's input.
LatinImeLogger.logOnManualSuggestion("", suggestion.toString(), index, suggestedWords);
// Rely on onCodeInput to do the complicated swapping/stripping logic consistently.
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_punctuationSuggestion(index, suggestion, x, y);
+ }
final int primaryCode = suggestion.charAt(0);
onCodeInput(primaryCode,
KeyboardActionListener.SUGGESTION_STRIP_COORDINATE,
@@ -1858,8 +1866,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
// We need to log before we commit, because the word composer will store away the user
// typed word.
- LatinImeLogger.logOnManualSuggestion(mWordComposer.getTypedWord().toString(),
+ final String replacedWord = mWordComposer.getTypedWord().toString();
+ LatinImeLogger.logOnManualSuggestion(replacedWord,
suggestion.toString(), index, suggestedWords);
+ if (ProductionFlag.IS_EXPERIMENTAL) {
+ ResearchLogger.latinIME_pickSuggestionManually(replacedWord, index, suggestion, x, y);
+ }
mExpectingUpdateSelection = true;
commitChosenWord(suggestion, LastComposedWord.COMMIT_TYPE_MANUAL_PICK,
LastComposedWord.NOT_A_SEPARATOR);