Merge "Make AutoCorrection a step closer to being static (A3)"
This commit is contained in:
commit
cbbfa15765
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