diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
index 5a32d74..0c0841c 100644
--- a/src/com/android/contacts/activities/ActionBarAdapter.java
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -211,6 +211,10 @@
         return mSearchMode;
     }
 
+    public boolean shouldShowSearchResult() {
+        return mSearchMode && !TextUtils.isEmpty(mQueryString);
+    }
+
     public void setSearchMode(boolean flag) {
         if (mSearchMode != flag) {
             mSearchMode = flag;
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index fc9879a..cab8afd 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -867,11 +867,11 @@
     }
 
     private void configureContactListFragment() {
-        final boolean searchMode = mActionBarAdapter.isSearchMode();
-        mAllFragment.setSearchMode(searchMode);
+        final boolean showSearchResult = mActionBarAdapter.shouldShowSearchResult();
+        mAllFragment.setSearchMode(showSearchResult);
 
         final boolean useTwoPane = PhoneCapabilityTester.isUsingTwoPanes(this);
-        mAllFragment.setVisibleScrollbarEnabled(!searchMode);
+        mAllFragment.setVisibleScrollbarEnabled(!showSearchResult);
         mAllFragment.setVerticalScrollbarPosition(
                 useTwoPane
                         ? View.SCROLLBAR_POSITION_LEFT
diff --git a/src/com/android/contacts/list/ContactEntryListAdapter.java b/src/com/android/contacts/list/ContactEntryListAdapter.java
index 4ac54dc..8bc6559 100644
--- a/src/com/android/contacts/list/ContactEntryListAdapter.java
+++ b/src/com/android/contacts/list/ContactEntryListAdapter.java
@@ -455,10 +455,6 @@
         if (!mEmptyListEnabled) {
             return false;
         } else if (isSearchMode()) {
-            // TODO Do we really need this?  DefaultContactListAdapter overrides it and always
-            // return false, as it returns all contacts if in the search mode and the query is
-            // empty.  If there's no places relying on this behavior, we can just return false
-            // here.
             return TextUtils.isEmpty(getQueryString());
         } else if (mLoading) {
             // We don't want the empty state to show when loading.
diff --git a/src/com/android/contacts/list/DefaultContactListAdapter.java b/src/com/android/contacts/list/DefaultContactListAdapter.java
index f081921..89de966 100644
--- a/src/com/android/contacts/list/DefaultContactListAdapter.java
+++ b/src/com/android/contacts/list/DefaultContactListAdapter.java
@@ -66,15 +66,11 @@
             }
             query = query.trim();
             if (TextUtils.isEmpty(query)) {
-                // Special case: if the query string is empty, show all contacts, regardless of the
-                // current filter.
-                // (We can't use the FILTER_URI for this, as the contacts provider would return
-                // an empty cursor if the query is empty.)
-                final ContactListFilter allFilter = ContactListFilter.createFilterWithType(
-                        ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS);
-                configureUri(loader, directoryId, allFilter);
-                configureProjection(loader, directoryId, allFilter);
-                configureSelection(loader, directoryId, allFilter);
+                // Regardless of the directory, we don't want anything returned,
+                // so let's just send a "nothing" query to the local directory.
+                loader.setUri(Contacts.CONTENT_URI);
+                loader.setProjection(PROJECTION_CONTACT);
+                loader.setSelection("0");
             } else {
                 Builder builder = Contacts.CONTENT_FILTER_URI.buildUpon();
                 builder.appendPath(query);      // Builder will encode the query
@@ -256,16 +252,4 @@
         return prefs.getBoolean(ContactsPreferences.PREF_DISPLAY_ONLY_PHONES,
                 ContactsPreferences.PREF_DISPLAY_ONLY_PHONES_DEFAULT);
     }
-
-    @Override
-    public boolean isEmpty() {
-        // ContactEntryListAdapter.isEmpty() returns false when in the search mode && the query is
-        // empty.  Here, we want to return all contacts in this case, override it and make it
-        // always return false.  See the TODO there -- we may not need this method entirely.
-        if (isSearchMode()) {
-            return false;
-        } else {
-            return super.isEmpty();
-        }
-    }
 }
