diff options
author | 2012-04-12 17:13:52 -0700 | |
---|---|---|
committer | 2012-04-12 22:59:21 -0700 | |
commit | 60adb8757496fecb8f376a80832c176b35e43d06 (patch) | |
tree | 69ef5ec00cb00fb58fa745a7fb1d1dd41f31e6dd /java/src | |
parent | 45213ed2a6e9a940ec540ff43ded7e877cb20dc9 (diff) | |
download | latinime-60adb8757496fecb8f376a80832c176b35e43d06.tar.gz latinime-60adb8757496fecb8f376a80832c176b35e43d06.tar.xz latinime-60adb8757496fecb8f376a80832c176b35e43d06.zip |
clean up researchLogging of autocorrection
remove dependence of ResearchLogger on LatinImeLogger
for autocorrection
multi-project commit with I32cc134b
Bug: 6188932
Change-Id: Iaeda97eb43fa4782db2d1b2a6d8d09a93b395111
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 7cdeef897..b587568c9 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1783,6 +1783,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 |