diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 211b69a..98bdef6 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -980,8 +980,9 @@
                     .setHasMinimalSuggestion(false);
             // When in fullscreen mode, show completions generated by the application
             final SuggestedWords words = builder.build();
-            setSuggestions(words);
-            setAutoCorrectionIndicator(Utils.willAutoCorrect(words));
+            final boolean isAutoCorrection = Utils.willAutoCorrect(words);
+            setSuggestions(words, isAutoCorrection);
+            setAutoCorrectionIndicator(isAutoCorrection);
             // TODO: is this the right thing to do? What should we auto-correct to in
             // this case? This says to keep whatever the user typed.
             mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
@@ -1714,15 +1715,14 @@
     }
 
     public void clearSuggestions() {
-        setSuggestions(SuggestedWords.EMPTY);
+        setSuggestions(SuggestedWords.EMPTY, false);
         setAutoCorrectionIndicator(false);
     }
 
-    public void setSuggestions(final SuggestedWords words) {
+    public void setSuggestions(final SuggestedWords words, final boolean isAutoCorrection) {
         if (mSuggestionsView != null) {
             mSuggestionsView.setSuggestions(words);
-            mKeyboardSwitcher.onAutoCorrectionStateChanged(
-                    words.hasWordAboveAutoCorrectionScoreThreshold());
+            mKeyboardSwitcher.onAutoCorrectionStateChanged(isAutoCorrection);
         }
     }
 
@@ -1851,8 +1851,9 @@
             autoCorrection = null;
         }
         mWordComposer.setAutoCorrection(autoCorrection);
-        setSuggestions(suggestedWords);
-        setAutoCorrectionIndicator(Utils.willAutoCorrect(suggestedWords));
+        final boolean isAutoCorrection = Utils.willAutoCorrect(suggestedWords);
+        setSuggestions(suggestedWords, isAutoCorrection);
+        setAutoCorrectionIndicator(isAutoCorrection);
         setSuggestionStripShown(isSuggestionsStripVisible());
     }
 
@@ -2025,7 +2026,7 @@
     }
 
     public void setPunctuationSuggestions() {
-        setSuggestions(mSettingsValues.mSuggestPuncList);
+        setSuggestions(mSettingsValues.mSuggestPuncList, false);
         setAutoCorrectionIndicator(false);
         setSuggestionStripShown(isSuggestionsStripVisible());
     }
