Cleanup (A113)

If not composing a word, then consideredWord is always the empty
string.
Hence, it's never whitelisted, but it's also always "NotAWord",
so isWhitelistedOrNotAWord returns always true, so
allowsToBeAutoCorrected is always true. Which means that
isPrediction implies allowsToBeAutoCorrected == true.
Thus, !isPrediction && !allowsToBeAutoCorrected is strictly
equivalent to !allowsToBeAutocorrected.

Change-Id: I4ad7a7c3447851c539646d97cf55ff065e6ee115
This commit is contained in:
Jean Chalard 2012-07-11 17:21:37 +09:00
parent ae13061245
commit 02f1c1534c

View File

@ -277,7 +277,7 @@ public class Suggest {
// 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 */,
!allowsToBeAutoCorrected /* typedWordValid */,
!isPrediction && hasAutoCorrection, /* willAutoCorrect */
false /* isPunctuationSuggestions */,
false /* isObsoleteSuggestions */,