am 74332597
: Merge "Add StatsUtils.onPickSuggestionManually and SuggestedWords.indexOf."
* commit '74332597d6461a45deaa00eeff3668febb5fde59': Add StatsUtils.onPickSuggestionManually and SuggestedWords.indexOf.
This commit is contained in:
commit
1b1b046397
3 changed files with 18 additions and 0 deletions
|
@ -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 a new issue