diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java
index 588f9d7..74bf98d 100644
--- a/java/com/android/dialer/app/DialtactsActivity.java
+++ b/java/com/android/dialer/app/DialtactsActivity.java
@@ -173,6 +173,7 @@
   private static final String KEY_FIRST_LAUNCH = "first_launch";
   private static final String KEY_WAS_CONFIGURATION_CHANGE = "was_configuration_change";
   private static final String KEY_IS_DIALPAD_SHOWN = "is_dialpad_shown";
+  private static final String KEY_FAB_VISIBLE = "fab_visible";
   private static final String TAG_NEW_SEARCH_FRAGMENT = "new_search";
   private static final String TAG_REGULAR_SEARCH_FRAGMENT = "search";
   private static final String TAG_SMARTDIAL_SEARCH_FRAGMENT = "smartdial";
@@ -435,6 +436,7 @@
       mFirstLaunch = savedInstanceState.getBoolean(KEY_FIRST_LAUNCH);
       mWasConfigurationChange = savedInstanceState.getBoolean(KEY_WAS_CONFIGURATION_CHANGE);
       mShowDialpadOnResume = savedInstanceState.getBoolean(KEY_IS_DIALPAD_SHOWN);
+      mFloatingActionButtonController.setVisible(savedInstanceState.getBoolean(KEY_FAB_VISIBLE));
       mActionBarController.restoreInstanceState(savedInstanceState);
     }
 
@@ -629,6 +631,7 @@
     outState.putBoolean(KEY_IN_NEW_SEARCH_UI, mInNewSearch);
     outState.putBoolean(KEY_FIRST_LAUNCH, mFirstLaunch);
     outState.putBoolean(KEY_IS_DIALPAD_SHOWN, mIsDialpadShown);
+    outState.putBoolean(KEY_FAB_VISIBLE, mFloatingActionButtonController.isVisible());
     outState.putBoolean(KEY_WAS_CONFIGURATION_CHANGE, isChangingConfigurations());
     mActionBarController.saveInstanceState(outState);
     mStateSaved = true;
@@ -1180,7 +1183,7 @@
     Fragment fragment = getFragmentManager().findFragmentByTag(tag);
     if (fragment == null) {
       if (useNewSearch) {
-        fragment = new NewSearchFragment();
+        fragment = NewSearchFragment.newInstance(!isDialpadShown());
       } else if (smartDialSearch) {
         fragment = new SmartDialSearchFragment();
       } else {
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
index 036d53f..3cf8fb5 100644
--- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
+++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java
@@ -73,6 +73,8 @@
   // updates so they are bundled together
   private static final int ENRICHED_CALLING_CAPABILITIES_UPDATED_DELAY = 400;
 
+  private static final String KEY_SHOW_ZERO_SUGGEST = "use_zero_suggest";
+
   @VisibleForTesting public static final int READ_CONTACTS_PERMISSION_REQUEST_CODE = 1;
 
   private static final int CONTACTS_LOADER_ID = 0;
@@ -99,6 +101,14 @@
 
   private Runnable updatePositionRunnable;
 
+  public static NewSearchFragment newInstance(boolean showZeroSuggest) {
+    NewSearchFragment fragment = new NewSearchFragment();
+    Bundle args = new Bundle();
+    args.putBoolean(KEY_SHOW_ZERO_SUGGEST, showZeroSuggest);
+    fragment.setArguments(args);
+    return fragment;
+  }
+
   @Nullable
   @Override
   public View onCreateView(
@@ -107,6 +117,7 @@
     adapter = new SearchAdapter(getActivity(), new SearchCursorManager());
     adapter.setCallInitiationType(callInitiationType);
     adapter.setSearchActions(getActions());
+    adapter.setZeroSuggestVisible(getArguments().getBoolean(KEY_SHOW_ZERO_SUGGEST));
     emptyContentView = view.findViewById(R.id.empty_view);
     recyclerView = view.findViewById(R.id.recycler_view);
     recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
@@ -212,6 +223,7 @@
       adapter.setQuery(query);
       adapter.setCallInitiationType(callInitiationType);
       adapter.setSearchActions(getActions());
+      adapter.setZeroSuggestVisible(isRegularSearch());
       loadNearbyPlacesCursor();
       loadRemoteContactsCursors();
     }
@@ -354,9 +366,7 @@
    * the list of supported actions, see {@link SearchActionViewHolder.Action}.
    */
   private List<Integer> getActions() {
-    if (TextUtils.isEmpty(query)
-        || query.length() == 1
-        || callInitiationType == CallInitiationType.Type.REGULAR_SEARCH) {
+    if (TextUtils.isEmpty(query) || query.length() == 1 || isRegularSearch()) {
       return Collections.emptyList();
     }
 
@@ -369,4 +379,8 @@
     }
     return actions;
   }
+
+  private boolean isRegularSearch() {
+    return callInitiationType == CallInitiationType.Type.REGULAR_SEARCH;
+  }
 }
diff --git a/java/com/android/dialer/searchfragment/list/SearchAdapter.java b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
index 3bfdd98..d4b5cf2 100644
--- a/java/com/android/dialer/searchfragment/list/SearchAdapter.java
+++ b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
@@ -21,6 +21,7 @@
 import android.support.annotation.VisibleForTesting;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView.ViewHolder;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.ViewGroup;
 import com.android.dialer.callcomposer.CallComposerActivity;
@@ -50,6 +51,7 @@
   private final SearchCursorManager searchCursorManager;
   private final Activity activity;
 
+  private boolean showZeroSuggest;
   private String query;
   private CallInitiationType.Type callInitiationType = CallInitiationType.Type.UNKNOWN_INITIATION;
 
@@ -124,9 +126,21 @@
 
   @Override
   public int getItemCount() {
+    if (TextUtils.isEmpty(query) && !showZeroSuggest) {
+      return 0;
+    }
     return searchCursorManager.getCount();
   }
 
+  /**
+   * @param visible If true and query is empty, the adapter won't show any list elements.
+   * @see #setQuery(String)
+   * @see #getItemCount()
+   */
+  public void setZeroSuggestVisible(boolean visible) {
+    showZeroSuggest = visible;
+  }
+
   public void setQuery(String query) {
     this.query = query;
     if (searchCursorManager.setQuery(query)) {
