Make AutoCorrection a step closer to being static (A3)
Change-Id: Ide3d9785661a672af9bc8dc0cf91cab816dd6caa
This commit is contained in:
parent
719f92fc77
commit
9254dbcd7e
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue