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

Add a few comments for future reference (A24)

Change-Id: Ia356130b8a95ec9cf676bc6be05d801c13f14b64
parent e398c6c0
No related branches found
No related tags found
No related merge requests found
...@@ -302,12 +302,18 @@ public class Suggest { ...@@ -302,12 +302,18 @@ public class Suggest {
// Don't auto-correct words with multiple capital letter // Don't auto-correct words with multiple capital letter
autoCorrectionAvailable &= !wordComposer.isMostlyCaps(); autoCorrectionAvailable &= !wordComposer.isMostlyCaps();
autoCorrectionAvailable &= !wordComposer.isResumed(); autoCorrectionAvailable &= !wordComposer.isResumed();
// TODO: this safety net check should be done right after we decide that the suggestion
// exceeds the auto-correction threshold. However as long as the |= !allowsToBeAutoCorrected
// line is there it can't be done safely in a logical manner.
if (allowsToBeAutoCorrected && suggestionsList.size() > 1 && mAutoCorrectionThreshold > 0 if (allowsToBeAutoCorrected && suggestionsList.size() > 1 && mAutoCorrectionThreshold > 0
&& Suggest.shouldBlockAutoCorrectionBySafetyNet(typedWord, && Suggest.shouldBlockAutoCorrectionBySafetyNet(typedWord,
suggestionsList.get(1).mWord)) { suggestionsList.get(1).mWord)) {
autoCorrectionAvailable = false; autoCorrectionAvailable = false;
} }
return new SuggestedWords(suggestionsList, return new SuggestedWords(suggestionsList,
// TODO: this first argument is lying. If this is a whitelisted word which is an
// actual word, it says typedWordValid = false, which looks wrong. We should either
// rename the attribute or change the value.
!isPrediction && !allowsToBeAutoCorrected /* typedWordValid */, !isPrediction && !allowsToBeAutoCorrected /* typedWordValid */,
!isPrediction && autoCorrectionAvailable /* hasAutoCorrectionCandidate */, !isPrediction && autoCorrectionAvailable /* hasAutoCorrectionCandidate */,
!isPrediction && allowsToBeAutoCorrected /* allowsToBeAutoCorrected */, !isPrediction && allowsToBeAutoCorrected /* allowsToBeAutoCorrected */,
......
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