OSDN Git Service

Automated import from //branches/cupcake/...@141830,141830
authorRomain Guy <>
Wed, 25 Mar 2009 01:28:43 +0000 (18:28 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Wed, 25 Mar 2009 01:28:43 +0000 (18:28 -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() {