diff options
author | 2012-04-16 20:36:24 -0700 | |
---|---|---|
committer | 2012-04-16 20:36:24 -0700 | |
commit | 40edd14c159c321fcb736225520daf1a6f904f09 (patch) | |
tree | 4bae1bf8df7687cbd4f0167185500e95befcd32a /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 9c2a96aa6cb6d8c1f7a559dbd7051302cfc6150b (diff) | |
parent | 9bfb6202154e06d7156f2f374dd9359f1be4eb68 (diff) | |
download | latinime-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.java | 16 |
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); |