Remove live folders
Bug:5254892
Change-Id: I19fbb28e99e60b4e70f73208664603aeed92f992
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;
- }
-}