diff --git a/res/layout/user_profile_header.xml b/res/layout/user_profile_header.xml
deleted file mode 100644
index 828f08c..0000000
--- a/res/layout/user_profile_header.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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.
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/user_profile_header"
-    android:orientation="horizontal"
-    android:layout_width="match_parent"
-    android:layout_height="?attr/list_item_header_height"
-    android:paddingLeft="?attr/list_item_padding_left"
-    android:paddingRight="?attr/list_item_padding_right"
-    android:paddingStart="?attr/list_item_padding_left"
-    android:paddingEnd="?attr/list_item_padding_right"
-    android:paddingTop="4dp"
-    android:paddingBottom="8dp" >
-
-    <TextView android:id="@+id/profile_title"
-        android:layout_width="@dimen/contact_list_section_header_width"
-        android:layout_height="?android:attr/listPreferredItemHeight"
-        android:singleLine="true"
-        android:text="@string/user_profile_contacts_list_header"
-        android:ellipsize="end"
-        android:textAppearance="@style/SectionHeaderStyle"
-        android:gravity="start|center_vertical" />
-
-    <Button android:id="@+id/user_profile_button"
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="?android:attr/listPreferredItemHeight"
-        android:paddingStart="?attr/list_item_padding_left"
-        android:paddingEnd="?attr/list_item_padding_right"
-        android:background="?android:attr/selectableItemBackground"
-        android:singleLine="true"
-        android:text="@string/profile_display_name"
-        android:ellipsize="end"
-        android:gravity="start|center_vertical"
-        android:textAppearance="?android:attr/textAppearanceMedium" />
-
-</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 390dd69..5fcbd39 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -618,10 +618,6 @@
         <xliff:g id="call_type" example="Friends">%1$s</xliff:g>  <xliff:g id="call_short_date" example="Friends">%2$s</xliff:g>
     </string>
 
-    <!-- Text displayed in place of the display name for the contact that represents the user's
-      personal profile entry [CHAR LIMIT=64] -->
-    <string name="profile_display_name">Set up my profile</string>
-
     <!-- Label to instruct the user to type in a contact's name to add the contact as a member of the current group. [CHAR LIMIT=64] -->
     <string name="enter_contact_name">Type person\'s name</string>
 
diff --git a/src/com/android/contacts/activities/ContactSelectionActivity.java b/src/com/android/contacts/activities/ContactSelectionActivity.java
index c2951d8..50f50dd 100644
--- a/src/com/android/contacts/activities/ContactSelectionActivity.java
+++ b/src/com/android/contacts/activities/ContactSelectionActivity.java
@@ -290,7 +290,6 @@
             case ContactsRequest.ACTION_DEFAULT:
             case ContactsRequest.ACTION_PICK_CONTACT: {
                 ContactPickerFragment fragment = new ContactPickerFragment();
-                fragment.setIncludeProfile(mRequest.shouldIncludeProfile());
                 fragment.setIncludeFavorites(mRequest.shouldIncludeFavorites());
                 mListFragment = fragment;
                 break;
diff --git a/src/com/android/contacts/list/ContactBrowseListFragment.java b/src/com/android/contacts/list/ContactBrowseListFragment.java
index afd2543..4b4b326 100644
--- a/src/com/android/contacts/list/ContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/ContactBrowseListFragment.java
@@ -401,11 +401,8 @@
             }
         }
 
-        // Display the user's profile if not in search mode
-        adapter.setIncludeProfile(!searchMode);
-
-        // Display favorites if not in search mode
-        adapter.setIncludeFavorites(!searchMode);
+        adapter.setIncludeFavorites(!searchMode
+                && mFilter.filterType == ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS);
     }
 
     @Override
diff --git a/src/com/android/contacts/list/ContactsRequest.java b/src/com/android/contacts/list/ContactsRequest.java
index f867549..a1428be 100644
--- a/src/com/android/contacts/list/ContactsRequest.java
+++ b/src/com/android/contacts/list/ContactsRequest.java
@@ -85,7 +85,6 @@
     private CharSequence mTitle;
     private boolean mSearchMode;
     private String mQueryString;
-    private boolean mIncludeProfile;
     private boolean mIncludeFavorites;
     private boolean mLegacyCompatibilityMode;
     private boolean mDirectorySearchEnabled = true;
@@ -98,7 +97,6 @@
                 + " mTitle=" + mTitle
                 + " mSearchMode=" + mSearchMode
                 + " mQueryString=" + mQueryString
-                + " mIncludeProfile=" + mIncludeProfile
                 + " mIncludeFavorites=" + mIncludeFavorites
                 + " mLegacyCompatibilityMode=" + mLegacyCompatibilityMode
                 + " mDirectorySearchEnabled=" + mDirectorySearchEnabled
@@ -146,14 +144,6 @@
         mQueryString = string;
     }
 
-    public boolean shouldIncludeProfile() {
-        return mIncludeProfile;
-    }
-
-    public void setIncludeProfile(boolean includeProfile) {
-        mIncludeProfile = includeProfile;
-    }
-
     public boolean shouldIncludeFavorites() {
         return mIncludeFavorites;
     }
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index 2ce22c0..672e63e 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -17,29 +17,22 @@
 
 import android.content.Context;
 import android.content.CursorLoader;
-import android.content.Intent;
 import android.net.Uri;
 import android.provider.ContactsContract.Contacts;
 import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.view.accessibility.AccessibilityEvent;
-import android.widget.Button;
 import android.widget.FrameLayout;
 import android.widget.ListView;
 import android.widget.TextView;
 
 import com.android.contacts.R;
 import com.android.contacts.common.list.ContactListAdapter;
-import com.android.contacts.common.list.ContactListFilter;
 import com.android.contacts.common.list.ContactListItemView;
 import com.android.contacts.common.list.DefaultContactListAdapter;
-import com.android.contacts.common.list.ProfileAndContactsLoader;
-import com.android.contacts.common.util.ImplicitIntentsUtil;
-import com.android.contacts.editor.ContactEditorFragment;
-import com.android.contacts.common.util.AccountFilterUtil;
+import com.android.contacts.common.list.FavoritesAndContactsLoader;
 
 /**
  * Fragment containing a contact list used for browsing (as compared to
@@ -49,11 +42,6 @@
     private static final String TAG = DefaultContactBrowseListFragment.class.getSimpleName();
 
     private View mSearchHeaderView;
-    private View mAccountFilterHeader;
-    private FrameLayout mProfileHeaderContainer;
-    private View mProfileHeader;
-    private Button mProfileMessage;
-    private TextView mProfileTitle;
     private View mSearchProgress;
     private TextView mSearchProgressText;
 
@@ -68,7 +56,7 @@
 
     @Override
     public CursorLoader createCursorLoader(Context context) {
-        return new ProfileAndContactsLoader(context);
+        return new FavoritesAndContactsLoader(context);
     }
 
     @Override
@@ -99,11 +87,6 @@
     protected void onCreateView(LayoutInflater inflater, ViewGroup container) {
         super.onCreateView(inflater, container);
 
-        // Create an empty user profile header and hide it for now (it will be visible if the
-        // contacts list will have no user profile).
-        addEmptyUserProfileHeader(inflater);
-        showEmptyUserProfile(false);
-
         // Putting the header view inside a container will allow us to make
         // it invisible later. See checkHeaderViewVisibility()
         FrameLayout headerContainer = new FrameLayout(inflater.getContext());
@@ -138,70 +121,30 @@
     }
 
     @Override
-    protected void setProfileHeader() {
-        mUserProfileExists = getAdapter().hasProfile();
-        showEmptyUserProfile(!mUserProfileExists && !isSearchMode());
-
-        if (isSearchMode()) {
-            ContactListAdapter adapter = getAdapter();
-            if (adapter == null) {
-                return;
-            }
-
-            // In search mode we only display the header if there is nothing found
-            if (TextUtils.isEmpty(getQueryString()) || !adapter.areAllPartitionsEmpty()) {
-                mSearchHeaderView.setVisibility(View.GONE);
-                showSearchProgress(false);
-            } else {
-                mSearchHeaderView.setVisibility(View.VISIBLE);
-                if (adapter.isLoading()) {
-                    mSearchProgressText.setText(R.string.search_results_searching);
-                    showSearchProgress(true);
-                } else {
-                    mSearchProgressText.setText(R.string.listFoundAllContactsZero);
-                    mSearchProgressText.sendAccessibilityEvent(
-                            AccessibilityEvent.TYPE_VIEW_SELECTED);
-                    showSearchProgress(false);
-                }
-            }
-            showEmptyUserProfile(false);
+    protected void setListHeader() {
+        if (!isSearchMode()) {
+            return;
         }
-    }
+        ContactListAdapter adapter = getAdapter();
+        if (adapter == null) {
+            return;
+        }
 
-    private void showEmptyUserProfile(boolean show) {
-        // Changing visibility of just the mProfileHeader doesn't do anything unless
-        // you change visibility of its children, hence the call to mCounterHeaderView
-        // and mProfileTitle
-        mProfileHeaderContainer.setVisibility(show ? View.VISIBLE : View.GONE);
-        mProfileHeader.setVisibility(show ? View.VISIBLE : View.GONE);
-        mProfileTitle.setVisibility(show ? View.VISIBLE : View.GONE);
-        mProfileMessage.setVisibility(show ? View.VISIBLE : View.GONE);
-    }
-
-    /**
-     * This method creates a pseudo user profile contact. When the returned query doesn't have
-     * a profile, this methods creates 2 views that are inserted as headers to the listview:
-     * 1. A header view with the "ME" title and the contacts count.
-     * 2. A button that prompts the user to create a local profile
-     */
-    private void addEmptyUserProfileHeader(LayoutInflater inflater) {
-        ListView list = getListView();
-        // Add a header with the "ME" name. The view is embedded in a frame view since you cannot
-        // change the visibility of a view in a ListView without having a parent view.
-        mProfileHeader = inflater.inflate(R.layout.user_profile_header, null, false);
-        mProfileTitle = (TextView) mProfileHeader.findViewById(R.id.profile_title);
-        mProfileHeaderContainer = new FrameLayout(inflater.getContext());
-        mProfileHeaderContainer.addView(mProfileHeader);
-        list.addHeaderView(mProfileHeaderContainer, null, false);
-
-        // Add a button with a message inviting the user to create a local profile
-        mProfileMessage = (Button) mProfileHeader.findViewById(R.id.user_profile_button);
-        mProfileMessage.setOnClickListener(new View.OnClickListener() {
-            public void onClick(View v) {
-                Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
-                intent.putExtra(ContactEditorFragment.INTENT_EXTRA_NEW_LOCAL_PROFILE, true);
-                ImplicitIntentsUtil.startActivityInApp(getActivity(), intent);
+        // In search mode we only display the header if there is nothing found
+        if (TextUtils.isEmpty(getQueryString()) || !adapter.areAllPartitionsEmpty()) {
+            mSearchHeaderView.setVisibility(View.GONE);
+            showSearchProgress(false);
+        } else {
+            mSearchHeaderView.setVisibility(View.VISIBLE);
+            if (adapter.isLoading()) {
+                mSearchProgressText.setText(R.string.search_results_searching);
+                showSearchProgress(true);
+            } else {
+                mSearchProgressText.setText(R.string.listFoundAllContactsZero);
+                mSearchProgressText.sendAccessibilityEvent(
+                        AccessibilityEvent.TYPE_VIEW_SELECTED);
+                showSearchProgress(false);
             }
-        });
+        }
     }
 }
diff --git a/src/com/android/contacts/list/MultiSelectContactsListFragment.java b/src/com/android/contacts/list/MultiSelectContactsListFragment.java
index 76dd3f3..8dd18c1 100644
--- a/src/com/android/contacts/list/MultiSelectContactsListFragment.java
+++ b/src/com/android/contacts/list/MultiSelectContactsListFragment.java
@@ -144,8 +144,7 @@
         final int previouslySelectedCount = getAdapter().getSelectedContactIds().size();
         final Uri uri = getAdapter().getContactUri(position);
         final int partition = getAdapter().getPartitionForPosition(position);
-        if (uri != null && (partition == ContactsContract.Directory.DEFAULT
-                && (position > 0 || !getAdapter().hasProfile()))) {
+        if (uri != null && partition == ContactsContract.Directory.DEFAULT) {
             final String contactId = uri.getLastPathSegment();
             if (!TextUtils.isEmpty(contactId)) {
                 if (mCheckBoxListListener != null) {
diff --git a/src/com/android/contacts/list/MultiSelectEntryContactListAdapter.java b/src/com/android/contacts/list/MultiSelectEntryContactListAdapter.java
index b080657..5a54c51 100644
--- a/src/com/android/contacts/list/MultiSelectEntryContactListAdapter.java
+++ b/src/com/android/contacts/list/MultiSelectEntryContactListAdapter.java
@@ -115,13 +115,12 @@
 
     private void bindCheckBox(ContactListItemView view, Cursor cursor, int position,
             boolean isLocalDirectory) {
-        // Disable clicking on the ME profile and all contacts from remote directories
-        // when showing check boxes. We do this by telling the view to handle clicking itself.
-        view.setClickable((position == 0 && hasProfile() || !isLocalDirectory)
-                && mDisplayCheckBoxes);
+        // Disable clicking on all contacts from remote directories when showing check boxes. We do
+        // this by telling the view to handle clicking itself.
+        view.setClickable(!isLocalDirectory && mDisplayCheckBoxes);
         // Only show checkboxes if mDisplayCheckBoxes is enabled. Also, never show the
-        // checkbox for the Me profile entry and other directory contacts except local directory.
-        if (position == 0 && hasProfile() || !mDisplayCheckBoxes || !isLocalDirectory) {
+        // checkbox for other directory contacts except local directory.
+        if (!mDisplayCheckBoxes || !isLocalDirectory) {
             view.hideCheckBox();
             return;
         }
