diff options
author | 2012-06-28 17:39:21 +0900 | |
---|---|---|
committer | 2012-06-29 15:45:27 +0900 | |
commit | b3cfde2cbb96951b1202c70b9961f340bdf495d0 (patch) | |
tree | 263f07b598750403393c36dfb12123ea25a99a78 /java/src | |
parent | e398c6c024ecf507232948a2b3e862b4a27a1a84 (diff) | |
download | latinime-b3cfde2cbb96951b1202c70b9961f340bdf495d0.tar.gz latinime-b3cfde2cbb96951b1202c70b9961f340bdf495d0.tar.xz latinime-b3cfde2cbb96951b1202c70b9961f340bdf495d0.zip |
Add a few comments for future reference (A24)
Change-Id: Ia356130b8a95ec9cf676bc6be05d801c13f14b64
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 4ca17b5b4..b6fbf8bed 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -302,12 +302,18 @@ public class Suggest { // Don't auto-correct words with multiple capital letter autoCorrectionAvailable &= !wordComposer.isMostlyCaps(); 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 && Suggest.shouldBlockAutoCorrectionBySafetyNet(typedWord, suggestionsList.get(1).mWord)) { autoCorrectionAvailable = false; } 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 && autoCorrectionAvailable /* hasAutoCorrectionCandidate */, !isPrediction && allowsToBeAutoCorrected /* allowsToBeAutoCorrected */, |