diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index b0d77de..378342d 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -16,15 +16,17 @@
 
 package com.android.contacts;
 
+import com.android.contacts.list.ContactBrowseListContextMenuAdapter;
+import com.android.contacts.list.ContactBrowseListFragment;
 import com.android.contacts.list.ContactEntryListAdapter;
 import com.android.contacts.list.ContactEntryListFragment;
 import com.android.contacts.list.ContactItemListAdapter;
+import com.android.contacts.list.ContactPickerFragment;
 import com.android.contacts.list.ContactsIntentResolver;
 import com.android.contacts.list.DefaultContactListFragment;
-import com.android.contacts.list.LightContactBrowserContextMenuAdapter;
-import com.android.contacts.list.LightContactBrowser;
 import com.android.contacts.list.MultiplePhonePickerFragment;
 import com.android.contacts.list.OnContactBrowserActionListener;
+import com.android.contacts.list.OnContactPickerActionListener;
 import com.android.contacts.model.ContactsSource;
 import com.android.contacts.model.Sources;
 import com.android.contacts.ui.ContactsPreferences;
@@ -536,8 +538,10 @@
         switch (mMode) {
             case MODE_DEFAULT:
             case MODE_INSERT_OR_EDIT_CONTACT:
-            case MODE_QUERY_PICK_TO_EDIT: {
-                LightContactBrowser fragment = new LightContactBrowser();
+            case MODE_QUERY_PICK_TO_EDIT:
+            case MODE_STREQUENT:
+            case MODE_FREQUENT: {
+                ContactBrowseListFragment fragment = new ContactBrowseListFragment();
                 if (!mSearchMode) {
                     fragment.setSectionHeaderDisplayEnabled(true);
                 }
@@ -551,7 +555,7 @@
                     fragment.setCreateContactEnabled(true);
                 }
 
-                fragment.setOnContactBrowserActionListener(new OnContactBrowserActionListener() {
+                fragment.setOnContactListActionListener(new OnContactBrowserActionListener() {
                     public void onSearchAllContactsAction(String string) {
                         doSearch();
                     }
@@ -602,17 +606,54 @@
                         doContactDelete(contactUri);
                     }
                 });
-                mContextMenuAdapter = new LightContactBrowserContextMenuAdapter(fragment);
+                mContextMenuAdapter = new ContactBrowseListContextMenuAdapter(fragment);
                 mListFragment = fragment;
                 break;
             }
-            case MODE_LEGACY_PICK_POSTAL:
-            case MODE_PICK_POSTAL:
+            case MODE_PICK_CONTACT:
+            case MODE_PICK_OR_CREATE_CONTACT: {
+                ContactPickerFragment fragment = new ContactPickerFragment();
+                if (!mSearchMode) {
+                    fragment.setSectionHeaderDisplayEnabled(true);
+                }
+
+                if (mMode == MODE_INSERT_OR_EDIT_CONTACT) {
+                    fragment.setCreateContactEnabled(true);
+                }
+
+                fragment.setOnContactPickerActionListener(new OnContactPickerActionListener() {
+                    public void onSearchAllContactsAction(String string) {
+                        doSearch();
+                    }
+
+                    public void onCreateNewContactAction() {
+                        Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+                        startActivityAndForwardResult(intent);
+                    }
+
+                    public void onPickContactAction(Uri contactUri) {
+                        setResult(RESULT_OK, intent.setData(contactUri));
+                        finish();
+                    }
+                });
+
+                mListFragment = fragment;
+                break;
+            }
             case MODE_LEGACY_PICK_PHONE:
-            case MODE_PICK_PHONE:
-            case MODE_STREQUENT:
-            case MODE_FREQUENT: {
+            case MODE_PICK_PHONE: {
                 mListFragment = new DefaultContactListFragment();
+                if (mMode == MODE_LEGACY_PICK_PHONE) {
+                    mListFragment.setLegacyCompatibility(true);
+                }
+                break;
+            }
+            case MODE_LEGACY_PICK_POSTAL:
+            case MODE_PICK_POSTAL: {
+                mListFragment = new DefaultContactListFragment();
+                if (mMode == MODE_LEGACY_PICK_POSTAL) {
+                    mListFragment.setLegacyCompatibility(true);
+                }
                 break;
             }
             case MODE_PICK_MULTIPLE_PHONES: {
diff --git a/src/com/android/contacts/list/LightContactBrowserContextMenuAdapter.java b/src/com/android/contacts/list/ContactBrowseListContextMenuAdapter.java
similarity index 79%
rename from src/com/android/contacts/list/LightContactBrowserContextMenuAdapter.java
rename to src/com/android/contacts/list/ContactBrowseListContextMenuAdapter.java
index 7e7a336..6ff3110 100644
--- a/src/com/android/contacts/list/LightContactBrowserContextMenuAdapter.java
+++ b/src/com/android/contacts/list/ContactBrowseListContextMenuAdapter.java
@@ -27,9 +27,9 @@
 import android.widget.AdapterView;
 
 /**
- * A contextual menu adapter for the light version of the contact browser.
+ * A contextual menu adapter for the basic contact list.
  */
-public class LightContactBrowserContextMenuAdapter implements ContextMenuAdapter {
+public class ContactBrowseListContextMenuAdapter implements ContextMenuAdapter {
 
     private static final int MENU_ITEM_VIEW_CONTACT = 1;
     private static final int MENU_ITEM_CALL = 2;
@@ -40,10 +40,10 @@
 
     private static final String TAG = "LightContactBrowserContextMenuAdapter";
 
-    private final LightContactBrowser mBrowser;
+    private final ContactBrowseListFragment mContactListFragment;
 
-    public LightContactBrowserContextMenuAdapter(LightContactBrowser browser) {
-        this.mBrowser = browser;
+    public ContactBrowseListContextMenuAdapter(ContactBrowseListFragment fragment) {
+        this.mContactListFragment = fragment;
     }
 
     public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
@@ -55,7 +55,7 @@
             return;
         }
 
-        ContactEntryListAdapter adapter = mBrowser.getAdapter();
+        ContactEntryListAdapter adapter = mContactListFragment.getAdapter();
         adapter.moveToPosition(info.position);
 
         // Setup the menu header
@@ -92,42 +92,42 @@
             return false;
         }
 
-        ContactEntryListAdapter adapter = mBrowser.getAdapter();
+        ContactEntryListAdapter adapter = mContactListFragment.getAdapter();
         adapter.moveToPosition(info.position);
         final Uri contactUri = adapter.getContactUri();
 
         switch (item.getItemId()) {
             case MENU_ITEM_VIEW_CONTACT: {
-                mBrowser.viewContact(contactUri);
+                mContactListFragment.viewContact(contactUri);
                 return true;
             }
 
             case MENU_ITEM_TOGGLE_STAR: {
                 if (adapter.isContactStarred()) {
-                    mBrowser.removeFromFavorites(contactUri);
+                    mContactListFragment.removeFromFavorites(contactUri);
                 } else {
-                    mBrowser.addToFavorites(contactUri);
+                    mContactListFragment.addToFavorites(contactUri);
                 }
                 return true;
             }
 
             case MENU_ITEM_CALL: {
-                mBrowser.callContact(contactUri);
+                mContactListFragment.callContact(contactUri);
                 return true;
             }
 
             case MENU_ITEM_SEND_SMS: {
-                mBrowser.smsContact(contactUri);
+                mContactListFragment.smsContact(contactUri);
                 return true;
             }
 
             case MENU_ITEM_EDIT: {
-                mBrowser.editContact(contactUri);
+                mContactListFragment.editContact(contactUri);
                 return true;
             }
 
             case MENU_ITEM_DELETE: {
-                mBrowser.deleteContact(contactUri);
+                mContactListFragment.deleteContact(contactUri);
                 return true;
             }
         }
diff --git a/src/com/android/contacts/list/LightContactBrowser.java b/src/com/android/contacts/list/ContactBrowseListFragment.java
similarity index 92%
rename from src/com/android/contacts/list/LightContactBrowser.java
rename to src/com/android/contacts/list/ContactBrowseListFragment.java
index 2c17d32..5203df5 100644
--- a/src/com/android/contacts/list/LightContactBrowser.java
+++ b/src/com/android/contacts/list/ContactBrowseListFragment.java
@@ -25,15 +25,16 @@
 import android.view.ViewGroup;
 
 /**
- * Fragment for the light-weight contact list.
+ * Fragment containing a contact list used for browsing (as compared to
+ * picking a contact with one of the PICK intents).
  */
-public class LightContactBrowser extends ContactEntryListFragment {
+public class ContactBrowseListFragment extends ContactEntryListFragment {
 
     private OnContactBrowserActionListener mListener;
     private boolean mEditMode;
     private boolean mCreateContactEnabled;
 
-    public void setOnContactBrowserActionListener(OnContactBrowserActionListener listener) {
+    public void setOnContactListActionListener(OnContactBrowserActionListener listener) {
         mListener = listener;
     }
 
@@ -46,7 +47,6 @@
         if (isSearchAllContactsItemPosition(position)) {
             mListener.onSearchAllContactsAction((String)null);
         } else if (isEditMode()) {
-            Intent intent;
             if (position == 0 && !isSearchMode() && isCreateContactEnabled()) {
                 mListener.onCreateNewContactAction();
             } else {
diff --git a/src/com/android/contacts/list/ContactEntryListFragment.java b/src/com/android/contacts/list/ContactEntryListFragment.java
index fd38599..6e28322 100644
--- a/src/com/android/contacts/list/ContactEntryListFragment.java
+++ b/src/com/android/contacts/list/ContactEntryListFragment.java
@@ -29,7 +29,6 @@
 import android.view.ViewGroup;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AdapterView;
-import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
 
diff --git a/src/com/android/contacts/list/LightContactBrowser.java b/src/com/android/contacts/list/ContactPickerFragment.java
similarity index 64%
copy from src/com/android/contacts/list/LightContactBrowser.java
copy to src/com/android/contacts/list/ContactPickerFragment.java
index 2c17d32..b1768a2 100644
--- a/src/com/android/contacts/list/LightContactBrowser.java
+++ b/src/com/android/contacts/list/ContactPickerFragment.java
@@ -25,15 +25,15 @@
 import android.view.ViewGroup;
 
 /**
- * Fragment for the light-weight contact list.
+ * Fragment for the contact list used for browsing contacts (as compared to
+ * picking a contact with one of the PICK or SHORTCUT intents).
  */
-public class LightContactBrowser extends ContactEntryListFragment {
+public class ContactPickerFragment extends ContactEntryListFragment {
 
-    private OnContactBrowserActionListener mListener;
-    private boolean mEditMode;
+    private OnContactPickerActionListener mListener;
     private boolean mCreateContactEnabled;
 
-    public void setOnContactBrowserActionListener(OnContactBrowserActionListener listener) {
+    public void setOnContactPickerActionListener(OnContactPickerActionListener listener) {
         mListener = listener;
     }
 
@@ -45,19 +45,15 @@
     protected void onItemClick(int position, long id) {
         if (isSearchAllContactsItemPosition(position)) {
             mListener.onSearchAllContactsAction((String)null);
-        } else if (isEditMode()) {
+        } else {
             Intent intent;
             if (position == 0 && !isSearchMode() && isCreateContactEnabled()) {
                 mListener.onCreateNewContactAction();
             } else {
                 ContactEntryListAdapter adapter = getAdapter();
                 adapter.moveToPosition(position);
-                mListener.onEditContactAction(adapter.getContactUri());
+                mListener.onPickContactAction(adapter.getContactUri());
             }
-        } else {
-            ContactEntryListAdapter adapter = getAdapter();
-            adapter.moveToPosition(position);
-            mListener.onViewContactAction(adapter.getContactUri());
         }
     }
 
@@ -81,14 +77,6 @@
         }
     }
 
-    public void setEditMode(boolean flag) {
-        mEditMode = flag;
-    }
-
-    public boolean isEditMode() {
-        return mEditMode;
-    }
-
     public void setCreateContactEnabled(boolean flag) {
         this.mCreateContactEnabled = flag;
     }
@@ -96,32 +84,4 @@
     public boolean isCreateContactEnabled() {
         return mCreateContactEnabled;
     }
-
-    public void viewContact(Uri contactUri) {
-        mListener.onViewContactAction(contactUri);
-    }
-
-    public void editContact(Uri contactUri) {
-        mListener.onEditContactAction(contactUri);
-    }
-
-    public void deleteContact(Uri contactUri) {
-        mListener.onDeleteContactAction(contactUri);
-    }
-
-    public void addToFavorites(Uri contactUri) {
-        mListener.onAddToFavoritesAction(contactUri);
-    }
-
-    public void removeFromFavorites(Uri contactUri) {
-        mListener.onRemoveFromFavoritesAction(contactUri);
-    }
-
-    public void callContact(Uri contactUri) {
-        mListener.onCallContactAction(contactUri);
-    }
-
-    public void smsContact(Uri contactUri) {
-        mListener.onSmsContactAction(contactUri);
-    }
 }
diff --git a/src/com/android/contacts/list/OnContactBrowserActionListener.java b/src/com/android/contacts/list/OnContactBrowserActionListener.java
index c6fe102..b038108 100644
--- a/src/com/android/contacts/list/OnContactBrowserActionListener.java
+++ b/src/com/android/contacts/list/OnContactBrowserActionListener.java
@@ -18,7 +18,7 @@
 import android.net.Uri;
 
 /**
- * Action callbacks that can be sent by a contact browser.
+ * Action callbacks that can be sent by a contact list.
  */
 public interface OnContactBrowserActionListener  {
 
diff --git a/src/com/android/contacts/list/OnContactPickerActionListener.java b/src/com/android/contacts/list/OnContactPickerActionListener.java
new file mode 100644
index 0000000..38adf92
--- /dev/null
+++ b/src/com/android/contacts/list/OnContactPickerActionListener.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.contacts.list;
+
+import android.net.Uri;
+
+/**
+ * Action callbacks that can be sent by a contact picker.
+ */
+public interface OnContactPickerActionListener  {
+
+    /**
+     * Searches all contacts for the specified string an show results for browsing.
+     */
+    void onSearchAllContactsAction(String string);
+
+    /**
+     * Creates a new contact and then returns it to the caller.
+     */
+    void onCreateNewContactAction();
+
+    /**
+     * Returns the selected contact to the requester.
+     */
+    void onPickContactAction(Uri contactUri);
+}
