diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 219ff67..e6e0337 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -567,37 +567,6 @@
             android:theme="@android:style/Theme.Translucent">
         </activity>
 
-        <!-- LIVE FOLDERS -->
-        <activity
-            android:name=".ContactsLiveFolders$AllContacts"
-            android:label="@string/liveFolderAll"
-            android:icon="@mipmap/ic_launcher_folder_live_contacts">
-            <intent-filter>
-                <action android:name="android.intent.action.CREATE_LIVE_FOLDER" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
-        <activity
-            android:name=".ContactsLiveFolders$StarredContacts"
-            android:label="@string/liveFolderFavorites"
-            android:icon="@mipmap/ic_launcher_folder_live_contacts_starred">
-            <intent-filter>
-                <action android:name="android.intent.action.CREATE_LIVE_FOLDER" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
-        <activity
-            android:name=".ContactsLiveFolders$PhoneContacts"
-            android:label="@string/liveFolderPhone"
-            android:icon="@mipmap/ic_launcher_folder_live_contacts_phone">
-            <intent-filter>
-                <action android:name="android.intent.action.CREATE_LIVE_FOLDER" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-
         <!-- vCard related -->
         <activity android:name=".vcard.ImportVCardActivity"
             android:configChanges="orientation|screenSize|keyboardHidden"
diff --git a/res/mipmap-hdpi/ic_launcher_folder_live_contacts.png b/res/mipmap-hdpi/ic_launcher_folder_live_contacts.png
deleted file mode 100644
index 84babe2..0000000
--- a/res/mipmap-hdpi/ic_launcher_folder_live_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_folder_live_contacts_phone.png b/res/mipmap-hdpi/ic_launcher_folder_live_contacts_phone.png
deleted file mode 100644
index 004e849..0000000
--- a/res/mipmap-hdpi/ic_launcher_folder_live_contacts_phone.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_folder_live_contacts_starred.png b/res/mipmap-hdpi/ic_launcher_folder_live_contacts_starred.png
deleted file mode 100644
index 73b4fa5..0000000
--- a/res/mipmap-hdpi/ic_launcher_folder_live_contacts_starred.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_folder_live_contacts.png b/res/mipmap-mdpi/ic_launcher_folder_live_contacts.png
deleted file mode 100644
index d49cc7b..0000000
--- a/res/mipmap-mdpi/ic_launcher_folder_live_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_folder_live_contacts_phone.png b/res/mipmap-mdpi/ic_launcher_folder_live_contacts_phone.png
deleted file mode 100644
index 0127f84..0000000
--- a/res/mipmap-mdpi/ic_launcher_folder_live_contacts_phone.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_folder_live_contacts_starred.png b/res/mipmap-mdpi/ic_launcher_folder_live_contacts_starred.png
deleted file mode 100644
index 8d56b31..0000000
--- a/res/mipmap-mdpi/ic_launcher_folder_live_contacts_starred.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts.png b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts.png
deleted file mode 100644
index 99bb9f8..0000000
--- a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_phone.png b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_phone.png
deleted file mode 100644
index fd416b8..0000000
--- a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_phone.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_starred.png b/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_starred.png
deleted file mode 100644
index ff9e326..0000000
--- a/res/mipmap-xhdpi/ic_launcher_folder_live_contacts_starred.png
+++ /dev/null
Binary files differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ed88aaa..62dac75 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -379,9 +379,6 @@
 
          [CHAR LIMIT=NONE] -->
     <string name="recentCallsIconLabel">Call log</string>
-    <string name="liveFolderAll">All contacts</string>
-    <string name="liveFolderFavorites">Starred contacts</string>
-    <string name="liveFolderPhone">Contacts with phone numbers</string>
 
     <!-- Menu item used to send an SMS or MMS message to a phone number  -->
     <string name="menu_sendTextMessage">Send text message</string>
@@ -522,15 +519,6 @@
         \n<li>Touch the star next to the contact\'s name\n</li>"
     </string>
 
-    <!-- Live folder label for all contacts -->
-    <string name="liveFolder_all_label">All contacts</string>
-
-    <!-- Live folder label for only starred contacts -->
-    <string name="liveFolder_favorites_label">Starred</string>
-
-    <!-- Live folder label for all contacts with phone numbers -->
-    <string name="liveFolder_phones_label">Phones</string>
-
     <!-- Item label: jump to the in-call DTMF dialpad.
          (Part of a list of options shown in the dialer when another call
          is already in progress.) -->
diff --git a/src/com/android/contacts/ContactsLiveFolders.java b/src/com/android/contacts/ContactsLiveFolders.java
deleted file mode 100644
index 9cb7e72..0000000
--- a/src/com/android/contacts/ContactsLiveFolders.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2008 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;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.ContactsContract.Contacts;
-import android.provider.LiveFolders;
-
-public class ContactsLiveFolders {
-    public static class StarredContacts extends Activity {
-        public static final Uri CONTENT_URI =
-                Uri.parse("content://contacts/live_folders/favorites");
-
-        @Override
-        protected void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-
-            final Intent intent = getIntent();
-            final String action = intent.getAction();
-
-            if (LiveFolders.ACTION_CREATE_LIVE_FOLDER.equals(action)) {
-                setResult(RESULT_OK, createLiveFolder(this, CONTENT_URI,
-                        getString(R.string.liveFolder_favorites_label),
-                        R.mipmap.ic_launcher_folder_live_contacts_starred));
-            } else {
-                setResult(RESULT_CANCELED);
-            }
-
-            finish();
-        }
-    }
-
-    public static class PhoneContacts extends Activity {
-        public static final Uri CONTENT_URI =
-                Uri.parse("content://contacts/live_folders/people_with_phones");
-
-        @Override
-        protected void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-
-            final Intent intent = getIntent();
-            final String action = intent.getAction();
-
-            if (LiveFolders.ACTION_CREATE_LIVE_FOLDER.equals(action)) {
-                setResult(RESULT_OK, createLiveFolder(this, CONTENT_URI,
-                        getString(R.string.liveFolder_phones_label),
-                        R.mipmap.ic_launcher_folder_live_contacts_phone));
-            } else {
-                setResult(RESULT_CANCELED);
-            }
-
-            finish();
-        }
-    }
-
-    public static class AllContacts extends Activity {
-        public static final Uri CONTENT_URI =
-                Uri.parse("content://contacts/live_folders/people");
-
-        @Override
-        protected void onCreate(Bundle savedInstanceState) {
-            super.onCreate(savedInstanceState);
-
-            final Intent intent = getIntent();
-            final String action = intent.getAction();
-
-            if (LiveFolders.ACTION_CREATE_LIVE_FOLDER.equals(action)) {
-                setResult(RESULT_OK, createLiveFolder(this, CONTENT_URI,
-                        getString(R.string.liveFolder_all_label),
-                        R.mipmap.ic_launcher_folder_live_contacts));
-            } else {
-                setResult(RESULT_CANCELED);
-            }
-
-            finish();
-        }
-    }
-
-    private static Intent createLiveFolder(Context context, Uri uri, String name,
-            int icon) {
-
-        final Intent intent = new Intent();
-
-        intent.setData(uri);
-        intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_BASE_INTENT,
-                new Intent(Intent.ACTION_VIEW, Contacts.CONTENT_URI));
-        intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_NAME, name);
-        intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_ICON,
-                Intent.ShortcutIconResource.fromContext(context, icon));
-        intent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE, LiveFolders.DISPLAY_MODE_LIST);
-
-        return intent;
-    }
-}
