Pass DictionaryFacilitator for autocorrection and suggestion stats
Bug: 19715579 Change-Id: Ic48de74bde0f9f5d5e68e8289948cc5e92cbfa1emain
parent
ea727b6b71
commit
4024984c1e
|
@ -18,6 +18,7 @@ package com.android.inputmethod.latin.utils;
|
||||||
|
|
||||||
import android.view.inputmethod.InputMethodSubtype;
|
import android.view.inputmethod.InputMethodSubtype;
|
||||||
|
|
||||||
|
import com.android.inputmethod.latin.DictionaryFacilitator;
|
||||||
import com.android.inputmethod.latin.RichInputMethodManager;
|
import com.android.inputmethod.latin.RichInputMethodManager;
|
||||||
import com.android.inputmethod.latin.SuggestedWords;
|
import com.android.inputmethod.latin.SuggestedWords;
|
||||||
import com.android.inputmethod.latin.settings.SettingsValues;
|
import com.android.inputmethod.latin.settings.SettingsValues;
|
||||||
|
@ -36,7 +37,8 @@ public final class StatsUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onPickSuggestionManually(final SuggestedWords suggestedWords,
|
public static void onPickSuggestionManually(final SuggestedWords suggestedWords,
|
||||||
final SuggestedWords.SuggestedWordInfo suggestionInfo) {
|
final SuggestedWords.SuggestedWordInfo suggestionInfo,
|
||||||
|
final DictionaryFacilitator dictionaryFacilitator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onBackspaceWordDelete(int wordLength) {
|
public static void onBackspaceWordDelete(int wordLength) {
|
||||||
|
@ -70,7 +72,7 @@ public final class StatsUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onAutoCorrection(final String typedWord, final String autoCorrectionWord,
|
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) {
|
public static void onWordCommitUserTyped(final String commitWord, final boolean isBatchMode) {
|
||||||
|
|
|
@ -324,7 +324,8 @@ public final class InputLogic {
|
||||||
// That's going to be predictions (or punctuation suggestions), so INPUT_STYLE_NONE.
|
// That's going to be predictions (or punctuation suggestions), so INPUT_STYLE_NONE.
|
||||||
handler.postUpdateSuggestionStrip(SuggestedWords.INPUT_STYLE_NONE);
|
handler.postUpdateSuggestionStrip(SuggestedWords.INPUT_STYLE_NONE);
|
||||||
|
|
||||||
StatsUtils.onPickSuggestionManually(mSuggestedWords, suggestionInfo);
|
StatsUtils.onPickSuggestionManually(
|
||||||
|
mSuggestedWords, suggestionInfo, mDictionaryFacilitator);
|
||||||
StatsUtils.onWordCommitSuggestionPickedManually(
|
StatsUtils.onWordCommitSuggestionPickedManually(
|
||||||
suggestionInfo.mWord, mWordComposer.isBatchMode());
|
suggestionInfo.mWord, mWordComposer.isBatchMode());
|
||||||
return inputTransaction;
|
return inputTransaction;
|
||||||
|
@ -2053,8 +2054,7 @@ public final class InputLogic {
|
||||||
mConnection.getExpectedSelectionEnd() - stringToCommit.length(),
|
mConnection.getExpectedSelectionEnd() - stringToCommit.length(),
|
||||||
typedWord, stringToCommit));
|
typedWord, stringToCommit));
|
||||||
StatsUtils.onAutoCorrection(typedWord, stringToCommit, isBatchMode,
|
StatsUtils.onAutoCorrection(typedWord, stringToCommit, isBatchMode,
|
||||||
null == autoCorrectionOrNull
|
mDictionaryFacilitator);
|
||||||
? null : autoCorrectionOrNull.mSourceDict.mDictType);
|
|
||||||
StatsUtils.onWordCommitAutoCorrect(stringToCommit, isBatchMode);
|
StatsUtils.onWordCommitAutoCorrect(stringToCommit, isBatchMode);
|
||||||
} else {
|
} else {
|
||||||
StatsUtils.onWordCommitUserTyped(stringToCommit, isBatchMode);
|
StatsUtils.onWordCommitUserTyped(stringToCommit, isBatchMode);
|
||||||
|
|
Loading…
Reference in New Issue