Do away with Utils#addAllSuggestions (A14)

It's not used any more.

Change-Id: Id9da40fdbf7078f3ac647d1368237d6601f5a2ba
This commit is contained in:
Jean Chalard 2012-06-21 13:24:13 +09:00
parent d9df8094e6
commit 2225b3bace
4 changed files with 1 additions and 15 deletions

View file

@ -141,7 +141,6 @@ public class BinaryDictionary extends Dictionary {
mBigramScores[j], SuggestedWordInfo.KIND_CORRECTION));
}
}
Utils.addAllSuggestions(mDicTypeId, Dictionary.BIGRAM, suggestions, callback);
return suggestions;
}
@ -168,7 +167,6 @@ public class BinaryDictionary extends Dictionary {
mScores[j], SuggestedWordInfo.KIND_CORRECTION));
}
}
Utils.addAllSuggestions(mDicTypeId, Dictionary.UNIGRAM, suggestions, callback);
return suggestions;
}

View file

@ -262,7 +262,6 @@ public class ExpandableDictionary extends Dictionary {
}
final ArrayList<SuggestedWordInfo> suggestions =
getWordsInner(codes, prevWordForBigrams, proximityInfo);
Utils.addAllSuggestions(mDicTypeId, Dictionary.UNIGRAM, suggestions, callback);
return suggestions;
}
@ -618,7 +617,6 @@ public class ExpandableDictionary extends Dictionary {
if (!reloadDictionaryIfRequired()) {
final ArrayList<SuggestedWordInfo> suggestions = new ArrayList<SuggestedWordInfo>();
runBigramReverseLookUp(previousWord, suggestions);
Utils.addAllSuggestions(mDicTypeId, Dictionary.BIGRAM, suggestions, callback);
return suggestions;
}
return null;

View file

@ -531,14 +531,4 @@ public class Utils {
}
return builder.toString();
}
public static void addAllSuggestions(final int dicTypeId, final int dataType,
final ArrayList<SuggestedWords.SuggestedWordInfo> suggestions,
final Dictionary.WordCallback callback) {
for (SuggestedWordInfo suggestion : suggestions) {
final String suggestionStr = suggestion.mWord.toString();
callback.addWord(suggestionStr.toCharArray(), null, 0, suggestionStr.length(),
suggestion.mScore, dicTypeId, dataType);
}
}
}

View file

@ -792,7 +792,7 @@ public class AndroidSpellCheckerService extends SpellCheckerService
composer, prevWord, suggestionsGatherer, dictInfo.mProximityInfo);
for (final SuggestedWordInfo suggestion : suggestions) {
final String suggestionStr = suggestion.mWord.toString();
suggestionsGatherer.oldAddWord(suggestionStr.toCharArray(), 0,
suggestionsGatherer.oldAddWord(suggestionStr.toCharArray(), null, 0,
suggestionStr.length(), suggestion.mScore, 0 /* ignored */,
Dictionary.UNIGRAM);
}