Merge "Remove a useless test (B7)"

main
Jean Chalard 2012-03-08 22:26:20 -08:00 committed by Android (Google) Code Review
commit d48b76267a
1 changed files with 1 additions and 2 deletions

View File

@ -98,8 +98,7 @@ public class AutoCorrection {
private static boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer, private static boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer,
ArrayList<CharSequence> suggestions, int[] sortedScores, ArrayList<CharSequence> suggestions, int[] sortedScores,
CharSequence consideredWord, double autoCorrectionThreshold) { CharSequence consideredWord, double autoCorrectionThreshold) {
if (wordComposer.size() > 1 if (wordComposer.size() > 1 && suggestions.size() > 0 && sortedScores.length > 0) {
&& consideredWord != null && suggestions.size() > 0 && sortedScores.length > 0) {
final CharSequence autoCorrectionSuggestion = suggestions.get(0); final CharSequence autoCorrectionSuggestion = suggestions.get(0);
final int autoCorrectionSuggestionScore = sortedScores[0]; final int autoCorrectionSuggestionScore = sortedScores[0];
// TODO: when the normalized score of the first suggestion is nearly equals to // TODO: when the normalized score of the first suggestion is nearly equals to