aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2012-04-16 20:36:24 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-16 20:36:24 -0700
commit40edd14c159c321fcb736225520daf1a6f904f09 (patch)
tree4bae1bf8df7687cbd4f0167185500e95befcd32a /java/src/com/android/inputmethod/latin/LatinIME.java
parent9c2a96aa6cb6d8c1f7a559dbd7051302cfc6150b (diff)
parent9bfb6202154e06d7156f2f374dd9359f1be4eb68 (diff)
downloadlatinime-40edd14c159c321fcb736225520daf1a6f904f09.tar.gz
latinime-40edd14c159c321fcb736225520daf1a6f904f09.tar.xz
latinime-40edd14c159c321fcb736225520daf1a6f904f09.zip
Merge "add logPoint for manual correction (inc touch pos)"
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);