diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 46d0255..709f133 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1003,7 +1003,7 @@
                 null /* rawSuggestions */, false /* typedWordValid */, false /* willAutoCorrect */,
                 false /* isObsoleteSuggestions */, false /* isPrediction */);
         // When in fullscreen mode, show completions generated by the application forcibly
-        setSuggestedWords(suggestedWords, true /* isSuggestionStripVisible */);
+        setSuggestedWords(suggestedWords);
     }
 
     private int getAdjustedBackingViewHeight() {
@@ -1306,30 +1306,6 @@
         // Nothing to do so far.
     }
 
-    private boolean isSuggestionStripVisible() {
-        if (!hasSuggestionStripView()) {
-            return false;
-        }
-        if (mSuggestionStripView.isShowingAddToDictionaryHint()) {
-            return true;
-        }
-        final SettingsValues currentSettings = mSettings.getCurrent();
-        if (null == currentSettings) {
-            return false;
-        }
-        if (ImportantNoticeUtils.shouldShowImportantNotice(this,
-                currentSettings.mInputAttributes)) {
-            return true;
-        }
-        if (!currentSettings.isCurrentOrientationAllowingSuggestionsPerUserSettings()) {
-            return false;
-        }
-        if (currentSettings.isApplicationSpecifiedCompletionsOn()) {
-            return true;
-        }
-        return currentSettings.isSuggestionsRequested();
-    }
-
     public boolean hasSuggestionStripView() {
         return null != mSuggestionStripView;
     }
@@ -1347,9 +1323,7 @@
         mSuggestionStripView.dismissAddToDictionaryHint();
     }
 
-    // TODO[IL]: Define a clear interface for this
-    public void setSuggestedWords(final SuggestedWords suggestedWords,
-            final boolean isSuggestionStripVisible) {
+    private void setSuggestedWords(final SuggestedWords suggestedWords) {
         mInputLogic.setSuggestedWords(suggestedWords);
         // TODO: Modify this when we support suggestions with hard keyboard
         if (!hasSuggestionStripView()) {
@@ -1359,27 +1333,34 @@
             return;
         }
 
-        mSuggestionStripView.updateVisibility(isSuggestionStripVisible, isFullscreenMode());
-        if (!isSuggestionStripVisible) {
+        final SettingsValues currentSettingsValues = mSettings.getCurrent();
+        final boolean shouldShowImportantNotice =
+                ImportantNoticeUtils.shouldShowImportantNotice(this);
+        final boolean shouldShowSuggestionsStripUnlessPassword = shouldShowImportantNotice
+                || currentSettingsValues.mShowsVoiceInputKey
+                || currentSettingsValues.isSuggestionsRequested()
+                || currentSettingsValues.isApplicationSpecifiedCompletionsOn();
+        final boolean shouldShowSuggestionsStrip = shouldShowSuggestionsStripUnlessPassword
+                && !currentSettingsValues.mInputAttributes.mIsPasswordField;
+        mSuggestionStripView.updateVisibility(shouldShowSuggestionsStrip, isFullscreenMode());
+        if (!shouldShowSuggestionsStrip) {
             return;
         }
 
-        final SettingsValues currentSettings = mSettings.getCurrent();
-        final boolean showSuggestions;
-        // May show the important notice when there are no suggestions to show,
-        if (SuggestedWords.EMPTY == suggestedWords
-                // or the suggestion strip is expected to show punctuation suggestions,
+        final boolean isEmptyApplicationSpecifiedCompletions =
+                currentSettingsValues.isApplicationSpecifiedCompletionsOn()
+                && suggestedWords.isEmpty();
+        final boolean noSuggestionsToShow = (SuggestedWords.EMPTY == suggestedWords)
                 || suggestedWords.isPunctuationSuggestions()
-                // or it's not requested to show suggestions by the input field,
-                || !currentSettings.isSuggestionsRequested()
-                // or the "show correction suggestions" settings is off by users preference.
-                || !currentSettings.isCurrentOrientationAllowingSuggestionsPerUserSettings()) {
-            showSuggestions = !mSuggestionStripView.maybeShowImportantNoticeTitle(
-                    currentSettings.mInputAttributes);
+                || isEmptyApplicationSpecifiedCompletions;
+        final boolean isShowingImportantNotice;
+        if (shouldShowImportantNotice && noSuggestionsToShow) {
+            isShowingImportantNotice = mSuggestionStripView.maybeShowImportantNoticeTitle();
         } else {
-            showSuggestions = true;
+            isShowingImportantNotice = false;
         }
-        if (showSuggestions) {
+
+        if (currentSettingsValues.isSuggestionsRequested() && !isShowingImportantNotice) {
             mSuggestionStripView.setSuggestions(suggestedWords,
                     SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
         }
@@ -1442,7 +1423,7 @@
             setNeutralSuggestionStrip();
         } else {
             mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
-            setSuggestedWords(suggestedWords, isSuggestionStripVisible());
+            setSuggestedWords(suggestedWords);
         }
         // Cache the auto-correction in accessibility code so we can speak it if the user
         // touches a key that will insert it.
@@ -1475,7 +1456,7 @@
         final SettingsValues currentSettings = mSettings.getCurrent();
         final SuggestedWords neutralSuggestions = currentSettings.mBigramPredictionEnabled
                 ? SuggestedWords.EMPTY : currentSettings.mSpacingAndPunctuations.mSuggestPuncList;
-        setSuggestedWords(neutralSuggestions, isSuggestionStripVisible());
+        setSuggestedWords(neutralSuggestions);
     }
 
     // TODO: Make this private
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
index 99d1aa7..9724149 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java
@@ -42,7 +42,6 @@
 import com.android.inputmethod.keyboard.MoreKeysPanel;
 import com.android.inputmethod.latin.AudioAndHapticFeedbackManager;
 import com.android.inputmethod.latin.Constants;
-import com.android.inputmethod.latin.InputAttributes;
 import com.android.inputmethod.latin.LatinImeLogger;
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.SuggestedWords;
@@ -207,9 +206,7 @@
         final int visibility = shouldBeVisible ? VISIBLE : (isFullscreenMode ? GONE : INVISIBLE);
         setVisibility(visibility);
         final SettingsValues currentSettingsValues = Settings.getInstance().getCurrent();
-        final boolean shouldShowVoiceKey = (currentSettingsValues != null)
-                && currentSettingsValues.mShowsVoiceInputKey;
-        mVoiceKey.setVisibility(shouldShowVoiceKey ? VISIBLE : INVISIBLE);
+        mVoiceKey.setVisibility(currentSettingsValues.mShowsVoiceInputKey ? VISIBLE : INVISIBLE);
     }
 
     public void setSuggestions(final SuggestedWords suggestedWords, final boolean isRtlLanguage) {
@@ -249,8 +246,8 @@
     // This method checks if we should show the important notice (checks on permanent storage if
     // it has been shown once already or not, and if in the setup wizard). If applicable, it shows
     // the notice. In all cases, it returns true if it was shown, false otherwise.
-    public boolean maybeShowImportantNoticeTitle(final InputAttributes inputAttributes) {
-        if (!ImportantNoticeUtils.shouldShowImportantNotice(getContext(), inputAttributes)) {
+    public boolean maybeShowImportantNoticeTitle() {
+        if (!ImportantNoticeUtils.shouldShowImportantNotice(getContext())) {
             return false;
         }
         if (getWidth() <= 0) {
@@ -475,7 +472,7 @@
         // Called by the framework when the size is known. Show the important notice if applicable.
         // This may be overriden by showing suggestions later, if applicable.
         if (oldw <= 0 && w > 0) {
-            maybeShowImportantNoticeTitle(Settings.getInstance().getCurrent().mInputAttributes);
+            maybeShowImportantNoticeTitle();
         }
     }
 }
diff --git a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
index 7d937a9..8b70778 100644
--- a/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/ImportantNoticeUtils.java
@@ -23,7 +23,6 @@
 import android.text.TextUtils;
 import android.util.Log;
 
-import com.android.inputmethod.latin.InputAttributes;
 import com.android.inputmethod.latin.R;
 
 public final class ImportantNoticeUtils {
@@ -78,14 +77,7 @@
         return getCurrentImportantNoticeVersion(context) > lastVersion;
     }
 
-    public static boolean shouldShowImportantNotice(final Context context,
-            final InputAttributes inputAttributes) {
-        if (inputAttributes == null || inputAttributes.mIsPasswordField) {
-            return false;
-        }
-        if (isInSystemSetupWizard(context)) {
-            return false;
-        }
+    public static boolean shouldShowImportantNotice(final Context context) {
         if (!hasNewImportantNotice(context)) {
             return false;
         }
@@ -93,6 +85,9 @@
         if (TextUtils.isEmpty(importantNoticeTitle)) {
             return false;
         }
+        if (isInSystemSetupWizard(context)) {
+            return false;
+        }
         return true;
     }
 
