Skip to content
Snippets Groups Projects
Commit 31b346aa authored by Jean Chalard's avatar Jean Chalard
Browse files

Remove a useless test (A18)

allowsToBeAutoCorrected always returns false if the word is empty.
This is because the whitelist never contains an empty string,
and isValidWord returns false if the word is empty.

Change-Id: I34ecc2a1563aea6db5b2f12796f251f6598576a2
parent b01cdb97
No related branches found
No related tags found
No related merge requests found
...@@ -233,8 +233,8 @@ public class Suggest { ...@@ -233,8 +233,8 @@ public class Suggest {
final CharSequence autoCorrection; final CharSequence autoCorrection;
if (null != whitelistedWord) { if (null != whitelistedWord) {
autoCorrection = whitelistedWord; autoCorrection = whitelistedWord;
} else if (!TextUtils.isEmpty(consideredWord) && } else if (!AutoCorrection.allowsToBeAutoCorrected(
!AutoCorrection.allowsToBeAutoCorrected(mDictionaries, consideredWord, false)) { mDictionaries, consideredWord, false)) {
autoCorrection = consideredWord; autoCorrection = consideredWord;
} else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion, } else if (AutoCorrection.hasAutoCorrectionForBinaryDictionary(bestSuggestion,
consideredWord, mAutoCorrectionThreshold)) { consideredWord, mAutoCorrectionThreshold)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment