Add StatsUtils.onPickSuggestionManually and SuggestedWords.indexOf.
Change-Id: I1588448154d086569cb026825fdc36cd1812a582main
parent
f7be68e636
commit
c74ffe8edc
|
@ -17,6 +17,7 @@
|
|||
package com.android.inputmethod.latin.utils;
|
||||
|
||||
import com.android.inputmethod.latin.RichInputMethodManager;
|
||||
import com.android.inputmethod.latin.SuggestedWords;
|
||||
import com.android.inputmethod.latin.settings.SettingsValues;
|
||||
|
||||
public final class StatsUtils {
|
||||
|
@ -24,4 +25,9 @@ public final class StatsUtils {
|
|||
public static void onCreate(final SettingsValues settingsValues,
|
||||
RichInputMethodManager richImm) {
|
||||
}
|
||||
|
||||
public static void onPickSuggestionManually(final SuggestedWords suggestedWords,
|
||||
final SuggestedWords.SuggestedWordInfo suggestionInfo) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,6 +142,15 @@ public class SuggestedWords {
|
|||
return mSuggestedWordInfoList.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the suggestion index from the suggestions list.
|
||||
* @param suggestedWordInfo The {@link SuggestedWordInfo} to find the index.
|
||||
* @return The position of the suggestion in the suggestion list.
|
||||
*/
|
||||
public int indexOf(SuggestedWordInfo suggestedWordInfo) {
|
||||
return mSuggestedWordInfoList.indexOf(suggestedWordInfo);
|
||||
}
|
||||
|
||||
public String getDebugString(final int pos) {
|
||||
if (!DebugFlags.DEBUG_ENABLED) {
|
||||
return null;
|
||||
|
|
|
@ -60,6 +60,7 @@ import com.android.inputmethod.latin.suggestions.SuggestionStripViewAccessor;
|
|||
import com.android.inputmethod.latin.utils.AsyncResultHolder;
|
||||
import com.android.inputmethod.latin.utils.InputTypeUtils;
|
||||
import com.android.inputmethod.latin.utils.RecapitalizeStatus;
|
||||
import com.android.inputmethod.latin.utils.StatsUtils;
|
||||
import com.android.inputmethod.latin.utils.StringUtils;
|
||||
import com.android.inputmethod.latin.utils.TextRange;
|
||||
|
||||
|
@ -361,6 +362,8 @@ public final class InputLogic {
|
|||
if (shouldShowAddToDictionaryIndicator) {
|
||||
mTextDecorator.showAddToDictionaryIndicator(suggestionInfo);
|
||||
}
|
||||
|
||||
StatsUtils.onPickSuggestionManually(mSuggestedWords, suggestionInfo);
|
||||
return inputTransaction;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue