Make AutoCorrection a step closer to being static (A3)

Change-Id: Ide3d9785661a672af9bc8dc0cf91cab816dd6caa
This commit is contained in:
Jean Chalard 2012-03-08 20:39:56 +09:00
parent 719f92fc77
commit 9254dbcd7e

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