OSDN Git Service

Automated import from //branches/donutburger/...@141832,141832
authorRomain Guy <>
Wed, 25 Mar 2009 03:59:15 +0000 (20:59 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Wed, 25 Mar 2009 03:59:15 +0000 (20:59 -0700)
src/com/android/contacts/ContactsListActivity.java

index a13b9d8..0aff2b1 100644 (file)
@@ -656,7 +656,14 @@ public final class ContactsListActivity extends ListActivity
         super.onRestart();
 
         // The cursor was killed off in onStop(), so we need to get a new one here
-        startQuery();
+        // We do not perform the query if a filter is set on the list because the
+        // filter will cause the query to happen anyway
+        if (TextUtils.isEmpty(getListView().getTextFilter())) {
+            startQuery();
+        } else {
+            // Run the filtered query on the adapter
+            ((ContactItemListAdapter) getListView().getAdapter()).onContentChanged();
+        }
     }
     
     private void updateGroup() {