From 02f1c1534c2060aaea7a9a020ce87f6c5ff5d8e0 Mon Sep 17 00:00:00 2001
From: Jean Chalard <jchalard@google.com>
Date: Wed, 11 Jul 2012 17:21:37 +0900
Subject: [PATCH] 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
---
 java/src/com/android/inputmethod/latin/Suggest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 1d1d07e17c..7ebbbabe87 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -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 */,
-- 
GitLab