Merge "Removing search field from postal picker" into honeycomb
diff --git a/src/com/android/contacts/activities/ContactSelectionActivity.java b/src/com/android/contacts/activities/ContactSelectionActivity.java
index de81dca..907edd3 100644
--- a/src/com/android/contacts/activities/ContactSelectionActivity.java
+++ b/src/com/android/contacts/activities/ContactSelectionActivity.java
@@ -108,17 +108,22 @@
         mSearchView.setQueryHint(getString(R.string.hint_findContacts));
         mSearchView.setOnQueryTextListener(this);
 
-        // This is a hack to prevent the search view from grabbing focus
-        // at this point.  If search view were visible, it would always grabs focus
-        // because it is the first focusable widget in the window.
-        mSearchView.setVisibility(View.INVISIBLE);
-        mSearchView.post(new Runnable() {
+        // TODO: re-enable search for postal addresses
+        if (mRequest.getActionCode() == ContactsRequest.ACTION_PICK_POSTAL) {
+            mSearchView.setVisibility(View.GONE);
+        } else {
+            // This is a hack to prevent the search view from grabbing focus
+            // at this point.  If search view were visible, it would always grabs focus
+            // because it is the first focusable widget in the window.
+            mSearchView.setVisibility(View.INVISIBLE);
+            mSearchView.post(new Runnable() {
 
-            @Override
-            public void run() {
-                mSearchView.setVisibility(View.VISIBLE);
-            }
-        });
+                @Override
+                public void run() {
+                    mSearchView.setVisibility(View.VISIBLE);
+                }
+            });
+        }
 
         Button cancel = (Button) findViewById(R.id.cancel);
         cancel.setOnClickListener(this);
diff --git a/src/com/android/contacts/list/PostalAddressPickerFragment.java b/src/com/android/contacts/list/PostalAddressPickerFragment.java
index 619fa79..f14b718 100644
--- a/src/com/android/contacts/list/PostalAddressPickerFragment.java
+++ b/src/com/android/contacts/list/PostalAddressPickerFragment.java
@@ -70,11 +70,7 @@
 
     @Override
     protected View inflateView(LayoutInflater inflater, ViewGroup container) {
-        if (isSearchMode()) {
-            return inflater.inflate(R.layout.contacts_search_content, null);
-        } else {
-            return inflater.inflate(R.layout.contacts_list_content, null);
-        }
+        return inflater.inflate(R.layout.contacts_list_content, null);
     }
 
     public void pickPostalAddress(Uri uri) {