am bacf2dba
: Merge "Added @UsedForTesting to \'missing\' methods to avoid ProGuard removing them"
* commit 'bacf2dbac6d27c6a5677ca3f37a6da8bfd0c8db1': Added @UsedForTesting to 'missing' methods to avoid ProGuard removing them
This commit is contained in:
commit
f0fd1aeb8c
5 changed files with 9 additions and 0 deletions
|
@ -490,6 +490,7 @@ public final class BinaryDictionary extends Dictionary {
|
|||
return true;
|
||||
}
|
||||
|
||||
@UsedForTesting
|
||||
public void addMultipleDictionaryEntries(final LanguageModelParam[] languageModelParams) {
|
||||
if (!isValidDictionary()) return;
|
||||
int processedParamCount = 0;
|
||||
|
|
|
@ -710,6 +710,7 @@ public class DictionaryFacilitator {
|
|||
getLocale(), personalizationDataChunk, spacingAndPunctuations, callback);
|
||||
}
|
||||
|
||||
@UsedForTesting
|
||||
public void addPhraseToContextualDictionary(final String[] phrase, final int probability,
|
||||
final int bigramProbabilityForWords, final int bigramProbabilityForPhrases) {
|
||||
// TODO: we're inserting the phrase into the dictionary for the active language. Rethink
|
||||
|
|
|
@ -23,6 +23,7 @@ import android.content.res.Resources;
|
|||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.inputmethod.annotations.UsedForTesting;
|
||||
import com.android.inputmethod.latin.AssetFileAddress;
|
||||
import com.android.inputmethod.latin.BinaryDictionaryGetter;
|
||||
import com.android.inputmethod.latin.Constants;
|
||||
|
@ -382,6 +383,7 @@ public class DictionaryInfoUtils {
|
|||
return dictList;
|
||||
}
|
||||
|
||||
@UsedForTesting
|
||||
public static boolean looksValidForDictionaryInsertion(final CharSequence text,
|
||||
final SpacingAndPunctuations spacingAndPunctuations) {
|
||||
if (TextUtils.isEmpty(text)) return false;
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.util.Locale;
|
|||
|
||||
import android.view.inputmethod.InputMethodSubtype;
|
||||
|
||||
import com.android.inputmethod.annotations.UsedForTesting;
|
||||
import com.android.inputmethod.latin.PrevWordsInfo;
|
||||
|
||||
public interface DistracterFilter {
|
||||
|
@ -36,6 +37,7 @@ public interface DistracterFilter {
|
|||
public boolean isDistracterToWordsInDictionaries(final PrevWordsInfo prevWordsInfo,
|
||||
final String testedWord, final Locale locale);
|
||||
|
||||
@UsedForTesting
|
||||
public int getWordHandlingType(final PrevWordsInfo prevWordsInfo, final String testedWord,
|
||||
final Locale locale);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package com.android.inputmethod.latin.utils;
|
|||
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.inputmethod.annotations.UsedForTesting;
|
||||
import com.android.inputmethod.latin.Dictionary;
|
||||
import com.android.inputmethod.latin.DictionaryFacilitator;
|
||||
import com.android.inputmethod.latin.PrevWordsInfo;
|
||||
|
@ -58,12 +59,14 @@ public final class LanguageModelParam {
|
|||
public final int mTimestamp;
|
||||
|
||||
// Constructor for unigram. TODO: support shortcuts
|
||||
@UsedForTesting
|
||||
public LanguageModelParam(final CharSequence word, final int unigramProbability,
|
||||
final int timestamp) {
|
||||
this(null /* word0 */, word, unigramProbability, Dictionary.NOT_A_PROBABILITY, timestamp);
|
||||
}
|
||||
|
||||
// Constructor for unigram and bigram.
|
||||
@UsedForTesting
|
||||
public LanguageModelParam(final CharSequence word0, final CharSequence word1,
|
||||
final int unigramProbability, final int bigramProbability,
|
||||
final int timestamp) {
|
||||
|
|
Loading…
Reference in a new issue