Consolidate a method inside another (A45)

It's simpler to check the safety net directly inside the
function that checks for auto-correction threshold.

This introduces one very slight change in behavior. The value
checked by the safety net is not any more the "typed word" but the
"considered word", the difference being any possibly appended
single quotes.
E.g. the user types "this'''" : the typed word is "this'''" but
the considered word is "this".
This change in behavior can be considered a bugfix.

Change-Id: Ia7ab4bc933183dfbd41bb00328e4c0b5ab76bc63
diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java
index 8fa3469..c78974d 100644
--- a/java/src/com/android/inputmethod/latin/AutoCorrection.java
+++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java
@@ -108,7 +108,8 @@
                 if (DBG) {
                     Log.d(TAG, "Auto corrected by S-threshold.");
                 }
-                return true;
+                return !shouldBlockAutoCorrectionBySafetyNet(consideredWord.toString(),
+                        suggestion.mWord);
             }
         }
         return false;
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index ccbb84f..dcfda86 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -241,8 +241,7 @@
             hasAutoCorrection = false;
         } else if (AutoCorrection.suggestionExceedsAutoCorrectionThreshold(suggestionsSet.first(),
                 consideredWord, mAutoCorrectionThreshold)) {
-            hasAutoCorrection = !AutoCorrection.shouldBlockAutoCorrectionBySafetyNet(typedWord,
-                    suggestionsSet.first().mWord);
+            hasAutoCorrection = true;
         } else {
             hasAutoCorrection = false;
         }