aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2015-03-17 22:39:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-17 22:39:17 +0000
commit0bbbbdf1c43d94edadf6f7996a6b5eb04f5e29c1 (patch)
tree9762205159be9de20a9aef028b18cc18b7b86633
parentedcf5853d1f9253e3a76e6db01731b9465da6ae0 (diff)
parent4024984c1efa394018631ca1bb46deba3efa629c (diff)
downloadlatinime-0bbbbdf1c43d94edadf6f7996a6b5eb04f5e29c1.tar.gz
latinime-0bbbbdf1c43d94edadf6f7996a6b5eb04f5e29c1.tar.xz
latinime-0bbbbdf1c43d94edadf6f7996a6b5eb04f5e29c1.zip
Merge "Pass DictionaryFacilitator for autocorrection and suggestion stats"
-rw-r--r--java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java6
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java6
2 files changed, 7 insertions, 5 deletions
diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java
index 21a806878..b8f835ee3 100644
--- a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java
+++ b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java
@@ -18,6 +18,7 @@ package com.android.inputmethod.latin.utils;
import android.view.inputmethod.InputMethodSubtype;
+import com.android.inputmethod.latin.DictionaryFacilitator;
import com.android.inputmethod.latin.RichInputMethodManager;
import com.android.inputmethod.latin.SuggestedWords;
import com.android.inputmethod.latin.settings.SettingsValues;
@@ -36,7 +37,8 @@ public final class StatsUtils {
}
public static void onPickSuggestionManually(final SuggestedWords suggestedWords,
- final SuggestedWords.SuggestedWordInfo suggestionInfo) {
+ final SuggestedWords.SuggestedWordInfo suggestionInfo,
+ final DictionaryFacilitator dictionaryFacilitator) {
}
public static void onBackspaceWordDelete(int wordLength) {
@@ -70,7 +72,7 @@ public final class StatsUtils {
}
public static void onAutoCorrection(final String typedWord, final String autoCorrectionWord,
- final boolean isBatchInput, @Nullable final String dictionaryType) {
+ final boolean isBatchInput, final DictionaryFacilitator dictionaryType) {
}
public static void onWordCommitUserTyped(final String commitWord, final boolean isBatchMode) {
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index f02a63e57..00175f024 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -324,7 +324,8 @@ public final class InputLogic {
// That's going to be predictions (or punctuation suggestions), so INPUT_STYLE_NONE.
handler.postUpdateSuggestionStrip(SuggestedWords.INPUT_STYLE_NONE);
- StatsUtils.onPickSuggestionManually(mSuggestedWords, suggestionInfo);
+ StatsUtils.onPickSuggestionManually(
+ mSuggestedWords, suggestionInfo, mDictionaryFacilitator);
StatsUtils.onWordCommitSuggestionPickedManually(
suggestionInfo.mWord, mWordComposer.isBatchMode());
return inputTransaction;
@@ -2053,8 +2054,7 @@ public final class InputLogic {
mConnection.getExpectedSelectionEnd() - stringToCommit.length(),
typedWord, stringToCommit));
StatsUtils.onAutoCorrection(typedWord, stringToCommit, isBatchMode,
- null == autoCorrectionOrNull
- ? null : autoCorrectionOrNull.mSourceDict.mDictType);
+ mDictionaryFacilitator);
StatsUtils.onWordCommitAutoCorrect(stringToCommit, isBatchMode);
} else {
StatsUtils.onWordCommitUserTyped(stringToCommit, isBatchMode);