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
main
Adrian Velicu 2014-09-19 05:47:23 +00:00 committed by Android Git Automerger
commit f0fd1aeb8c
5 changed files with 9 additions and 0 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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) {