Merge "Pass DictionaryFacilitator for autocorrection and suggestion stats"

main
Mohammadinamul Sheik 2015-03-17 22:39:16 +00:00 committed by Android (Google) Code Review
commit 0bbbbdf1c4
2 changed files with 7 additions and 5 deletions

View File

@ -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) {

View File

@ -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);