Merge "Make AutoCorrection a step closer to being static (A3)"

This commit is contained in:
Jean Chalard 2012-03-08 18:30:19 -08:00 committed by Android (Google) Code Review
commit cbbfa15765

View file

@ -26,21 +26,15 @@ public class AutoCorrection {
private static final boolean DBG = LatinImeLogger.sDBG;
private static final String TAG = AutoCorrection.class.getSimpleName();
private CharSequence mAutoCorrectionWord;
private double mNormalizedScore;
public void init() {
mAutoCorrectionWord = null;
mNormalizedScore = Integer.MIN_VALUE;
}
public boolean hasAutoCorrection() {
return null != mAutoCorrectionWord;
}
public double getNormalizedScore() {
return mNormalizedScore;
}
public CharSequence updateAutoCorrectionStatus(Map<String, Dictionary> dictionaries,
WordComposer wordComposer, ArrayList<CharSequence> suggestions, int[] sortedScores,
CharSequence typedWord, double autoCorrectionThreshold, int correctionMode,
@ -108,7 +102,7 @@ public class AutoCorrection {
|| correctionMode == Suggest.CORRECTION_FULL_BIGRAM);
}
private boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer,
private static boolean hasAutoCorrectionForBinaryDictionary(WordComposer wordComposer,
ArrayList<CharSequence> suggestions, int correctionMode, int[] sortedScores,
CharSequence typedWord, double autoCorrectionThreshold) {
if (wordComposer.size() > 1 && (correctionMode == Suggest.CORRECTION_FULL