mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Pass DictionaryFacilitator for autocorrection and suggestion stats
Bug: 19715579 Change-Id: Ic48de74bde0f9f5d5e68e8289948cc5e92cbfa1e
This commit is contained in:
parent
ea727b6b71
commit
4024984c1e
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user