diff options
author | 2012-04-13 10:47:19 -0700 | |
---|---|---|
committer | 2012-04-13 10:47:19 -0700 | |
commit | 2783c51e6d4163c8d3f8b8c114b5d170d0b645fb (patch) | |
tree | 2bbc61a7820a604459a30d860489fbb0d83bdaa9 /java/src | |
parent | c206d0462354b3bf1ad0cec61534da567829555d (diff) | |
parent | 60adb8757496fecb8f376a80832c176b35e43d06 (diff) | |
download | latinime-2783c51e6d4163c8d3f8b8c114b5d170d0b645fb.tar.gz latinime-2783c51e6d4163c8d3f8b8c114b5d170d0b645fb.tar.xz latinime-2783c51e6d4163c8d3f8b8c114b5d170d0b645fb.zip |
Merge "clean up researchLogging of autocorrection"
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 4 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/ResearchLogger.java | 14 |
2 files changed, 17 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 5a1ad2bd0..336929229 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1787,6 +1787,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen + "is empty? Impossible! I must commit suicide."); } Utils.Stats.onAutoCorrection(typedWord, autoCorrection.toString(), separatorCodePoint); + if (ProductionFlag.IS_EXPERIMENTAL) { + ResearchLogger.LatinIME_commitCurrentAutoCorrection(typedWord, + autoCorrection.toString()); + } mExpectingUpdateSelection = true; commitChosenWord(autoCorrection, LastComposedWord.COMMIT_TYPE_DECIDED_WORD, separatorCodePoint); diff --git a/java/src/com/android/inputmethod/latin/ResearchLogger.java b/java/src/com/android/inputmethod/latin/ResearchLogger.java index 2d9f3ceb6..4e90dd624 100644 --- a/java/src/com/android/inputmethod/latin/ResearchLogger.java +++ b/java/src/com/android/inputmethod/latin/ResearchLogger.java @@ -354,6 +354,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang = DEFAULT_ENABLED; private static final boolean KEYBOARDSTATE_TOGGLEALPHABETANDSYMBOLS_ENABLED = DEFAULT_ENABLED; + private static final boolean LATINIME_COMMITCURRENTAUTOCORRECTION_ENABLED = DEFAULT_ENABLED; private static final boolean LATINIME_ONDISPLAYCOMPLETIONS_ENABLED = DEFAULT_ENABLED; private static final boolean LATINIME_ONSTARTINPUTVIEWINTERNAL_ENABLED = DEFAULT_ENABLED; private static final boolean LATINIME_ONUPDATESELECTION_ENABLED = DEFAULT_ENABLED; @@ -574,6 +575,17 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } } + public static void LatinIME_commitCurrentAutoCorrection(final String typedWord, + final String autoCorrection) { + if (UnsLogGroup.LATINIME_COMMITCURRENTAUTOCORRECTION_ENABLED) { + if (typedWord.equals(autoCorrection)) { + getInstance().logCorrection("[----]", typedWord, autoCorrection, -1); + } else { + getInstance().logCorrection("[Auto]", typedWord, autoCorrection, -1); + } + } + } + public static void latinIME_onDisplayCompletions( final CompletionInfo[] applicationSpecifiedCompletions) { if (UnsLogGroup.LATINIME_ONDISPLAYCOMPLETIONS_ENABLED) { @@ -714,4 +726,4 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang logUnstructured("SuggestionsView_setSuggestions", mSuggestedWords.toString()); } } -} +}
\ No newline at end of file |