diff --git a/Android.mk b/Android.mk
index 5a820bd..ff1b7e2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -5,7 +5,7 @@
 
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 
-LOCAL_STATIC_JAVA_LIBRARIES := com.android.phone.common
+LOCAL_STATIC_JAVA_LIBRARIES := com.android.phone.common com.android.vcard android-common
 
 LOCAL_PACKAGE_NAME := Contacts
 LOCAL_CERTIFICATE := shared
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 92ac452..1dc0235 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -40,6 +40,7 @@
         android:icon="@drawable/ic_launcher_contacts"
         android:process="android.process.acore"
         android:taskAffinity="android.task.contacts"
+        android:hardwareAccelerated="true"
     >
 
         <!-- A virtual 12 key dialer -->
@@ -72,6 +73,7 @@
             android:clearTaskOnLaunch="true"
             android:icon="@drawable/ic_launcher_phone"
             android:screenOrientation="nosensor"
+            android:enabled="@bool/dialerEnabled"
         >
             <intent-filter>
                 <action android:name="android.intent.action.DIAL" />
@@ -116,11 +118,11 @@
             </intent-filter>
         </activity>
 
-        <!-- Tab container for all tabs -->
-        <activity-alias android:name="DialtactsContactsEntryActivity"
-            android:targetActivity="DialtactsActivity"
+        <!-- Front door proxy that picks the right UI based on the screen config -->
+        <activity android:name=".activities.ContactsFrontDoor"
             android:label="@string/contactsList"
             android:icon="@drawable/ic_launcher_contacts"
+            android:theme="@android:style/Theme.NoTitleBar"
         >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -135,7 +137,22 @@
                 <data android:mimeType="vnd.android.cursor.dir/person" android:host="contacts" />
                 <data android:mimeType="vnd.android.cursor.dir/contact" android:host="com.android.contacts" />
             </intent-filter>
+        </activity>
 
+        <!-- Main launch Intent to open the Contacts app. This will open the app in its last manual
+        state. This is the state that has been explicitly set by the user (e.g. by clicking a tab).
+        States configured via other Intents (e.g. CallLog after Call) are not considered manual
+        state. At the moment, the Intent always goes to the DialtactsActivity, but this might later
+        be changed to also include sub-activities like Edit or View if they were left open -->
+
+        <activity-alias android:name="ContactsLaunchActivity"
+            android:targetActivity="DialtactsActivity"
+        >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.BROWSABLE" />
+            </intent-filter>
         </activity-alias>
 
         <!-- An empty activity that presents the DialtactActivity's Favorites tab -->
@@ -148,10 +165,11 @@
             </intent-filter>
         </activity-alias>
 
-        <!-- The actual list of contacts, usually embedded in ContactsActivity -->
-        <activity android:name="ContactsListActivity"
+        <!-- The actual list of contacts -->
+        <activity android:name=".activities.ContactBrowserActivity"
             android:label="@string/contactsList"
             android:clearTaskOnLaunch="true"
+            android:theme="@style/ContactBrowserTheme"
         >
             <intent-filter>
                 <action android:name="com.android.contacts.action.LIST_DEFAULT" />
@@ -196,6 +214,21 @@
             </intent-filter>
 
             <intent-filter>
+                <action android:name="android.intent.action.SEARCH" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+
+            <meta-data android:name="android.app.searchable"
+                android:resource="@xml/searchable"
+            />
+        </activity>
+        
+        <activity android:name=".activities.ContactSelectionActivity"
+            android:label="@string/contactsList"
+            android:clearTaskOnLaunch="true"
+            android:theme="@style/ContactPickerTheme"
+        >
+            <intent-filter>
                 <action android:name="android.intent.action.INSERT_OR_EDIT" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:mimeType="vnd.android.cursor.item/person" />
@@ -206,70 +239,84 @@
             <intent-filter>
                 <action android:name="android.intent.action.PICK" />
                 <category android:name="android.intent.category.DEFAULT" />
-                <data android:mimeType="vnd.android.cursor.dir/contact" />
-                <data android:mimeType="vnd.android.cursor.dir/person" />
-                <data android:mimeType="vnd.android.cursor.dir/phone_v2" />
-                <data android:mimeType="vnd.android.cursor.dir/phone" />
-                <data android:mimeType="vnd.android.cursor.dir/postal-address_v2" />
-                <data android:mimeType="vnd.android.cursor.dir/postal-address" />
+                <data android:mimeType="vnd.android.cursor.dir/contact" android:host="com.android.contacts" />
+                <data android:mimeType="vnd.android.cursor.dir/person" android:host="contacts" />
+                <data android:mimeType="vnd.android.cursor.dir/phone_v2" android:host="com.android.contacts" />
+                <data android:mimeType="vnd.android.cursor.dir/phone" android:host="contacts" />
+                <data android:mimeType="vnd.android.cursor.dir/postal-address_v2" android:host="com.android.contacts" />
+                <data android:mimeType="vnd.android.cursor.dir/postal-address" android:host="contacts" />
             </intent-filter>
 
             <intent-filter>
                 <action android:name="android.intent.action.GET_CONTENT" />
                 <category android:name="android.intent.category.DEFAULT" />
-                <data android:mimeType="vnd.android.cursor.item/contact" />
-                <data android:mimeType="vnd.android.cursor.item/person" />
-                <data android:mimeType="vnd.android.cursor.item/phone_v2" />
-                <data android:mimeType="vnd.android.cursor.item/phone" />
-                <data android:mimeType="vnd.android.cursor.item/postal-address_v2" />
-                <data android:mimeType="vnd.android.cursor.item/postal-address" />
+                <data android:mimeType="vnd.android.cursor.item/contact" android:host="com.android.contacts" />
+                <data android:mimeType="vnd.android.cursor.item/person" android:host="contacts" />
+                <data android:mimeType="vnd.android.cursor.item/phone_v2" android:host="com.android.contacts" />
+                <data android:mimeType="vnd.android.cursor.item/phone" android:host="contacts" />
+                <data android:mimeType="vnd.android.cursor.item/postal-address_v2" android:host="com.android.contacts" />
+                <data android:mimeType="vnd.android.cursor.item/postal-address" android:host="contacts" />
             </intent-filter>
-
         </activity>
 
+        <!-- Backwards compatibility: somebody may have hard coded this activity name -->
+        <activity-alias android:name="ContactsListActivity"
+            android:targetActivity=".activities.ContactBrowserActivity"
+        />
+
         <!-- An activity for joining contacts -->
-        <activity android:name="ContactsListActivity$JoinContactActivity"
-            android:theme="@style/TallTitleBarTheme"
+        <activity android:name="JoinContactActivity"
+            android:theme="@style/JoinContactActivityTheme"
             android:clearTaskOnLaunch="true"
         >
             <intent-filter>
-                <action android:name="com.android.contacts.action.JOIN_AGGREGATE" />
+                <action android:name="com.android.contacts.action.JOIN_CONTACT" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
 
+        <!-- An activity for selecting multiple phone numbers -->
+        <activity android:name="MultiplePhonePickerActivity"
+            android:enabled="false">
+            <intent-filter>
+                <action android:name="com.android.contacts.action.GET_MULTIPLE_PHONES" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:mimeType="vnd.android.cursor.dir/phone_v2" android:host="com.android.contacts" />
+            </intent-filter>
+        </activity>
+
         <!-- The contacts search/filter UI -->
-        <activity android:name="ContactsListActivity$ContactsSearchActivity"
+        <activity android:name=".activities.ContactSearchActivity"
             android:theme="@style/ContactsSearchTheme"
-            android:windowSoftInputMode="stateAlwaysVisible|adjustPan"
+            android:windowSoftInputMode="stateAlwaysVisible"
         >
             <intent-filter>
                 <action android:name="com.android.contacts.action.FILTER_CONTACTS" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <data android:mimeType="vnd.android.cursor.dir/contact" android:host="com.android.contacts" />
             </intent-filter>
+
         </activity>
 
         <!-- The contacts search/filter UI -->
-        <activity android:name="SearchResultsActivity"
-            android:theme="@style/TallTitleBarTheme"
-            android:label="@string/contactsList"
-        >
-            <intent-filter>
-                <action android:name="android.intent.action.SEARCH" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
+        <activity-alias android:name="SearchResultsActivity"
+            android:targetActivity=".activities.ContactBrowserActivity">
+        </activity-alias>
 
-            <meta-data android:name="android.app.searchable"
-                android:resource="@xml/searchable"
-            />
-        </activity>
+        <!-- Used to set options -->
+        <activity
+            android:name=".preference.ContactsPreferenceActivity"
+            android:label="@string/activity_title_settings"
+            android:theme="@style/ContactsPreferencesTheme" />
 
         <!-- Used to select display and sync groups -->
-        <activity android:name=".ui.ContactsPreferencesActivity" android:label="@string/displayGroups" />
+        <activity
+            android:name=".list.CustomContactListFilterActivity"
+            android:label="@string/custom_list_filter"
+            android:theme="@style/CustomContactListFilterTheme" />
 
         <activity
-            android:name=".ui.ShowOrCreateActivity"
+            android:name=".activities.ShowOrCreateActivity"
             android:theme="@style/FullyTranslucent">
 
             <intent-filter>
@@ -283,7 +330,7 @@
         <!-- Used to show QuickContact window over a translucent activity, which is a
              temporary hack until we add better framework support. -->
         <activity
-            android:name=".ui.QuickContactActivity"
+            android:name=".quickcontact.QuickContactActivity"
             android:theme="@style/FullyTranslucent.QuickContact"
             android:launchMode="singleTop"
             android:excludeFromRecents="true"
@@ -300,7 +347,7 @@
         </activity>
 
         <activity-alias android:name="ContactShortcut"
-            android:targetActivity="ContactsListActivity"
+            android:targetActivity=".activities.ContactSelectionActivity"
             android:label="@string/shortcutContact"
             android:icon="@drawable/ic_launcher_shortcut_contact">
 
@@ -312,9 +359,10 @@
         </activity-alias>
 
         <activity-alias android:name="alias.DialShortcut"
-            android:targetActivity="ContactsListActivity"
+            android:targetActivity=".activities.ContactSelectionActivity"
             android:label="@string/shortcutDialContact"
-            android:icon="@drawable/ic_launcher_shortcut_directdial">
+            android:icon="@drawable/ic_launcher_shortcut_directdial"
+            android:enabled="@bool/dialerEnabled">
 
             <intent-filter>
                 <action android:name="android.intent.action.CREATE_SHORTCUT" />
@@ -325,9 +373,10 @@
         </activity-alias>
 
         <activity-alias android:name="alias.MessageShortcut"
-            android:targetActivity="ContactsListActivity"
+            android:targetActivity=".activities.ContactSelectionActivity"
             android:label="@string/shortcutMessageContact"
-            android:icon="@drawable/ic_launcher_shortcut_directmessage">
+            android:icon="@drawable/ic_launcher_shortcut_directmessage"
+            android:enabled="@bool/dialerEnabled">
 
             <intent-filter>
                 <action android:name="android.intent.action.CREATE_SHORTCUT" />
@@ -338,7 +387,7 @@
 
         <activity android:name="CallDetailActivity"
             android:label="@string/callDetailTitle"
-            android:theme="@style/TallTitleBarTheme"
+            android:theme="@style/CallDetailActivityTheme"
         >
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
@@ -348,9 +397,9 @@
         </activity>
 
         <!-- Views the details of a single contact -->
-        <activity android:name="ViewContactActivity"
+        <activity android:name=".activities.ContactDetailActivity"
             android:label="@string/viewContactTitle"
-            android:theme="@style/TallTitleBarTheme">
+            android:theme="@style/ContactDetailActivityTheme">
 
             <intent-filter android:label="@string/viewContactDesription">
                 <action android:name="android.intent.action.VIEW" />
@@ -361,10 +410,11 @@
             </intent-filter>
         </activity>
 
-        <!-- Edit or insert details for a contact -->
+        <!-- Create a new or edit an existing contact -->
         <activity
-            android:name=".ui.EditContactActivity"
-            android:windowSoftInputMode="stateHidden|adjustResize">
+            android:name=".activities.ContactEditorActivity"
+            android:theme="@style/ContactEditorActivityTheme"
+            android:windowSoftInputMode="adjustResize">
 
             <intent-filter android:label="@string/editContactDescription">
                 <action android:name="android.intent.action.EDIT" />
@@ -373,7 +423,6 @@
                 <data android:mimeType="vnd.android.cursor.item/contact" android:host="com.android.contacts" />
                 <data android:mimeType="vnd.android.cursor.item/raw_contact" android:host="com.android.contacts" />
             </intent-filter>
-
             <intent-filter android:label="@string/insertContactDescription">
                 <action android:name="android.intent.action.INSERT" />
                 <category android:name="android.intent.category.DEFAULT" />
@@ -381,7 +430,6 @@
                 <data android:mimeType="vnd.android.cursor.dir/contact" />
                 <data android:mimeType="vnd.android.cursor.dir/raw_contact" />
             </intent-filter>
-
         </activity>
 
         <!-- Stub service used to keep our process alive long enough for
@@ -390,6 +438,11 @@
             android:name=".util.EmptyService"
             android:exported="false" />
 
+        <!-- Service to save a contact -->
+        <service
+            android:name=".views.ContactSaveService"
+            android:exported="false" />
+
         <!-- Views the details of a single contact -->
         <activity android:name="ContactOptionsActivity"
             android:label="@string/contactOptionsTitle"
@@ -412,10 +465,15 @@
             />
         </activity>
 
-        <!-- Makes .ContactsListActivity the search target for any activity in Contacts -->
+        <!-- Interstitial activity that shows a phone disambig dialog -->
+        <activity android:name="CallContactActivity"
+            android:theme="@android:style/Theme.Translucent">
+        </activity>
+
+        <!-- Makes .ContactBrowserActivity the search target for any activity in Contacts -->
         <meta-data
             android:name="android.app.default_searchable"
-            android:value=".ContactsListActivity" />
+            android:value=".activities.ContactBrowserActivity" />
 
 
         <!-- LIVE FOLDERS -->
@@ -449,17 +507,55 @@
             </intent-filter>
         </activity>
 
-        <activity android:name=".ImportVCardActivity"
+        <!-- vCard related -->
+        <activity android:name=".vcard.ImportVCardActivity"
             android:theme="@style/BackgroundOnly">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <data android:mimeType="text/directory" />
+                <data android:mimeType="text/vcard" />
                 <data android:mimeType="text/x-vcard" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
 
-        <activity android:name=".ExportVCardActivity"
+        <activity android:name=".vcard.CancelImportActivity"
             android:theme="@style/BackgroundOnly" />
+
+        <activity android:name=".vcard.SelectAccountActivity"
+            android:theme="@style/BackgroundOnly" />
+
+        <activity android:name=".vcard.ExportVCardActivity"
+            android:theme="@style/BackgroundOnly" />
+
+        <service
+            android:name=".vcard.VCardService"
+            android:exported="false" />
+
+        <!-- Pinned header list demo -->
+        <activity android:name=".widget.PinnedHeaderListDemoActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+        <!-- The widget that shows details and the social stream of a contact -->
+        <receiver android:name=".socialwidget.SocialWidgetProvider"
+            android:label="Contact Social Stream" >
+            <intent-filter>
+                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
+            </intent-filter>
+            <meta-data android:name="android.appwidget.provider"
+                    android:resource="@xml/social_widget_info" />
+        </receiver>
+
+        <activity
+            android:name=".socialwidget.SocialWidgetConfigureActivity"
+            android:theme="@style/SocialWidgetConfigureTheme">
+            <intent-filter>
+                <action android:name="android.intent.action.APPWIDGET_PICK" />
+            </intent-filter>
+        </activity>
     </application>
 </manifest>
diff --git a/proguard.flags b/proguard.flags
index 6cc704c..577144b 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -12,3 +12,8 @@
 -keep class com.android.contacts.model.EntityDelta$ValuesDelta {
   public android.content.ContentValues getAfter();
 }
+
+# Any methods whose name is '*ForTest' are preserved.
+-keep class ** {
+  *** *ForTest(...);
+}
\ No newline at end of file
diff --git a/res/anim/aizy_preview_popup_enter.xml b/res/anim/aizy_preview_popup_enter.xml
new file mode 100644
index 0000000..194a3a3
--- /dev/null
+++ b/res/anim/aizy_preview_popup_enter.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+    android:interpolator="@android:anim/accelerate_interpolator">
+	<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
+            android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/res/anim/aizy_preview_popup_exit.xml b/res/anim/aizy_preview_popup_exit.xml
new file mode 100644
index 0000000..ed5cda8
--- /dev/null
+++ b/res/anim/aizy_preview_popup_exit.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+    android:interpolator="@android:anim/accelerate_interpolator">
+	<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
+            android:duration="@android:integer/config_longAnimTime" />
+</set>
diff --git a/res/anim/footer_appear.xml b/res/anim/footer_appear.xml
new file mode 100644
index 0000000..941454a
--- /dev/null
+++ b/res/anim/footer_appear.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2009, 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.
+*/
+-->
+
+<translate xmlns:android="http://schemas.android.com/apk/res/android"
+    android:fromYDelta="+10%p"
+    android:toYDelta="0"
+    android:duration="300" />
\ No newline at end of file
diff --git a/res/anim/search_bar_enter.xml b/res/anim/search_bar_enter.xml
index f0ee241..19bbbba 100644
--- a/res/anim/search_bar_enter.xml
+++ b/res/anim/search_bar_enter.xml
@@ -19,8 +19,6 @@
 
 <set xmlns:android="http://schemas.android.com/apk/res/android"
     android:interpolator="@android:anim/decelerate_interpolator">
-	<translate android:fromYDelta="-32" android:toYDelta="0"
-            android:duration="@android:integer/config_shortAnimTime"/>
 	<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
             android:duration="@android:integer/config_shortAnimTime" />
 </set>
diff --git a/res/color-finger/dialer_button_text.xml b/res/color/dialer_button_text.xml
similarity index 100%
rename from res/color-finger/dialer_button_text.xml
rename to res/color/dialer_button_text.xml
diff --git a/res/color-finger/kind_title.xml b/res/color/kind_title.xml
similarity index 100%
rename from res/color-finger/kind_title.xml
rename to res/color/kind_title.xml
diff --git a/res/color-finger/tab_indicator_text.xml b/res/color/tab_indicator_text.xml
similarity index 100%
rename from res/color-finger/tab_indicator_text.xml
rename to res/color/tab_indicator_text.xml
diff --git a/res/drawable-finger/btn_dial_textfield.xml b/res/drawable-finger/btn_dial_textfield.xml
deleted file mode 100644
index 109f6ae..0000000
--- a/res/drawable-finger/btn_dial_textfield.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true"
-        android:drawable="@drawable/btn_dial_textfield_pressed" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/btn_dial_textfield_normal" />
-    <item
-        android:drawable="@drawable/btn_dial_textfield_normal" />
-</selector>
-
diff --git a/res/drawable-finger/btn_dial_textfield_active.xml b/res/drawable-finger/btn_dial_textfield_active.xml
deleted file mode 100644
index 246d543..0000000
--- a/res/drawable-finger/btn_dial_textfield_active.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true"
-        android:drawable="@drawable/btn_dial_textfield_pressed" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/btn_dial_textfield_activated" />
-    <item
-        android:drawable="@drawable/btn_dial_textfield_activated" />
-</selector>
-
diff --git a/res/drawable-hdpi-finger/btn_dial_action_middle_disable.9.png b/res/drawable-hdpi-finger/btn_dial_action_middle_disable.9.png
deleted file mode 100644
index bce33fd..0000000
--- a/res/drawable-hdpi-finger/btn_dial_action_middle_disable.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_right_disable.9.png b/res/drawable-hdpi-finger/btn_dial_action_right_disable.9.png
deleted file mode 100644
index e2b1372..0000000
--- a/res/drawable-hdpi-finger/btn_dial_action_right_disable.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_textfield_normal.9.png b/res/drawable-hdpi-finger/btn_dial_textfield_normal.9.png
deleted file mode 100644
index adacb44..0000000
--- a/res/drawable-hdpi-finger/btn_dial_textfield_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_0_wht.png b/res/drawable-hdpi-finger/dial_num_0_wht.png
deleted file mode 100644
index 98dfecd..0000000
--- a/res/drawable-hdpi-finger/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_1_no_vm_wht.png b/res/drawable-hdpi-finger/dial_num_1_no_vm_wht.png
deleted file mode 100644
index 8f65ee1..0000000
--- a/res/drawable-hdpi-finger/dial_num_1_no_vm_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_2_wht.png b/res/drawable-hdpi-finger/dial_num_2_wht.png
deleted file mode 100644
index a7c8993..0000000
--- a/res/drawable-hdpi-finger/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_3_wht.png b/res/drawable-hdpi-finger/dial_num_3_wht.png
deleted file mode 100644
index d8276c0..0000000
--- a/res/drawable-hdpi-finger/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_4_wht.png b/res/drawable-hdpi-finger/dial_num_4_wht.png
deleted file mode 100644
index 7de2623..0000000
--- a/res/drawable-hdpi-finger/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_5_wht.png b/res/drawable-hdpi-finger/dial_num_5_wht.png
deleted file mode 100644
index e1cb279..0000000
--- a/res/drawable-hdpi-finger/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_6_wht.png b/res/drawable-hdpi-finger/dial_num_6_wht.png
deleted file mode 100644
index 5b33e2f..0000000
--- a/res/drawable-hdpi-finger/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_7_wht.png b/res/drawable-hdpi-finger/dial_num_7_wht.png
deleted file mode 100644
index 5136e67..0000000
--- a/res/drawable-hdpi-finger/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_8_wht.png b/res/drawable-hdpi-finger/dial_num_8_wht.png
deleted file mode 100644
index 3386866..0000000
--- a/res/drawable-hdpi-finger/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_9_wht.png b/res/drawable-hdpi-finger/dial_num_9_wht.png
deleted file mode 100644
index db78a47..0000000
--- a/res/drawable-hdpi-finger/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_pound_wht.png b/res/drawable-hdpi-finger/dial_num_pound_wht.png
deleted file mode 100644
index b4793fd..0000000
--- a/res/drawable-hdpi-finger/dial_num_pound_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_star_wht.png b/res/drawable-hdpi-finger/dial_num_star_wht.png
deleted file mode 100644
index 612c4ee..0000000
--- a/res/drawable-hdpi-finger/dial_num_star_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_btn_round_less.png b/res/drawable-hdpi-finger/ic_btn_round_less.png
deleted file mode 100644
index 21a8eff..0000000
--- a/res/drawable-hdpi-finger/ic_btn_round_less.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_btn_round_minus.png b/res/drawable-hdpi-finger/ic_btn_round_minus.png
deleted file mode 100755
index 2cd610c..0000000
--- a/res/drawable-hdpi-finger/ic_btn_round_minus.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_btn_round_more.png b/res/drawable-hdpi-finger/ic_btn_round_more.png
deleted file mode 100755
index bf91bef..0000000
--- a/res/drawable-hdpi-finger/ic_btn_round_more.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_btn_round_plus.png b/res/drawable-hdpi-finger/ic_btn_round_plus.png
deleted file mode 100755
index a541efb..0000000
--- a/res/drawable-hdpi-finger/ic_btn_round_plus.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_menu_account_list.png b/res/drawable-hdpi-finger/ic_menu_account_list.png
deleted file mode 100755
index a69c642..0000000
--- a/res/drawable-hdpi-finger/ic_menu_account_list.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_menu_import_export.png b/res/drawable-hdpi-finger/ic_menu_import_export.png
deleted file mode 100644
index 4f1b608..0000000
--- a/res/drawable-hdpi-finger/ic_menu_import_export.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_menu_merge.png b/res/drawable-hdpi-finger/ic_menu_merge.png
deleted file mode 100644
index d3ed8cc..0000000
--- a/res/drawable-hdpi-finger/ic_menu_merge.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_menu_split.png b/res/drawable-hdpi-finger/ic_menu_split.png
deleted file mode 100644
index 33ef601..0000000
--- a/res/drawable-hdpi-finger/ic_menu_split.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/sym_action_map.png b/res/drawable-hdpi-finger/sym_action_map.png
deleted file mode 100755
index cf00c7b..0000000
--- a/res/drawable-hdpi-finger/sym_action_map.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/sym_action_organization.png b/res/drawable-hdpi-finger/sym_action_organization.png
deleted file mode 100755
index 9db8b44..0000000
--- a/res/drawable-hdpi-finger/sym_action_organization.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/sym_note.png b/res/drawable-hdpi-finger/sym_note.png
deleted file mode 100755
index 5257329..0000000
--- a/res/drawable-hdpi-finger/sym_note.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/aggregation_suggestions_bg.9.png b/res/drawable-hdpi/aggregation_suggestions_bg.9.png
new file mode 100644
index 0000000..687cc08
--- /dev/null
+++ b/res/drawable-hdpi/aggregation_suggestions_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi/aggregation_suggestions_bg_light_holo.9.png b/res/drawable-hdpi/aggregation_suggestions_bg_light_holo.9.png
new file mode 100644
index 0000000..da1fe94
--- /dev/null
+++ b/res/drawable-hdpi/aggregation_suggestions_bg_light_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/aizy_label.9.png b/res/drawable-hdpi/aizy_label.9.png
new file mode 100644
index 0000000..1599037
--- /dev/null
+++ b/res/drawable-hdpi/aizy_label.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_1.9.png b/res/drawable-hdpi/appointment_indicator_leftside_1.9.png
new file mode 100644
index 0000000..b72652b
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_1.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_10.9.png b/res/drawable-hdpi/appointment_indicator_leftside_10.9.png
new file mode 100644
index 0000000..ff09049
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_10.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_11.9.png b/res/drawable-hdpi/appointment_indicator_leftside_11.9.png
new file mode 100644
index 0000000..6a2e4f2
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_11.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_12.9.png b/res/drawable-hdpi/appointment_indicator_leftside_12.9.png
new file mode 100644
index 0000000..0f19c83
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_12.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_13.9.png b/res/drawable-hdpi/appointment_indicator_leftside_13.9.png
new file mode 100644
index 0000000..7501e35
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_13.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_14.9.png b/res/drawable-hdpi/appointment_indicator_leftside_14.9.png
new file mode 100644
index 0000000..53f97a6
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_14.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_15.9.png b/res/drawable-hdpi/appointment_indicator_leftside_15.9.png
new file mode 100644
index 0000000..846f6f8
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_15.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_16.9.png b/res/drawable-hdpi/appointment_indicator_leftside_16.9.png
new file mode 100644
index 0000000..1707540
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_16.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_17.9.png b/res/drawable-hdpi/appointment_indicator_leftside_17.9.png
new file mode 100644
index 0000000..7fd945d
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_17.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_18.9.png b/res/drawable-hdpi/appointment_indicator_leftside_18.9.png
new file mode 100644
index 0000000..8cf47ae
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_18.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_19.9.png b/res/drawable-hdpi/appointment_indicator_leftside_19.9.png
new file mode 100644
index 0000000..6831c01
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_19.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_2.9.png b/res/drawable-hdpi/appointment_indicator_leftside_2.9.png
new file mode 100644
index 0000000..b4cee11
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_2.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_20.9.png b/res/drawable-hdpi/appointment_indicator_leftside_20.9.png
new file mode 100644
index 0000000..d07d826
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_20.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_21.9.png b/res/drawable-hdpi/appointment_indicator_leftside_21.9.png
new file mode 100644
index 0000000..f410269
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_21.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_3.9.png b/res/drawable-hdpi/appointment_indicator_leftside_3.9.png
new file mode 100644
index 0000000..69bd6a9
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_3.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_4.9.png b/res/drawable-hdpi/appointment_indicator_leftside_4.9.png
new file mode 100644
index 0000000..d09ea90
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_4.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_5.9.png b/res/drawable-hdpi/appointment_indicator_leftside_5.9.png
new file mode 100644
index 0000000..d27fc91
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_5.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_6.9.png b/res/drawable-hdpi/appointment_indicator_leftside_6.9.png
new file mode 100644
index 0000000..c014633
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_6.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_7.9.png b/res/drawable-hdpi/appointment_indicator_leftside_7.9.png
new file mode 100644
index 0000000..febb514
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_7.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_8.9.png b/res/drawable-hdpi/appointment_indicator_leftside_8.9.png
new file mode 100644
index 0000000..1415e44
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_8.9.png
Binary files differ
diff --git a/res/drawable-hdpi/appointment_indicator_leftside_9.9.png b/res/drawable-hdpi/appointment_indicator_leftside_9.9.png
new file mode 100644
index 0000000..d018fcf
--- /dev/null
+++ b/res/drawable-hdpi/appointment_indicator_leftside_9.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/badge_action_call.png b/res/drawable-hdpi/badge_action_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/badge_action_call.png
rename to res/drawable-hdpi/badge_action_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/badge_action_sms.png b/res/drawable-hdpi/badge_action_sms.png
similarity index 100%
rename from res/drawable-hdpi-finger/badge_action_sms.png
rename to res/drawable-hdpi/badge_action_sms.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/bg_blk_search_contact.9.png b/res/drawable-hdpi/bg_blk_search_contact.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/bg_blk_search_contact.9.png
rename to res/drawable-hdpi/bg_blk_search_contact.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_circle_disable.png b/res/drawable-hdpi/btn_circle_disable.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_circle_disable.png
rename to res/drawable-hdpi/btn_circle_disable.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_circle_disable_focused.png b/res/drawable-hdpi/btn_circle_disable_focused.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_circle_disable_focused.png
rename to res/drawable-hdpi/btn_circle_disable_focused.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_circle_normal.png b/res/drawable-hdpi/btn_circle_normal.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_circle_normal.png
rename to res/drawable-hdpi/btn_circle_normal.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_circle_pressed.png b/res/drawable-hdpi/btn_circle_pressed.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_circle_pressed.png
rename to res/drawable-hdpi/btn_circle_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_circle_selected.png b/res/drawable-hdpi/btn_circle_selected.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_circle_selected.png
rename to res/drawable-hdpi/btn_circle_selected.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_left_disable.9.png b/res/drawable-hdpi/btn_dial_action_left_disable.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_left_disable.9.png
rename to res/drawable-hdpi/btn_dial_action_left_disable.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_left_disable_focused.9.png b/res/drawable-hdpi/btn_dial_action_left_disable_focused.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_left_disable_focused.9.png
rename to res/drawable-hdpi/btn_dial_action_left_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_left_normal.9.png b/res/drawable-hdpi/btn_dial_action_left_normal.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_left_normal.9.png
rename to res/drawable-hdpi/btn_dial_action_left_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_left_pressed.9.png b/res/drawable-hdpi/btn_dial_action_left_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_left_pressed.9.png
rename to res/drawable-hdpi/btn_dial_action_left_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_left_selected.9.png b/res/drawable-hdpi/btn_dial_action_left_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_left_selected.9.png
rename to res/drawable-hdpi/btn_dial_action_left_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_action_middle_disable.9.png b/res/drawable-hdpi/btn_dial_action_middle_disable.9.png
new file mode 100644
index 0000000..5159c74
--- /dev/null
+++ b/res/drawable-hdpi/btn_dial_action_middle_disable.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_middle_disable_focused.9.png b/res/drawable-hdpi/btn_dial_action_middle_disable_focused.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_middle_disable_focused.9.png
rename to res/drawable-hdpi/btn_dial_action_middle_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_middle_normal.9.png b/res/drawable-hdpi/btn_dial_action_middle_normal.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_middle_normal.9.png
rename to res/drawable-hdpi/btn_dial_action_middle_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_middle_pressed.9.png b/res/drawable-hdpi/btn_dial_action_middle_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_middle_pressed.9.png
rename to res/drawable-hdpi/btn_dial_action_middle_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_middle_selected.9.png b/res/drawable-hdpi/btn_dial_action_middle_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_middle_selected.9.png
rename to res/drawable-hdpi/btn_dial_action_middle_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_action_right_disable.9.png b/res/drawable-hdpi/btn_dial_action_right_disable.9.png
new file mode 100644
index 0000000..4844ee2
--- /dev/null
+++ b/res/drawable-hdpi/btn_dial_action_right_disable.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_right_disable_focused.9.png b/res/drawable-hdpi/btn_dial_action_right_disable_focused.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_right_disable_focused.9.png
rename to res/drawable-hdpi/btn_dial_action_right_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_right_normal.9.png b/res/drawable-hdpi/btn_dial_action_right_normal.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_right_normal.9.png
rename to res/drawable-hdpi/btn_dial_action_right_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_right_pressed.9.png b/res/drawable-hdpi/btn_dial_action_right_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_right_pressed.9.png
rename to res/drawable-hdpi/btn_dial_action_right_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_action_right_selected.9.png b/res/drawable-hdpi/btn_dial_action_right_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_action_right_selected.9.png
rename to res/drawable-hdpi/btn_dial_action_right_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_normal.9.png b/res/drawable-hdpi/btn_dial_normal.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_normal.9.png
rename to res/drawable-hdpi/btn_dial_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_pressed.9.png b/res/drawable-hdpi/btn_dial_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_pressed.9.png
rename to res/drawable-hdpi/btn_dial_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_selected.9.png b/res/drawable-hdpi/btn_dial_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_selected.9.png
rename to res/drawable-hdpi/btn_dial_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_textfield_activated.9.png b/res/drawable-hdpi/btn_dial_textfield_activated.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_textfield_activated.9.png
rename to res/drawable-hdpi/btn_dial_textfield_activated.9.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_dial_textfield_normal.9.png b/res/drawable-hdpi/btn_dial_textfield_normal.9.png
new file mode 100644
index 0000000..1718372
--- /dev/null
+++ b/res/drawable-hdpi/btn_dial_textfield_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_textfield_pressed.9.png b/res/drawable-hdpi/btn_dial_textfield_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_textfield_pressed.9.png
rename to res/drawable-hdpi/btn_dial_textfield_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_dial_textfield_selected.9.png b/res/drawable-hdpi/btn_dial_textfield_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_dial_textfield_selected.9.png
rename to res/drawable-hdpi/btn_dial_textfield_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_minus_disabled.png b/res/drawable-hdpi/btn_minus_disabled.png
new file mode 100644
index 0000000..f58c35d
--- /dev/null
+++ b/res/drawable-hdpi/btn_minus_disabled.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_minus_disabled_focused.png b/res/drawable-hdpi/btn_minus_disabled_focused.png
new file mode 100644
index 0000000..0c0d117
--- /dev/null
+++ b/res/drawable-hdpi/btn_minus_disabled_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_minus_focused.png b/res/drawable-hdpi/btn_minus_focused.png
new file mode 100644
index 0000000..9c41031
--- /dev/null
+++ b/res/drawable-hdpi/btn_minus_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_minus_normal.png b/res/drawable-hdpi/btn_minus_normal.png
new file mode 100644
index 0000000..cc92b82
--- /dev/null
+++ b/res/drawable-hdpi/btn_minus_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_minus_pressed.png b/res/drawable-hdpi/btn_minus_pressed.png
new file mode 100644
index 0000000..63219f9
--- /dev/null
+++ b/res/drawable-hdpi/btn_minus_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_plus_disabled.png b/res/drawable-hdpi/btn_plus_disabled.png
new file mode 100644
index 0000000..5c659e4
--- /dev/null
+++ b/res/drawable-hdpi/btn_plus_disabled.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_plus_disabled_focused.png b/res/drawable-hdpi/btn_plus_disabled_focused.png
new file mode 100644
index 0000000..b2defec
--- /dev/null
+++ b/res/drawable-hdpi/btn_plus_disabled_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_plus_focused.png b/res/drawable-hdpi/btn_plus_focused.png
new file mode 100644
index 0000000..01710dd
--- /dev/null
+++ b/res/drawable-hdpi/btn_plus_focused.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_plus_normal.png b/res/drawable-hdpi/btn_plus_normal.png
new file mode 100644
index 0000000..de34ba8
--- /dev/null
+++ b/res/drawable-hdpi/btn_plus_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/btn_plus_pressed.png b/res/drawable-hdpi/btn_plus_pressed.png
new file mode 100644
index 0000000..a8bc7c5
--- /dev/null
+++ b/res/drawable-hdpi/btn_plus_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_search_dialog_default.9.png b/res/drawable-hdpi/btn_search_dialog_default.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_search_dialog_default.9.png
rename to res/drawable-hdpi/btn_search_dialog_default.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_search_dialog_pressed.9.png b/res/drawable-hdpi/btn_search_dialog_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_search_dialog_pressed.9.png
rename to res/drawable-hdpi/btn_search_dialog_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/btn_search_dialog_selected.9.png b/res/drawable-hdpi/btn_search_dialog_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/btn_search_dialog_selected.9.png
rename to res/drawable-hdpi/btn_search_dialog_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi/cab_divider_holo_light.png b/res/drawable-hdpi/cab_divider_holo_light.png
new file mode 100644
index 0000000..ecaa019
--- /dev/null
+++ b/res/drawable-hdpi/cab_divider_holo_light.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/contact_picture_border_highlight.9.png b/res/drawable-hdpi/contact_picture_border_highlight.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/contact_picture_border_highlight.9.png
rename to res/drawable-hdpi/contact_picture_border_highlight.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/contact_picture_border_normal.9.png b/res/drawable-hdpi/contact_picture_border_normal.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/contact_picture_border_normal.9.png
rename to res/drawable-hdpi/contact_picture_border_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/contact_picture_border_pressed.9.png b/res/drawable-hdpi/contact_picture_border_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/contact_picture_border_pressed.9.png
rename to res/drawable-hdpi/contact_picture_border_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi/contact_view_bg.9.png b/res/drawable-hdpi/contact_view_bg.9.png
new file mode 100644
index 0000000..4e5f824
--- /dev/null
+++ b/res/drawable-hdpi/contact_view_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_0_blk.png b/res/drawable-hdpi/dial_num_0_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_0_blk.png
rename to res/drawable-hdpi/dial_num_0_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_0_blk.png b/res/drawable-hdpi/dial_num_0_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_0_blk.png
copy to res/drawable-hdpi/dial_num_0_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_1_no_vm_blk.png b/res/drawable-hdpi/dial_num_1_no_vm_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_1_no_vm_blk.png
rename to res/drawable-hdpi/dial_num_1_no_vm_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_1_no_vm_blk.png b/res/drawable-hdpi/dial_num_1_no_vm_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_1_no_vm_blk.png
copy to res/drawable-hdpi/dial_num_1_no_vm_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_2_blk.png b/res/drawable-hdpi/dial_num_2_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_2_blk.png
rename to res/drawable-hdpi/dial_num_2_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_2_blk.png b/res/drawable-hdpi/dial_num_2_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_2_blk.png
copy to res/drawable-hdpi/dial_num_2_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_3_blk.png b/res/drawable-hdpi/dial_num_3_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_3_blk.png
rename to res/drawable-hdpi/dial_num_3_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_3_blk.png b/res/drawable-hdpi/dial_num_3_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_3_blk.png
copy to res/drawable-hdpi/dial_num_3_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_4_blk.png b/res/drawable-hdpi/dial_num_4_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_4_blk.png
rename to res/drawable-hdpi/dial_num_4_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_4_blk.png b/res/drawable-hdpi/dial_num_4_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_4_blk.png
copy to res/drawable-hdpi/dial_num_4_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_5_blk.png b/res/drawable-hdpi/dial_num_5_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_5_blk.png
rename to res/drawable-hdpi/dial_num_5_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_5_blk.png b/res/drawable-hdpi/dial_num_5_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_5_blk.png
copy to res/drawable-hdpi/dial_num_5_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_6_blk.png b/res/drawable-hdpi/dial_num_6_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_6_blk.png
rename to res/drawable-hdpi/dial_num_6_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_6_blk.png b/res/drawable-hdpi/dial_num_6_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_6_blk.png
copy to res/drawable-hdpi/dial_num_6_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_7_blk.png b/res/drawable-hdpi/dial_num_7_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_7_blk.png
rename to res/drawable-hdpi/dial_num_7_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_7_blk.png b/res/drawable-hdpi/dial_num_7_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_7_blk.png
copy to res/drawable-hdpi/dial_num_7_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_8_blk.png b/res/drawable-hdpi/dial_num_8_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_8_blk.png
rename to res/drawable-hdpi/dial_num_8_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_8_blk.png b/res/drawable-hdpi/dial_num_8_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_8_blk.png
copy to res/drawable-hdpi/dial_num_8_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_9_blk.png b/res/drawable-hdpi/dial_num_9_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_9_blk.png
rename to res/drawable-hdpi/dial_num_9_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_9_blk.png b/res/drawable-hdpi/dial_num_9_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_9_blk.png
copy to res/drawable-hdpi/dial_num_9_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_pound_blk.png b/res/drawable-hdpi/dial_num_pound_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_pound_blk.png
rename to res/drawable-hdpi/dial_num_pound_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_pound_blk.png b/res/drawable-hdpi/dial_num_pound_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_pound_blk.png
copy to res/drawable-hdpi/dial_num_pound_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_star_blk.png b/res/drawable-hdpi/dial_num_star_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/dial_num_star_blk.png
rename to res/drawable-hdpi/dial_num_star_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/dial_num_star_blk.png b/res/drawable-hdpi/dial_num_star_wht.png
similarity index 100%
copy from res/drawable-hdpi-finger/dial_num_star_blk.png
copy to res/drawable-hdpi/dial_num_star_wht.png
Binary files differ
diff --git a/res/drawable-hdpi/directory_bg.9.png b/res/drawable-hdpi/directory_bg.9.png
new file mode 100644
index 0000000..f0a92d4
--- /dev/null
+++ b/res/drawable-hdpi/directory_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi/directory_bg_holo.9.png b/res/drawable-hdpi/directory_bg_holo.9.png
new file mode 100644
index 0000000..7f7209d
--- /dev/null
+++ b/res/drawable-hdpi/directory_bg_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/divider_vertical_dark.9.png b/res/drawable-hdpi/divider_vertical_dark.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/divider_vertical_dark.9.png
rename to res/drawable-hdpi/divider_vertical_dark.9.png
Binary files differ
diff --git a/res/drawable-hdpi/edit_rawcontact_bg.png b/res/drawable-hdpi/edit_rawcontact_bg.png
new file mode 100644
index 0000000..84bd50b
--- /dev/null
+++ b/res/drawable-hdpi/edit_rawcontact_bg.png
Binary files differ
diff --git a/res/drawable-hdpi/edit_rawcontact_bottom.png b/res/drawable-hdpi/edit_rawcontact_bottom.png
new file mode 100644
index 0000000..58ae4b2
--- /dev/null
+++ b/res/drawable-hdpi/edit_rawcontact_bottom.png
Binary files differ
diff --git a/res/drawable-hdpi/edit_rawcontact_top.png b/res/drawable-hdpi/edit_rawcontact_top.png
new file mode 100644
index 0000000..6ca737d
--- /dev/null
+++ b/res/drawable-hdpi/edit_rawcontact_top.png
Binary files differ
diff --git a/res/drawable-hdpi/filter_selector_corner.png b/res/drawable-hdpi/filter_selector_corner.png
new file mode 100644
index 0000000..964dd75
--- /dev/null
+++ b/res/drawable-hdpi/filter_selector_corner.png
Binary files differ
diff --git a/res/drawable-hdpi/group_membership_edit_background.9.png b/res/drawable-hdpi/group_membership_edit_background.9.png
new file mode 100644
index 0000000..1292ebf
--- /dev/null
+++ b/res/drawable-hdpi/group_membership_edit_background.9.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_aggregated.png b/res/drawable-hdpi/ic_aggregated.png
new file mode 100644
index 0000000..7ca15b1
--- /dev/null
+++ b/res/drawable-hdpi/ic_aggregated.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_round_less.png b/res/drawable-hdpi/ic_btn_round_less.png
new file mode 100644
index 0000000..819440e
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_round_less.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_btn_round_more.png b/res/drawable-hdpi/ic_btn_round_more.png
new file mode 100755
index 0000000..9883d55
--- /dev/null
+++ b/res/drawable-hdpi/ic_btn_round_more.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_call_log_header_incoming_call.png b/res/drawable-hdpi/ic_call_log_header_incoming_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_call_log_header_incoming_call.png
rename to res/drawable-hdpi/ic_call_log_header_incoming_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_call_log_header_missed_call.png b/res/drawable-hdpi/ic_call_log_header_missed_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_call_log_header_missed_call.png
rename to res/drawable-hdpi/ic_call_log_header_missed_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_call_log_header_outgoing_call.png b/res/drawable-hdpi/ic_call_log_header_outgoing_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_call_log_header_outgoing_call.png
rename to res/drawable-hdpi/ic_call_log_header_outgoing_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_call_log_list_incoming_call.png b/res/drawable-hdpi/ic_call_log_list_incoming_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_call_log_list_incoming_call.png
rename to res/drawable-hdpi/ic_call_log_list_incoming_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_call_log_list_missed_call.png b/res/drawable-hdpi/ic_call_log_list_missed_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_call_log_list_missed_call.png
rename to res/drawable-hdpi/ic_call_log_list_missed_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_call_log_list_outgoing_call.png b/res/drawable-hdpi/ic_call_log_list_outgoing_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_call_log_list_outgoing_call.png
rename to res/drawable-hdpi/ic_call_log_list_outgoing_call.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_contact_list_filter_all.png b/res/drawable-hdpi/ic_contact_list_filter_all.png
new file mode 100644
index 0000000..67981a9
--- /dev/null
+++ b/res/drawable-hdpi/ic_contact_list_filter_all.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_contact_list_filter_custom.png b/res/drawable-hdpi/ic_contact_list_filter_custom.png
new file mode 100644
index 0000000..3f48be3
--- /dev/null
+++ b/res/drawable-hdpi/ic_contact_list_filter_custom.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_contact_list_filter_starred.png b/res/drawable-hdpi/ic_contact_list_filter_starred.png
new file mode 100644
index 0000000..4213050
--- /dev/null
+++ b/res/drawable-hdpi/ic_contact_list_filter_starred.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_contact_list_picture.png b/res/drawable-hdpi/ic_contact_list_picture.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_contact_list_picture.png
rename to res/drawable-hdpi/ic_contact_list_picture.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_contact_picture.png b/res/drawable-hdpi/ic_contact_picture.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_contact_picture.png
rename to res/drawable-hdpi/ic_contact_picture.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_contact_picture_2.png b/res/drawable-hdpi/ic_contact_picture_2.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_contact_picture_2.png
rename to res/drawable-hdpi/ic_contact_picture_2.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_contact_picture_3.png b/res/drawable-hdpi/ic_contact_picture_3.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_contact_picture_3.png
rename to res/drawable-hdpi/ic_contact_picture_3.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_default_number.png b/res/drawable-hdpi/ic_default_number.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_default_number.png
rename to res/drawable-hdpi/ic_default_number.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dial_action_call.png b/res/drawable-hdpi/ic_dial_action_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dial_action_call.png
rename to res/drawable-hdpi/ic_dial_action_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dial_action_delete.png b/res/drawable-hdpi/ic_dial_action_delete.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dial_action_delete.png
rename to res/drawable-hdpi/ic_dial_action_delete.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dial_action_voice_mail.png b/res/drawable-hdpi/ic_dial_action_voice_mail.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dial_action_voice_mail.png
rename to res/drawable-hdpi/ic_dial_action_voice_mail.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dial_number_blk.png b/res/drawable-hdpi/ic_dial_number_blk.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dial_number_blk.png
rename to res/drawable-hdpi/ic_dial_number_blk.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dial_number_wht.png b/res/drawable-hdpi/ic_dial_number_wht.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dial_number_wht.png
rename to res/drawable-hdpi/ic_dial_number_wht.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dialer_fork_add_call.png b/res/drawable-hdpi/ic_dialer_fork_add_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dialer_fork_add_call.png
rename to res/drawable-hdpi/ic_dialer_fork_add_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dialer_fork_current_call.png b/res/drawable-hdpi/ic_dialer_fork_current_call.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dialer_fork_current_call.png
rename to res/drawable-hdpi/ic_dialer_fork_current_call.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_dialer_fork_tt_keypad.png b/res/drawable-hdpi/ic_dialer_fork_tt_keypad.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_dialer_fork_tt_keypad.png
rename to res/drawable-hdpi/ic_dialer_fork_tt_keypad.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_join.png b/res/drawable-hdpi/ic_join.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_join.png
rename to res/drawable-hdpi/ic_join.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_phone.png b/res/drawable-hdpi/ic_launcher_phone.png
index 7739546..0943ce5 100644
--- a/res/drawable-hdpi/ic_launcher_phone.png
+++ b/res/drawable-hdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_2sec_pause.png b/res/drawable-hdpi/ic_menu_2sec_pause.png
new file mode 100644
index 0000000..3951948
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_2sec_pause.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_accounts_normal_holo.png b/res/drawable-hdpi/ic_menu_accounts_normal_holo.png
new file mode 100644
index 0000000..682b0fc
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_accounts_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_accounts_pressed_holo.png b/res/drawable-hdpi/ic_menu_accounts_pressed_holo.png
new file mode 100644
index 0000000..2047a14
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_accounts_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_contact_normal_holo.png b/res/drawable-hdpi/ic_menu_add_contact_normal_holo.png
new file mode 100644
index 0000000..d548ade
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_add_contact_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_add_contact_pressed_holo.png b/res/drawable-hdpi/ic_menu_add_contact_pressed_holo.png
new file mode 100644
index 0000000..1c1f737
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_add_contact_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_menu_add_picture.png b/res/drawable-hdpi/ic_menu_add_picture.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_menu_add_picture.png
rename to res/drawable-hdpi/ic_menu_add_picture.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_cancel_normal_holo.png b/res/drawable-hdpi/ic_menu_cancel_normal_holo.png
new file mode 100644
index 0000000..5f68c62
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_cancel_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_cancel_pressed_holo.png b/res/drawable-hdpi/ic_menu_cancel_pressed_holo.png
new file mode 100644
index 0000000..917a19d
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_cancel_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_compose_normal_holo.png b/res/drawable-hdpi/ic_menu_compose_normal_holo.png
new file mode 100644
index 0000000..ff8f862
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_compose_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_compose_pressed_holo.png b/res/drawable-hdpi/ic_menu_compose_pressed_holo.png
new file mode 100644
index 0000000..c045226
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_compose_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_display_all.png b/res/drawable-hdpi/ic_menu_display_all.png
new file mode 100755
index 0000000..563083c
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_display_all.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_display_selected.png b/res/drawable-hdpi/ic_menu_display_selected.png
new file mode 100644
index 0000000..76b2e22
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_display_selected.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_done_normal_holo.png b/res/drawable-hdpi/ic_menu_done_normal_holo.png
new file mode 100644
index 0000000..39ad5b9
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_done_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_done_pressed_holo.png b/res/drawable-hdpi/ic_menu_done_pressed_holo.png
new file mode 100644
index 0000000..c7e1338
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_done_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_import_export_normal_holo.png b/res/drawable-hdpi/ic_menu_import_export_normal_holo.png
new file mode 100644
index 0000000..2602e5f
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_import_export_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_import_export_pressed_holo.png b/res/drawable-hdpi/ic_menu_import_export_pressed_holo.png
new file mode 100644
index 0000000..c4d5e3b
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_import_export_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_merge_normal_holo.png b/res/drawable-hdpi/ic_menu_merge_normal_holo.png
new file mode 100644
index 0000000..4e6ff36
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_merge_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_merge_pressed_holo.png b/res/drawable-hdpi/ic_menu_merge_pressed_holo.png
new file mode 100644
index 0000000..583e7ec
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_merge_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_select.png b/res/drawable-hdpi/ic_menu_select.png
new file mode 100644
index 0000000..c5bb503
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_select.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_settings_normal_holo.png b/res/drawable-hdpi/ic_menu_settings_normal_holo.png
new file mode 100644
index 0000000..30cb132
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_settings_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_settings_pressed_holo.png b/res/drawable-hdpi/ic_menu_settings_pressed_holo.png
new file mode 100644
index 0000000..03ea60b
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_settings_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_share_normal_holo.png b/res/drawable-hdpi/ic_menu_share_normal_holo.png
new file mode 100644
index 0000000..d18adaf
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_share_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_share_pressed_holo.png b/res/drawable-hdpi/ic_menu_share_pressed_holo.png
new file mode 100644
index 0000000..aee9001
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_share_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_split_normal_holo.png b/res/drawable-hdpi/ic_menu_split_normal_holo.png
new file mode 100644
index 0000000..29c8c38
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_split_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_split_pressed_holo.png b/res/drawable-hdpi/ic_menu_split_pressed_holo.png
new file mode 100644
index 0000000..ad5de95
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_split_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_trash_normal_holo.png b/res/drawable-hdpi/ic_menu_trash_normal_holo.png
new file mode 100644
index 0000000..6e601c8
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_trash_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_trash_pressed_holo.png b/res/drawable-hdpi/ic_menu_trash_pressed_holo.png
new file mode 100644
index 0000000..9579c53
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_trash_pressed_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_unselect.png b/res/drawable-hdpi/ic_menu_unselect.png
new file mode 100644
index 0000000..178f314
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_unselect.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_menu_wait.png b/res/drawable-hdpi/ic_menu_wait.png
new file mode 100644
index 0000000..6886e5d
--- /dev/null
+++ b/res/drawable-hdpi/ic_menu_wait.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_selected_contacts.png b/res/drawable-hdpi/ic_tab_selected_contacts.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_selected_contacts.png
rename to res/drawable-hdpi/ic_tab_selected_contacts.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_selected_dialer.png b/res/drawable-hdpi/ic_tab_selected_dialer.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_selected_dialer.png
rename to res/drawable-hdpi/ic_tab_selected_dialer.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_selected_friends_list.png b/res/drawable-hdpi/ic_tab_selected_friends_list.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_selected_friends_list.png
rename to res/drawable-hdpi/ic_tab_selected_friends_list.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_selected_recent.png b/res/drawable-hdpi/ic_tab_selected_recent.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_selected_recent.png
rename to res/drawable-hdpi/ic_tab_selected_recent.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_selected_starred.png b/res/drawable-hdpi/ic_tab_selected_starred.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_selected_starred.png
rename to res/drawable-hdpi/ic_tab_selected_starred.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_unselected_contacts.png b/res/drawable-hdpi/ic_tab_unselected_contacts.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_unselected_contacts.png
rename to res/drawable-hdpi/ic_tab_unselected_contacts.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_unselected_dialer.png b/res/drawable-hdpi/ic_tab_unselected_dialer.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_unselected_dialer.png
rename to res/drawable-hdpi/ic_tab_unselected_dialer.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_unselected_friends_list.png b/res/drawable-hdpi/ic_tab_unselected_friends_list.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_unselected_friends_list.png
rename to res/drawable-hdpi/ic_tab_unselected_friends_list.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_unselected_recent.png b/res/drawable-hdpi/ic_tab_unselected_recent.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_unselected_recent.png
rename to res/drawable-hdpi/ic_tab_unselected_recent.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/ic_tab_unselected_starred.png b/res/drawable-hdpi/ic_tab_unselected_starred.png
similarity index 100%
rename from res/drawable-hdpi-finger/ic_tab_unselected_starred.png
rename to res/drawable-hdpi/ic_tab_unselected_starred.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/infobar_dark.9.png b/res/drawable-hdpi/infobar_dark.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/infobar_dark.9.png
rename to res/drawable-hdpi/infobar_dark.9.png
Binary files differ
diff --git a/res/drawable-hdpi/list_item_activated_bg.9.png b/res/drawable-hdpi/list_item_activated_bg.9.png
new file mode 100644
index 0000000..dd82c22
--- /dev/null
+++ b/res/drawable-hdpi/list_item_activated_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi/list_item_divider.9.png b/res/drawable-hdpi/list_item_divider.9.png
new file mode 100644
index 0000000..60e2cb2
--- /dev/null
+++ b/res/drawable-hdpi/list_item_divider.9.png
Binary files differ
diff --git a/res/drawable-hdpi/list_item_divider_holo.9.png b/res/drawable-hdpi/list_item_divider_holo.9.png
new file mode 100644
index 0000000..f5130d5
--- /dev/null
+++ b/res/drawable-hdpi/list_item_divider_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/list_item_pressed_bg.9.png b/res/drawable-hdpi/list_item_pressed_bg.9.png
new file mode 100644
index 0000000..74d8e53
--- /dev/null
+++ b/res/drawable-hdpi/list_item_pressed_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_arrow_down.png b/res/drawable-hdpi/quickcontact_arrow_down.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_arrow_down.png
rename to res/drawable-hdpi/quickcontact_arrow_down.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_arrow_up.png b/res/drawable-hdpi/quickcontact_arrow_up.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_arrow_up.png
rename to res/drawable-hdpi/quickcontact_arrow_up.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_bottom_frame.9.png b/res/drawable-hdpi/quickcontact_bottom_frame.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_bottom_frame.9.png
rename to res/drawable-hdpi/quickcontact_bottom_frame.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_disambig_bottom_bg.9.png b/res/drawable-hdpi/quickcontact_disambig_bottom_bg.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_disambig_bottom_bg.9.png
rename to res/drawable-hdpi/quickcontact_disambig_bottom_bg.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_disambig_checkbox_off.png b/res/drawable-hdpi/quickcontact_disambig_checkbox_off.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_disambig_checkbox_off.png
rename to res/drawable-hdpi/quickcontact_disambig_checkbox_off.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_disambig_checkbox_on.png b/res/drawable-hdpi/quickcontact_disambig_checkbox_on.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_disambig_checkbox_on.png
rename to res/drawable-hdpi/quickcontact_disambig_checkbox_on.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_disambig_divider.9.png b/res/drawable-hdpi/quickcontact_disambig_divider.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_disambig_divider.9.png
rename to res/drawable-hdpi/quickcontact_disambig_divider.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_drop_shadow.9.png b/res/drawable-hdpi/quickcontact_drop_shadow.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_drop_shadow.9.png
rename to res/drawable-hdpi/quickcontact_drop_shadow.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_photo_frame.9.png b/res/drawable-hdpi/quickcontact_photo_frame.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_photo_frame.9.png
rename to res/drawable-hdpi/quickcontact_photo_frame.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_background.png b/res/drawable-hdpi/quickcontact_slider_background.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_background.png
rename to res/drawable-hdpi/quickcontact_slider_background.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_btn_normal.9.png b/res/drawable-hdpi/quickcontact_slider_btn_normal.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_btn_normal.9.png
rename to res/drawable-hdpi/quickcontact_slider_btn_normal.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_btn_on.9.png b/res/drawable-hdpi/quickcontact_slider_btn_on.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_btn_on.9.png
rename to res/drawable-hdpi/quickcontact_slider_btn_on.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_btn_pressed.9.png b/res/drawable-hdpi/quickcontact_slider_btn_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_btn_pressed.9.png
rename to res/drawable-hdpi/quickcontact_slider_btn_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_btn_selected.9.png b/res/drawable-hdpi/quickcontact_slider_btn_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_btn_selected.9.png
rename to res/drawable-hdpi/quickcontact_slider_btn_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_grip_left.png b/res/drawable-hdpi/quickcontact_slider_grip_left.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_grip_left.png
rename to res/drawable-hdpi/quickcontact_slider_grip_left.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_grip_right.png b/res/drawable-hdpi/quickcontact_slider_grip_right.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_grip_right.png
rename to res/drawable-hdpi/quickcontact_slider_grip_right.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_presence_active.png b/res/drawable-hdpi/quickcontact_slider_presence_active.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_presence_active.png
rename to res/drawable-hdpi/quickcontact_slider_presence_active.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_presence_away.png b/res/drawable-hdpi/quickcontact_slider_presence_away.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_presence_away.png
rename to res/drawable-hdpi/quickcontact_slider_presence_away.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_presence_busy.png b/res/drawable-hdpi/quickcontact_slider_presence_busy.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_presence_busy.png
rename to res/drawable-hdpi/quickcontact_slider_presence_busy.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_slider_presence_inactive.png b/res/drawable-hdpi/quickcontact_slider_presence_inactive.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_slider_presence_inactive.png
rename to res/drawable-hdpi/quickcontact_slider_presence_inactive.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/quickcontact_top_frame.9.png b/res/drawable-hdpi/quickcontact_top_frame.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/quickcontact_top_frame.9.png
rename to res/drawable-hdpi/quickcontact_top_frame.9.png
Binary files differ
diff --git a/res/drawable-hdpi/section_header.9.png b/res/drawable-hdpi/section_header.9.png
new file mode 100644
index 0000000..8cd231b
--- /dev/null
+++ b/res/drawable-hdpi/section_header.9.png
Binary files differ
diff --git a/res/drawable-hdpi/section_header_holo.9.png b/res/drawable-hdpi/section_header_holo.9.png
new file mode 100644
index 0000000..de12d0e
--- /dev/null
+++ b/res/drawable-hdpi/section_header_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/social_bubble.9.png b/res/drawable-hdpi/social_bubble.9.png
new file mode 100644
index 0000000..8a28fd3
--- /dev/null
+++ b/res/drawable-hdpi/social_bubble.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/sym_action_add.png b/res/drawable-hdpi/sym_action_add.png
similarity index 100%
rename from res/drawable-hdpi-finger/sym_action_add.png
rename to res/drawable-hdpi/sym_action_add.png
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_email.png b/res/drawable-hdpi/sym_action_email.png
new file mode 100644
index 0000000..edd7a7d
--- /dev/null
+++ b/res/drawable-hdpi/sym_action_email.png
Binary files differ
diff --git a/res/drawable-hdpi/sym_action_map.png b/res/drawable-hdpi/sym_action_map.png
new file mode 100644
index 0000000..8dd61dc
--- /dev/null
+++ b/res/drawable-hdpi/sym_action_map.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/sym_action_view_contact.png b/res/drawable-hdpi/sym_action_view_contact.png
similarity index 100%
rename from res/drawable-hdpi-finger/sym_action_view_contact.png
rename to res/drawable-hdpi/sym_action_view_contact.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_focused.9.png b/res/drawable-hdpi/tab_focused.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_focused.9.png
rename to res/drawable-hdpi/tab_focused.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_focused_bottom.9.png b/res/drawable-hdpi/tab_focused_bottom.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_focused_bottom.9.png
rename to res/drawable-hdpi/tab_focused_bottom.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_left_arrow.png b/res/drawable-hdpi/tab_left_arrow.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_left_arrow.png
rename to res/drawable-hdpi/tab_left_arrow.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_pressed.9.png b/res/drawable-hdpi/tab_pressed.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_pressed.9.png
rename to res/drawable-hdpi/tab_pressed.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_pressed_bottom.9.png b/res/drawable-hdpi/tab_pressed_bottom.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_pressed_bottom.9.png
rename to res/drawable-hdpi/tab_pressed_bottom.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_right_arrow.png b/res/drawable-hdpi/tab_right_arrow.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_right_arrow.png
rename to res/drawable-hdpi/tab_right_arrow.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_selected.9.png b/res/drawable-hdpi/tab_selected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_selected.9.png
rename to res/drawable-hdpi/tab_selected.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_selected_bottom.9.png b/res/drawable-hdpi/tab_selected_bottom.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_selected_bottom.9.png
rename to res/drawable-hdpi/tab_selected_bottom.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/tab_unselected.9.png b/res/drawable-hdpi/tab_unselected.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/tab_unselected.9.png
rename to res/drawable-hdpi/tab_unselected.9.png
Binary files differ
diff --git a/res/drawable-hdpi/title_bar_medium.9.png b/res/drawable-hdpi/title_bar_medium.9.png
new file mode 100644
index 0000000..311a54a
--- /dev/null
+++ b/res/drawable-hdpi/title_bar_medium.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/title_bar_shadow.9.png b/res/drawable-hdpi/title_bar_shadow.9.png
similarity index 100%
rename from res/drawable-hdpi-finger/title_bar_shadow.9.png
rename to res/drawable-hdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/res/drawable-hdpi/unknown_source.png b/res/drawable-hdpi/unknown_source.png
new file mode 100644
index 0000000..0a8f37d
--- /dev/null
+++ b/res/drawable-hdpi/unknown_source.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_left_disable.9.png b/res/drawable-mdpi-finger/btn_dial_action_left_disable.9.png
deleted file mode 100644
index ea6cd80..0000000
--- a/res/drawable-mdpi-finger/btn_dial_action_left_disable.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_middle_disable.9.png b/res/drawable-mdpi-finger/btn_dial_action_middle_disable.9.png
deleted file mode 100644
index 07c9e78..0000000
--- a/res/drawable-mdpi-finger/btn_dial_action_middle_disable.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_right_disable.9.png b/res/drawable-mdpi-finger/btn_dial_action_right_disable.9.png
deleted file mode 100644
index bca80bb..0000000
--- a/res/drawable-mdpi-finger/btn_dial_action_right_disable.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_textfield_normal.9.png b/res/drawable-mdpi-finger/btn_dial_textfield_normal.9.png
deleted file mode 100644
index 3def8c0..0000000
--- a/res/drawable-mdpi-finger/btn_dial_textfield_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_0_wht.png b/res/drawable-mdpi-finger/dial_num_0_wht.png
deleted file mode 100644
index 44c38d2..0000000
--- a/res/drawable-mdpi-finger/dial_num_0_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_1_no_vm_wht.png b/res/drawable-mdpi-finger/dial_num_1_no_vm_wht.png
deleted file mode 100644
index 267bed5..0000000
--- a/res/drawable-mdpi-finger/dial_num_1_no_vm_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_2_wht.png b/res/drawable-mdpi-finger/dial_num_2_wht.png
deleted file mode 100644
index f1f27a3..0000000
--- a/res/drawable-mdpi-finger/dial_num_2_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_3_wht.png b/res/drawable-mdpi-finger/dial_num_3_wht.png
deleted file mode 100644
index b229202..0000000
--- a/res/drawable-mdpi-finger/dial_num_3_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_4_wht.png b/res/drawable-mdpi-finger/dial_num_4_wht.png
deleted file mode 100644
index 8c9af62..0000000
--- a/res/drawable-mdpi-finger/dial_num_4_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_5_wht.png b/res/drawable-mdpi-finger/dial_num_5_wht.png
deleted file mode 100644
index bac9b8f..0000000
--- a/res/drawable-mdpi-finger/dial_num_5_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_6_wht.png b/res/drawable-mdpi-finger/dial_num_6_wht.png
deleted file mode 100644
index c76a988..0000000
--- a/res/drawable-mdpi-finger/dial_num_6_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_7_wht.png b/res/drawable-mdpi-finger/dial_num_7_wht.png
deleted file mode 100644
index 4fe6992..0000000
--- a/res/drawable-mdpi-finger/dial_num_7_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_8_wht.png b/res/drawable-mdpi-finger/dial_num_8_wht.png
deleted file mode 100644
index 0481eb4..0000000
--- a/res/drawable-mdpi-finger/dial_num_8_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_9_wht.png b/res/drawable-mdpi-finger/dial_num_9_wht.png
deleted file mode 100644
index b54c6c2..0000000
--- a/res/drawable-mdpi-finger/dial_num_9_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_pound_wht.png b/res/drawable-mdpi-finger/dial_num_pound_wht.png
deleted file mode 100644
index 2186b31..0000000
--- a/res/drawable-mdpi-finger/dial_num_pound_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_star_wht.png b/res/drawable-mdpi-finger/dial_num_star_wht.png
deleted file mode 100644
index 3c75031..0000000
--- a/res/drawable-mdpi-finger/dial_num_star_wht.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_btn_round_less.png b/res/drawable-mdpi-finger/ic_btn_round_less.png
deleted file mode 100644
index 96fc42e..0000000
--- a/res/drawable-mdpi-finger/ic_btn_round_less.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_btn_round_minus.png b/res/drawable-mdpi-finger/ic_btn_round_minus.png
deleted file mode 100644
index 96dbb17..0000000
--- a/res/drawable-mdpi-finger/ic_btn_round_minus.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_btn_round_more.png b/res/drawable-mdpi-finger/ic_btn_round_more.png
deleted file mode 100644
index e3355cc..0000000
--- a/res/drawable-mdpi-finger/ic_btn_round_more.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_btn_round_plus.png b/res/drawable-mdpi-finger/ic_btn_round_plus.png
deleted file mode 100644
index 1ec8a95..0000000
--- a/res/drawable-mdpi-finger/ic_btn_round_plus.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_menu_account_list.png b/res/drawable-mdpi-finger/ic_menu_account_list.png
deleted file mode 100644
index f0945b2..0000000
--- a/res/drawable-mdpi-finger/ic_menu_account_list.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_menu_import_export.png b/res/drawable-mdpi-finger/ic_menu_import_export.png
deleted file mode 100644
index 1cefb7c..0000000
--- a/res/drawable-mdpi-finger/ic_menu_import_export.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_menu_merge.png b/res/drawable-mdpi-finger/ic_menu_merge.png
deleted file mode 100644
index b448c27..0000000
--- a/res/drawable-mdpi-finger/ic_menu_merge.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_menu_split.png b/res/drawable-mdpi-finger/ic_menu_split.png
deleted file mode 100644
index 9d69e4c..0000000
--- a/res/drawable-mdpi-finger/ic_menu_split.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/sym_action_map.png b/res/drawable-mdpi-finger/sym_action_map.png
deleted file mode 100644
index 12719cc..0000000
--- a/res/drawable-mdpi-finger/sym_action_map.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/sym_action_organization.png b/res/drawable-mdpi-finger/sym_action_organization.png
deleted file mode 100644
index 994d3f5..0000000
--- a/res/drawable-mdpi-finger/sym_action_organization.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/sym_note.png b/res/drawable-mdpi-finger/sym_note.png
deleted file mode 100644
index e4dbdf5..0000000
--- a/res/drawable-mdpi-finger/sym_note.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/aggregation_suggestions_bg.9.png b/res/drawable-mdpi/aggregation_suggestions_bg.9.png
new file mode 100644
index 0000000..687cc08
--- /dev/null
+++ b/res/drawable-mdpi/aggregation_suggestions_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/aggregation_suggestions_bg_light_holo.9.png b/res/drawable-mdpi/aggregation_suggestions_bg_light_holo.9.png
new file mode 100644
index 0000000..03e24c6
--- /dev/null
+++ b/res/drawable-mdpi/aggregation_suggestions_bg_light_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/aizy_label.9.png b/res/drawable-mdpi/aizy_label.9.png
new file mode 100644
index 0000000..695b000
--- /dev/null
+++ b/res/drawable-mdpi/aizy_label.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_1.9.png b/res/drawable-mdpi/appointment_indicator_leftside_1.9.png
new file mode 100644
index 0000000..5e40235
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_1.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_10.9.png b/res/drawable-mdpi/appointment_indicator_leftside_10.9.png
new file mode 100644
index 0000000..d0cb144
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_10.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_11.9.png b/res/drawable-mdpi/appointment_indicator_leftside_11.9.png
new file mode 100644
index 0000000..034f496
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_11.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_12.9.png b/res/drawable-mdpi/appointment_indicator_leftside_12.9.png
new file mode 100644
index 0000000..6371b3a
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_12.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_13.9.png b/res/drawable-mdpi/appointment_indicator_leftside_13.9.png
new file mode 100644
index 0000000..a8b42c6
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_13.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_14.9.png b/res/drawable-mdpi/appointment_indicator_leftside_14.9.png
new file mode 100644
index 0000000..a69e519
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_14.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_15.9.png b/res/drawable-mdpi/appointment_indicator_leftside_15.9.png
new file mode 100644
index 0000000..5d68470
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_15.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_16.9.png b/res/drawable-mdpi/appointment_indicator_leftside_16.9.png
new file mode 100644
index 0000000..d9420c1
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_16.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_17.9.png b/res/drawable-mdpi/appointment_indicator_leftside_17.9.png
new file mode 100644
index 0000000..d0875c4
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_17.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_18.9.png b/res/drawable-mdpi/appointment_indicator_leftside_18.9.png
new file mode 100644
index 0000000..fc152f7
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_18.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_19.9.png b/res/drawable-mdpi/appointment_indicator_leftside_19.9.png
new file mode 100644
index 0000000..6506a94
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_19.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_2.9.png b/res/drawable-mdpi/appointment_indicator_leftside_2.9.png
new file mode 100644
index 0000000..3baf5cc
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_2.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_20.9.png b/res/drawable-mdpi/appointment_indicator_leftside_20.9.png
new file mode 100644
index 0000000..28340ba
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_20.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_21.9.png b/res/drawable-mdpi/appointment_indicator_leftside_21.9.png
new file mode 100644
index 0000000..5319f07
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_21.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_3.9.png b/res/drawable-mdpi/appointment_indicator_leftside_3.9.png
new file mode 100644
index 0000000..9850791
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_3.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_4.9.png b/res/drawable-mdpi/appointment_indicator_leftside_4.9.png
new file mode 100644
index 0000000..e344ccb
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_4.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_5.9.png b/res/drawable-mdpi/appointment_indicator_leftside_5.9.png
new file mode 100644
index 0000000..11b4dfb
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_5.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_6.9.png b/res/drawable-mdpi/appointment_indicator_leftside_6.9.png
new file mode 100644
index 0000000..7419d47
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_6.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_7.9.png b/res/drawable-mdpi/appointment_indicator_leftside_7.9.png
new file mode 100644
index 0000000..0a3a272
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_7.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_8.9.png b/res/drawable-mdpi/appointment_indicator_leftside_8.9.png
new file mode 100644
index 0000000..db18d27
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_8.9.png
Binary files differ
diff --git a/res/drawable-mdpi/appointment_indicator_leftside_9.9.png b/res/drawable-mdpi/appointment_indicator_leftside_9.9.png
new file mode 100644
index 0000000..5037de8
--- /dev/null
+++ b/res/drawable-mdpi/appointment_indicator_leftside_9.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/badge_action_call.png b/res/drawable-mdpi/badge_action_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/badge_action_call.png
rename to res/drawable-mdpi/badge_action_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/badge_action_sms.png b/res/drawable-mdpi/badge_action_sms.png
similarity index 100%
rename from res/drawable-mdpi-finger/badge_action_sms.png
rename to res/drawable-mdpi/badge_action_sms.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/bg_blk_search_contact.9.png b/res/drawable-mdpi/bg_blk_search_contact.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/bg_blk_search_contact.9.png
rename to res/drawable-mdpi/bg_blk_search_contact.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_circle_disable.png b/res/drawable-mdpi/btn_circle_disable.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_circle_disable.png
rename to res/drawable-mdpi/btn_circle_disable.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_circle_disable_focused.png b/res/drawable-mdpi/btn_circle_disable_focused.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_circle_disable_focused.png
rename to res/drawable-mdpi/btn_circle_disable_focused.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_circle_normal.png b/res/drawable-mdpi/btn_circle_normal.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_circle_normal.png
rename to res/drawable-mdpi/btn_circle_normal.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_circle_pressed.png b/res/drawable-mdpi/btn_circle_pressed.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_circle_pressed.png
rename to res/drawable-mdpi/btn_circle_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_circle_selected.png b/res/drawable-mdpi/btn_circle_selected.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_circle_selected.png
rename to res/drawable-mdpi/btn_circle_selected.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_action_left_disable.9.png b/res/drawable-mdpi/btn_dial_action_left_disable.9.png
new file mode 100644
index 0000000..8eb45c8
--- /dev/null
+++ b/res/drawable-mdpi/btn_dial_action_left_disable.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_left_disable_focused.9.png b/res/drawable-mdpi/btn_dial_action_left_disable_focused.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_left_disable_focused.9.png
rename to res/drawable-mdpi/btn_dial_action_left_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_left_normal.9.png b/res/drawable-mdpi/btn_dial_action_left_normal.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_left_normal.9.png
rename to res/drawable-mdpi/btn_dial_action_left_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_left_pressed.9.png b/res/drawable-mdpi/btn_dial_action_left_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_left_pressed.9.png
rename to res/drawable-mdpi/btn_dial_action_left_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_left_selected.9.png b/res/drawable-mdpi/btn_dial_action_left_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_left_selected.9.png
rename to res/drawable-mdpi/btn_dial_action_left_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_action_middle_disable.9.png b/res/drawable-mdpi/btn_dial_action_middle_disable.9.png
new file mode 100644
index 0000000..e13b958
--- /dev/null
+++ b/res/drawable-mdpi/btn_dial_action_middle_disable.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_middle_disable_focused.9.png b/res/drawable-mdpi/btn_dial_action_middle_disable_focused.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_middle_disable_focused.9.png
rename to res/drawable-mdpi/btn_dial_action_middle_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_middle_normal.9.png b/res/drawable-mdpi/btn_dial_action_middle_normal.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_middle_normal.9.png
rename to res/drawable-mdpi/btn_dial_action_middle_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_middle_pressed.9.png b/res/drawable-mdpi/btn_dial_action_middle_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_middle_pressed.9.png
rename to res/drawable-mdpi/btn_dial_action_middle_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_middle_selected.9.png b/res/drawable-mdpi/btn_dial_action_middle_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_middle_selected.9.png
rename to res/drawable-mdpi/btn_dial_action_middle_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_action_right_disable.9.png b/res/drawable-mdpi/btn_dial_action_right_disable.9.png
new file mode 100644
index 0000000..de5c271
--- /dev/null
+++ b/res/drawable-mdpi/btn_dial_action_right_disable.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_right_disable_focused.9.png b/res/drawable-mdpi/btn_dial_action_right_disable_focused.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_right_disable_focused.9.png
rename to res/drawable-mdpi/btn_dial_action_right_disable_focused.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_right_normal.9.png b/res/drawable-mdpi/btn_dial_action_right_normal.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_right_normal.9.png
rename to res/drawable-mdpi/btn_dial_action_right_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_right_pressed.9.png b/res/drawable-mdpi/btn_dial_action_right_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_right_pressed.9.png
rename to res/drawable-mdpi/btn_dial_action_right_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_action_right_selected.9.png b/res/drawable-mdpi/btn_dial_action_right_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_action_right_selected.9.png
rename to res/drawable-mdpi/btn_dial_action_right_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_normal.9.png b/res/drawable-mdpi/btn_dial_normal.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_normal.9.png
rename to res/drawable-mdpi/btn_dial_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_pressed.9.png b/res/drawable-mdpi/btn_dial_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_pressed.9.png
rename to res/drawable-mdpi/btn_dial_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_selected.9.png b/res/drawable-mdpi/btn_dial_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_selected.9.png
rename to res/drawable-mdpi/btn_dial_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_textfield_activated.9.png b/res/drawable-mdpi/btn_dial_textfield_activated.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_textfield_activated.9.png
rename to res/drawable-mdpi/btn_dial_textfield_activated.9.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_dial_textfield_normal.9.png b/res/drawable-mdpi/btn_dial_textfield_normal.9.png
new file mode 100644
index 0000000..277400b
--- /dev/null
+++ b/res/drawable-mdpi/btn_dial_textfield_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_textfield_pressed.9.png b/res/drawable-mdpi/btn_dial_textfield_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_textfield_pressed.9.png
rename to res/drawable-mdpi/btn_dial_textfield_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_dial_textfield_selected.9.png b/res/drawable-mdpi/btn_dial_textfield_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_dial_textfield_selected.9.png
rename to res/drawable-mdpi/btn_dial_textfield_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_minus_disabled.png b/res/drawable-mdpi/btn_minus_disabled.png
new file mode 100644
index 0000000..abe3b7b
--- /dev/null
+++ b/res/drawable-mdpi/btn_minus_disabled.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_minus_disabled_focused.png b/res/drawable-mdpi/btn_minus_disabled_focused.png
new file mode 100644
index 0000000..0e4b66c
--- /dev/null
+++ b/res/drawable-mdpi/btn_minus_disabled_focused.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_minus_focused.png b/res/drawable-mdpi/btn_minus_focused.png
new file mode 100644
index 0000000..321365c
--- /dev/null
+++ b/res/drawable-mdpi/btn_minus_focused.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_minus_normal.png b/res/drawable-mdpi/btn_minus_normal.png
new file mode 100644
index 0000000..8c00936
--- /dev/null
+++ b/res/drawable-mdpi/btn_minus_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_minus_pressed.png b/res/drawable-mdpi/btn_minus_pressed.png
new file mode 100644
index 0000000..bffe6f3
--- /dev/null
+++ b/res/drawable-mdpi/btn_minus_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_plus_disabled.png b/res/drawable-mdpi/btn_plus_disabled.png
new file mode 100644
index 0000000..c71bb10
--- /dev/null
+++ b/res/drawable-mdpi/btn_plus_disabled.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_plus_disabled_focused.png b/res/drawable-mdpi/btn_plus_disabled_focused.png
new file mode 100644
index 0000000..5060b3e
--- /dev/null
+++ b/res/drawable-mdpi/btn_plus_disabled_focused.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_plus_focused.png b/res/drawable-mdpi/btn_plus_focused.png
new file mode 100644
index 0000000..3a49acc
--- /dev/null
+++ b/res/drawable-mdpi/btn_plus_focused.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_plus_normal.png b/res/drawable-mdpi/btn_plus_normal.png
new file mode 100644
index 0000000..b88d0b9
--- /dev/null
+++ b/res/drawable-mdpi/btn_plus_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/btn_plus_pressed.png b/res/drawable-mdpi/btn_plus_pressed.png
new file mode 100644
index 0000000..e4fc529
--- /dev/null
+++ b/res/drawable-mdpi/btn_plus_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_search_dialog_default.9.png b/res/drawable-mdpi/btn_search_dialog_default.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_search_dialog_default.9.png
rename to res/drawable-mdpi/btn_search_dialog_default.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_search_dialog_pressed.9.png b/res/drawable-mdpi/btn_search_dialog_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_search_dialog_pressed.9.png
rename to res/drawable-mdpi/btn_search_dialog_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/btn_search_dialog_selected.9.png b/res/drawable-mdpi/btn_search_dialog_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/btn_search_dialog_selected.9.png
rename to res/drawable-mdpi/btn_search_dialog_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi/cab_divider_holo_light.png b/res/drawable-mdpi/cab_divider_holo_light.png
new file mode 100644
index 0000000..4a77a85
--- /dev/null
+++ b/res/drawable-mdpi/cab_divider_holo_light.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/contact_picture_border_highlight.9.png b/res/drawable-mdpi/contact_picture_border_highlight.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/contact_picture_border_highlight.9.png
rename to res/drawable-mdpi/contact_picture_border_highlight.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/contact_picture_border_normal.9.png b/res/drawable-mdpi/contact_picture_border_normal.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/contact_picture_border_normal.9.png
rename to res/drawable-mdpi/contact_picture_border_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/contact_picture_border_pressed.9.png b/res/drawable-mdpi/contact_picture_border_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/contact_picture_border_pressed.9.png
rename to res/drawable-mdpi/contact_picture_border_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_0_blk.png b/res/drawable-mdpi/dial_num_0_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_0_blk.png
rename to res/drawable-mdpi/dial_num_0_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_0_wht.png b/res/drawable-mdpi/dial_num_0_wht.png
new file mode 100644
index 0000000..c3b3f2c
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_0_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_1_no_vm_blk.png b/res/drawable-mdpi/dial_num_1_no_vm_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_1_no_vm_blk.png
rename to res/drawable-mdpi/dial_num_1_no_vm_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_1_no_vm_wht.png b/res/drawable-mdpi/dial_num_1_no_vm_wht.png
new file mode 100644
index 0000000..a5bdb41
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_1_no_vm_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_2_blk.png b/res/drawable-mdpi/dial_num_2_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_2_blk.png
rename to res/drawable-mdpi/dial_num_2_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_2_wht.png b/res/drawable-mdpi/dial_num_2_wht.png
new file mode 100644
index 0000000..ac99cec
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_2_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_3_blk.png b/res/drawable-mdpi/dial_num_3_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_3_blk.png
rename to res/drawable-mdpi/dial_num_3_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_3_wht.png b/res/drawable-mdpi/dial_num_3_wht.png
new file mode 100644
index 0000000..69170b9
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_3_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_4_blk.png b/res/drawable-mdpi/dial_num_4_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_4_blk.png
rename to res/drawable-mdpi/dial_num_4_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_4_wht.png b/res/drawable-mdpi/dial_num_4_wht.png
new file mode 100644
index 0000000..48a02a5
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_4_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_5_blk.png b/res/drawable-mdpi/dial_num_5_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_5_blk.png
rename to res/drawable-mdpi/dial_num_5_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_5_wht.png b/res/drawable-mdpi/dial_num_5_wht.png
new file mode 100644
index 0000000..e3c9940
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_5_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_6_blk.png b/res/drawable-mdpi/dial_num_6_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_6_blk.png
rename to res/drawable-mdpi/dial_num_6_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_6_wht.png b/res/drawable-mdpi/dial_num_6_wht.png
new file mode 100644
index 0000000..ab12781
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_6_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_7_blk.png b/res/drawable-mdpi/dial_num_7_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_7_blk.png
rename to res/drawable-mdpi/dial_num_7_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_7_wht.png b/res/drawable-mdpi/dial_num_7_wht.png
new file mode 100644
index 0000000..9e66205
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_7_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_8_blk.png b/res/drawable-mdpi/dial_num_8_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_8_blk.png
rename to res/drawable-mdpi/dial_num_8_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_8_wht.png b/res/drawable-mdpi/dial_num_8_wht.png
new file mode 100644
index 0000000..2af30fa
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_8_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_9_blk.png b/res/drawable-mdpi/dial_num_9_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_9_blk.png
rename to res/drawable-mdpi/dial_num_9_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_9_wht.png b/res/drawable-mdpi/dial_num_9_wht.png
new file mode 100644
index 0000000..1c99b61
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_9_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_pound_blk.png b/res/drawable-mdpi/dial_num_pound_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_pound_blk.png
rename to res/drawable-mdpi/dial_num_pound_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_pound_wht.png b/res/drawable-mdpi/dial_num_pound_wht.png
new file mode 100644
index 0000000..e17f2bf
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_pound_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/dial_num_star_blk.png b/res/drawable-mdpi/dial_num_star_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/dial_num_star_blk.png
rename to res/drawable-mdpi/dial_num_star_blk.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_num_star_wht.png b/res/drawable-mdpi/dial_num_star_wht.png
new file mode 100644
index 0000000..86113ed
--- /dev/null
+++ b/res/drawable-mdpi/dial_num_star_wht.png
Binary files differ
diff --git a/res/drawable-mdpi/directory_bg.9.png b/res/drawable-mdpi/directory_bg.9.png
new file mode 100644
index 0000000..80578cd
--- /dev/null
+++ b/res/drawable-mdpi/directory_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/directory_bg_holo.9.png b/res/drawable-mdpi/directory_bg_holo.9.png
new file mode 100644
index 0000000..7f7209d
--- /dev/null
+++ b/res/drawable-mdpi/directory_bg_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/divider_vertical_dark.9.png b/res/drawable-mdpi/divider_vertical_dark.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/divider_vertical_dark.9.png
rename to res/drawable-mdpi/divider_vertical_dark.9.png
Binary files differ
diff --git a/res/drawable-mdpi/filter_selector_corner.png b/res/drawable-mdpi/filter_selector_corner.png
new file mode 100644
index 0000000..964dd75
--- /dev/null
+++ b/res/drawable-mdpi/filter_selector_corner.png
Binary files differ
diff --git a/res/drawable-mdpi/group_membership_edit_background.9.png b/res/drawable-mdpi/group_membership_edit_background.9.png
new file mode 100644
index 0000000..36003cf
--- /dev/null
+++ b/res/drawable-mdpi/group_membership_edit_background.9.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_aggregated.png b/res/drawable-mdpi/ic_aggregated.png
new file mode 100644
index 0000000..7c2e2b0
--- /dev/null
+++ b/res/drawable-mdpi/ic_aggregated.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_round_less.png b/res/drawable-mdpi/ic_btn_round_less.png
new file mode 100644
index 0000000..a9b5bed
--- /dev/null
+++ b/res/drawable-mdpi/ic_btn_round_less.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_btn_round_more.png b/res/drawable-mdpi/ic_btn_round_more.png
new file mode 100644
index 0000000..ebdc55c
--- /dev/null
+++ b/res/drawable-mdpi/ic_btn_round_more.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_call_log_header_incoming_call.png b/res/drawable-mdpi/ic_call_log_header_incoming_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_call_log_header_incoming_call.png
rename to res/drawable-mdpi/ic_call_log_header_incoming_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_call_log_header_missed_call.png b/res/drawable-mdpi/ic_call_log_header_missed_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_call_log_header_missed_call.png
rename to res/drawable-mdpi/ic_call_log_header_missed_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_call_log_header_outgoing_call.png b/res/drawable-mdpi/ic_call_log_header_outgoing_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_call_log_header_outgoing_call.png
rename to res/drawable-mdpi/ic_call_log_header_outgoing_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_call_log_list_incoming_call.png b/res/drawable-mdpi/ic_call_log_list_incoming_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_call_log_list_incoming_call.png
rename to res/drawable-mdpi/ic_call_log_list_incoming_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_call_log_list_missed_call.png b/res/drawable-mdpi/ic_call_log_list_missed_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_call_log_list_missed_call.png
rename to res/drawable-mdpi/ic_call_log_list_missed_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_call_log_list_outgoing_call.png b/res/drawable-mdpi/ic_call_log_list_outgoing_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_call_log_list_outgoing_call.png
rename to res/drawable-mdpi/ic_call_log_list_outgoing_call.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_contact_list_filter_all.png b/res/drawable-mdpi/ic_contact_list_filter_all.png
new file mode 100644
index 0000000..67981a9
--- /dev/null
+++ b/res/drawable-mdpi/ic_contact_list_filter_all.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_contact_list_filter_custom.png b/res/drawable-mdpi/ic_contact_list_filter_custom.png
new file mode 100644
index 0000000..3f48be3
--- /dev/null
+++ b/res/drawable-mdpi/ic_contact_list_filter_custom.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_contact_list_filter_starred.png b/res/drawable-mdpi/ic_contact_list_filter_starred.png
new file mode 100755
index 0000000..a9bdb05
--- /dev/null
+++ b/res/drawable-mdpi/ic_contact_list_filter_starred.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_contact_list_picture.png b/res/drawable-mdpi/ic_contact_list_picture.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_contact_list_picture.png
rename to res/drawable-mdpi/ic_contact_list_picture.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_contact_picture.png b/res/drawable-mdpi/ic_contact_picture.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_contact_picture.png
rename to res/drawable-mdpi/ic_contact_picture.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_contact_picture_2.png b/res/drawable-mdpi/ic_contact_picture_2.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_contact_picture_2.png
rename to res/drawable-mdpi/ic_contact_picture_2.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_contact_picture_3.png b/res/drawable-mdpi/ic_contact_picture_3.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_contact_picture_3.png
rename to res/drawable-mdpi/ic_contact_picture_3.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_default_number.png b/res/drawable-mdpi/ic_default_number.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_default_number.png
rename to res/drawable-mdpi/ic_default_number.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dial_action_call.png b/res/drawable-mdpi/ic_dial_action_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dial_action_call.png
rename to res/drawable-mdpi/ic_dial_action_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dial_action_delete.png b/res/drawable-mdpi/ic_dial_action_delete.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dial_action_delete.png
rename to res/drawable-mdpi/ic_dial_action_delete.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dial_action_voice_mail.png b/res/drawable-mdpi/ic_dial_action_voice_mail.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dial_action_voice_mail.png
rename to res/drawable-mdpi/ic_dial_action_voice_mail.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dial_number_blk.png b/res/drawable-mdpi/ic_dial_number_blk.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dial_number_blk.png
rename to res/drawable-mdpi/ic_dial_number_blk.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dial_number_wht.png b/res/drawable-mdpi/ic_dial_number_wht.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dial_number_wht.png
rename to res/drawable-mdpi/ic_dial_number_wht.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dialer_fork_add_call.png b/res/drawable-mdpi/ic_dialer_fork_add_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dialer_fork_add_call.png
rename to res/drawable-mdpi/ic_dialer_fork_add_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dialer_fork_current_call.png b/res/drawable-mdpi/ic_dialer_fork_current_call.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dialer_fork_current_call.png
rename to res/drawable-mdpi/ic_dialer_fork_current_call.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_dialer_fork_tt_keypad.png b/res/drawable-mdpi/ic_dialer_fork_tt_keypad.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_dialer_fork_tt_keypad.png
rename to res/drawable-mdpi/ic_dialer_fork_tt_keypad.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_join.png b/res/drawable-mdpi/ic_join.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_join.png
rename to res/drawable-mdpi/ic_join.png
Binary files differ
diff --git a/res/drawable/ic_menu_2sec_pause.png b/res/drawable-mdpi/ic_menu_2sec_pause.png
similarity index 100%
rename from res/drawable/ic_menu_2sec_pause.png
rename to res/drawable-mdpi/ic_menu_2sec_pause.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_accounts_normal_holo.png b/res/drawable-mdpi/ic_menu_accounts_normal_holo.png
new file mode 100644
index 0000000..32e1d44
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_accounts_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_accounts_pressed_holo.png b/res/drawable-mdpi/ic_menu_accounts_pressed_holo.png
new file mode 100644
index 0000000..051bd5d
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_accounts_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_contact_normal_holo.png b/res/drawable-mdpi/ic_menu_add_contact_normal_holo.png
new file mode 100644
index 0000000..a881568
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_add_contact_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_add_contact_pressed_holo.png b/res/drawable-mdpi/ic_menu_add_contact_pressed_holo.png
new file mode 100644
index 0000000..0dd8682
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_add_contact_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_menu_add_picture.png b/res/drawable-mdpi/ic_menu_add_picture.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_menu_add_picture.png
rename to res/drawable-mdpi/ic_menu_add_picture.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_cancel_normal_holo.png b/res/drawable-mdpi/ic_menu_cancel_normal_holo.png
new file mode 100644
index 0000000..2de790f
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_cancel_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_cancel_pressed_holo.png b/res/drawable-mdpi/ic_menu_cancel_pressed_holo.png
new file mode 100644
index 0000000..0bd6a5c
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_cancel_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_compose_normal_holo.png b/res/drawable-mdpi/ic_menu_compose_normal_holo.png
new file mode 100644
index 0000000..2d58037
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_compose_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_compose_pressed_holo.png b/res/drawable-mdpi/ic_menu_compose_pressed_holo.png
new file mode 100644
index 0000000..c54be2b
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_compose_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_display_all.png b/res/drawable-mdpi/ic_menu_display_all.png
new file mode 100644
index 0000000..61a9e35
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_display_all.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_display_selected.png b/res/drawable-mdpi/ic_menu_display_selected.png
new file mode 100644
index 0000000..b4ec7a8
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_display_selected.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_done_normal_holo.png b/res/drawable-mdpi/ic_menu_done_normal_holo.png
new file mode 100644
index 0000000..f00a0fd
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_done_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_done_pressed_holo.png b/res/drawable-mdpi/ic_menu_done_pressed_holo.png
new file mode 100644
index 0000000..cc89b49
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_done_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_import_export_normal_holo.png b/res/drawable-mdpi/ic_menu_import_export_normal_holo.png
new file mode 100644
index 0000000..bf18852
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_import_export_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_import_export_pressed_holo.png b/res/drawable-mdpi/ic_menu_import_export_pressed_holo.png
new file mode 100644
index 0000000..b7c5547
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_import_export_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_merge_normal_holo.png b/res/drawable-mdpi/ic_menu_merge_normal_holo.png
new file mode 100644
index 0000000..79c92f9
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_merge_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_merge_pressed_holo.png b/res/drawable-mdpi/ic_menu_merge_pressed_holo.png
new file mode 100644
index 0000000..939014d
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_merge_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_select.png b/res/drawable-mdpi/ic_menu_select.png
new file mode 100644
index 0000000..29e3d7e
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_select.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_settings_normal_holo.png b/res/drawable-mdpi/ic_menu_settings_normal_holo.png
new file mode 100644
index 0000000..c5d6db2
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_settings_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_settings_pressed_holo.png b/res/drawable-mdpi/ic_menu_settings_pressed_holo.png
new file mode 100644
index 0000000..9d5299a
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_settings_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_share_normal_holo.png b/res/drawable-mdpi/ic_menu_share_normal_holo.png
new file mode 100644
index 0000000..200dc06
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_share_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_share_pressed_holo.png b/res/drawable-mdpi/ic_menu_share_pressed_holo.png
new file mode 100644
index 0000000..7eeee98
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_share_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_split_normal_holo.png b/res/drawable-mdpi/ic_menu_split_normal_holo.png
new file mode 100644
index 0000000..c061104
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_split_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_split_pressed_holo.png b/res/drawable-mdpi/ic_menu_split_pressed_holo.png
new file mode 100644
index 0000000..269d24d
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_split_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_trash_normal_holo.png b/res/drawable-mdpi/ic_menu_trash_normal_holo.png
new file mode 100644
index 0000000..7e354c1
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_trash_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_trash_pressed_holo.png b/res/drawable-mdpi/ic_menu_trash_pressed_holo.png
new file mode 100644
index 0000000..ee42881
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_trash_pressed_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_menu_unselect.png b/res/drawable-mdpi/ic_menu_unselect.png
new file mode 100644
index 0000000..2b69bc8
--- /dev/null
+++ b/res/drawable-mdpi/ic_menu_unselect.png
Binary files differ
diff --git a/res/drawable/ic_menu_wait.png b/res/drawable-mdpi/ic_menu_wait.png
similarity index 100%
rename from res/drawable/ic_menu_wait.png
rename to res/drawable-mdpi/ic_menu_wait.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_selected_contacts.png b/res/drawable-mdpi/ic_tab_selected_contacts.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_selected_contacts.png
rename to res/drawable-mdpi/ic_tab_selected_contacts.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_selected_dialer.png b/res/drawable-mdpi/ic_tab_selected_dialer.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_selected_dialer.png
rename to res/drawable-mdpi/ic_tab_selected_dialer.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_selected_friends_list.png b/res/drawable-mdpi/ic_tab_selected_friends_list.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_selected_friends_list.png
rename to res/drawable-mdpi/ic_tab_selected_friends_list.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_selected_recent.png b/res/drawable-mdpi/ic_tab_selected_recent.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_selected_recent.png
rename to res/drawable-mdpi/ic_tab_selected_recent.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_selected_starred.png b/res/drawable-mdpi/ic_tab_selected_starred.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_selected_starred.png
rename to res/drawable-mdpi/ic_tab_selected_starred.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_unselected_contacts.png b/res/drawable-mdpi/ic_tab_unselected_contacts.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_unselected_contacts.png
rename to res/drawable-mdpi/ic_tab_unselected_contacts.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_unselected_dialer.png b/res/drawable-mdpi/ic_tab_unselected_dialer.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_unselected_dialer.png
rename to res/drawable-mdpi/ic_tab_unselected_dialer.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_unselected_friends_list.png b/res/drawable-mdpi/ic_tab_unselected_friends_list.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_unselected_friends_list.png
rename to res/drawable-mdpi/ic_tab_unselected_friends_list.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_unselected_recent.png b/res/drawable-mdpi/ic_tab_unselected_recent.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_unselected_recent.png
rename to res/drawable-mdpi/ic_tab_unselected_recent.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/ic_tab_unselected_starred.png b/res/drawable-mdpi/ic_tab_unselected_starred.png
similarity index 100%
rename from res/drawable-mdpi-finger/ic_tab_unselected_starred.png
rename to res/drawable-mdpi/ic_tab_unselected_starred.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/infobar_dark.9.png b/res/drawable-mdpi/infobar_dark.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/infobar_dark.9.png
rename to res/drawable-mdpi/infobar_dark.9.png
Binary files differ
diff --git a/res/drawable-mdpi/list_item_activated_bg.9.png b/res/drawable-mdpi/list_item_activated_bg.9.png
new file mode 100644
index 0000000..dd82c22
--- /dev/null
+++ b/res/drawable-mdpi/list_item_activated_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi/list_item_divider.9.png b/res/drawable-mdpi/list_item_divider.9.png
new file mode 100644
index 0000000..60e2cb2
--- /dev/null
+++ b/res/drawable-mdpi/list_item_divider.9.png
Binary files differ
diff --git a/res/drawable-mdpi/list_item_divider_holo.9.png b/res/drawable-mdpi/list_item_divider_holo.9.png
new file mode 100644
index 0000000..f5130d5
--- /dev/null
+++ b/res/drawable-mdpi/list_item_divider_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/list_item_pressed_bg.9.png b/res/drawable-mdpi/list_item_pressed_bg.9.png
new file mode 100644
index 0000000..74d8e53
--- /dev/null
+++ b/res/drawable-mdpi/list_item_pressed_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_arrow_down.png b/res/drawable-mdpi/quickcontact_arrow_down.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_arrow_down.png
rename to res/drawable-mdpi/quickcontact_arrow_down.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_arrow_up.png b/res/drawable-mdpi/quickcontact_arrow_up.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_arrow_up.png
rename to res/drawable-mdpi/quickcontact_arrow_up.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_bottom_frame.9.png b/res/drawable-mdpi/quickcontact_bottom_frame.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_bottom_frame.9.png
rename to res/drawable-mdpi/quickcontact_bottom_frame.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_disambig_bottom_bg.9.png b/res/drawable-mdpi/quickcontact_disambig_bottom_bg.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_disambig_bottom_bg.9.png
rename to res/drawable-mdpi/quickcontact_disambig_bottom_bg.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_disambig_checkbox_off.png b/res/drawable-mdpi/quickcontact_disambig_checkbox_off.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_disambig_checkbox_off.png
rename to res/drawable-mdpi/quickcontact_disambig_checkbox_off.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_disambig_checkbox_on.png b/res/drawable-mdpi/quickcontact_disambig_checkbox_on.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_disambig_checkbox_on.png
rename to res/drawable-mdpi/quickcontact_disambig_checkbox_on.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_disambig_divider.9.png b/res/drawable-mdpi/quickcontact_disambig_divider.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_disambig_divider.9.png
rename to res/drawable-mdpi/quickcontact_disambig_divider.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_drop_shadow.9.png b/res/drawable-mdpi/quickcontact_drop_shadow.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_drop_shadow.9.png
rename to res/drawable-mdpi/quickcontact_drop_shadow.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_photo_frame.9.png b/res/drawable-mdpi/quickcontact_photo_frame.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_photo_frame.9.png
rename to res/drawable-mdpi/quickcontact_photo_frame.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_background.png b/res/drawable-mdpi/quickcontact_slider_background.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_background.png
rename to res/drawable-mdpi/quickcontact_slider_background.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_btn_normal.9.png b/res/drawable-mdpi/quickcontact_slider_btn_normal.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_btn_normal.9.png
rename to res/drawable-mdpi/quickcontact_slider_btn_normal.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_btn_on.9.png b/res/drawable-mdpi/quickcontact_slider_btn_on.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_btn_on.9.png
rename to res/drawable-mdpi/quickcontact_slider_btn_on.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_btn_pressed.9.png b/res/drawable-mdpi/quickcontact_slider_btn_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_btn_pressed.9.png
rename to res/drawable-mdpi/quickcontact_slider_btn_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_btn_selected.9.png b/res/drawable-mdpi/quickcontact_slider_btn_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_btn_selected.9.png
rename to res/drawable-mdpi/quickcontact_slider_btn_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_grip_left.png b/res/drawable-mdpi/quickcontact_slider_grip_left.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_grip_left.png
rename to res/drawable-mdpi/quickcontact_slider_grip_left.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_grip_right.png b/res/drawable-mdpi/quickcontact_slider_grip_right.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_grip_right.png
rename to res/drawable-mdpi/quickcontact_slider_grip_right.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_presence_active.png b/res/drawable-mdpi/quickcontact_slider_presence_active.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_presence_active.png
rename to res/drawable-mdpi/quickcontact_slider_presence_active.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_presence_away.png b/res/drawable-mdpi/quickcontact_slider_presence_away.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_presence_away.png
rename to res/drawable-mdpi/quickcontact_slider_presence_away.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_presence_busy.png b/res/drawable-mdpi/quickcontact_slider_presence_busy.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_presence_busy.png
rename to res/drawable-mdpi/quickcontact_slider_presence_busy.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_slider_presence_inactive.png b/res/drawable-mdpi/quickcontact_slider_presence_inactive.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_slider_presence_inactive.png
rename to res/drawable-mdpi/quickcontact_slider_presence_inactive.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/quickcontact_top_frame.9.png b/res/drawable-mdpi/quickcontact_top_frame.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/quickcontact_top_frame.9.png
rename to res/drawable-mdpi/quickcontact_top_frame.9.png
Binary files differ
diff --git a/res/drawable-mdpi/section_header.9.png b/res/drawable-mdpi/section_header.9.png
new file mode 100644
index 0000000..ac906cd
--- /dev/null
+++ b/res/drawable-mdpi/section_header.9.png
Binary files differ
diff --git a/res/drawable-mdpi/section_header_holo.9.png b/res/drawable-mdpi/section_header_holo.9.png
new file mode 100644
index 0000000..de12d0e
--- /dev/null
+++ b/res/drawable-mdpi/section_header_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/social_bubble.9.png b/res/drawable-mdpi/social_bubble.9.png
new file mode 100644
index 0000000..c9026eb
--- /dev/null
+++ b/res/drawable-mdpi/social_bubble.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/sym_action_add.png b/res/drawable-mdpi/sym_action_add.png
similarity index 100%
rename from res/drawable-mdpi-finger/sym_action_add.png
rename to res/drawable-mdpi/sym_action_add.png
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_audiochat.png b/res/drawable-mdpi/sym_action_audiochat.png
new file mode 100644
index 0000000..9bbaa37
--- /dev/null
+++ b/res/drawable-mdpi/sym_action_audiochat.png
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_email.png b/res/drawable-mdpi/sym_action_email.png
new file mode 100644
index 0000000..caf2c65
--- /dev/null
+++ b/res/drawable-mdpi/sym_action_email.png
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_map.png b/res/drawable-mdpi/sym_action_map.png
new file mode 100644
index 0000000..f34b2f5
--- /dev/null
+++ b/res/drawable-mdpi/sym_action_map.png
Binary files differ
diff --git a/res/drawable-mdpi/sym_action_videochat.png b/res/drawable-mdpi/sym_action_videochat.png
new file mode 100644
index 0000000..84e1b98
--- /dev/null
+++ b/res/drawable-mdpi/sym_action_videochat.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/sym_action_view_contact.png b/res/drawable-mdpi/sym_action_view_contact.png
similarity index 100%
rename from res/drawable-mdpi-finger/sym_action_view_contact.png
rename to res/drawable-mdpi/sym_action_view_contact.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_focused.9.png b/res/drawable-mdpi/tab_focused.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_focused.9.png
rename to res/drawable-mdpi/tab_focused.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_focused_bottom.9.png b/res/drawable-mdpi/tab_focused_bottom.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_focused_bottom.9.png
rename to res/drawable-mdpi/tab_focused_bottom.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_left_arrow.png b/res/drawable-mdpi/tab_left_arrow.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_left_arrow.png
rename to res/drawable-mdpi/tab_left_arrow.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_pressed.9.png b/res/drawable-mdpi/tab_pressed.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_pressed.9.png
rename to res/drawable-mdpi/tab_pressed.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_pressed_bottom.9.png b/res/drawable-mdpi/tab_pressed_bottom.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_pressed_bottom.9.png
rename to res/drawable-mdpi/tab_pressed_bottom.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_right_arrow.png b/res/drawable-mdpi/tab_right_arrow.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_right_arrow.png
rename to res/drawable-mdpi/tab_right_arrow.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_selected.9.png b/res/drawable-mdpi/tab_selected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_selected.9.png
rename to res/drawable-mdpi/tab_selected.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_selected_bottom.9.png b/res/drawable-mdpi/tab_selected_bottom.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_selected_bottom.9.png
rename to res/drawable-mdpi/tab_selected_bottom.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/tab_unselected.9.png b/res/drawable-mdpi/tab_unselected.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/tab_unselected.9.png
rename to res/drawable-mdpi/tab_unselected.9.png
Binary files differ
diff --git a/res/drawable-mdpi/temp_aizy_knob.png b/res/drawable-mdpi/temp_aizy_knob.png
new file mode 100644
index 0000000..daa8242
--- /dev/null
+++ b/res/drawable-mdpi/temp_aizy_knob.png
Binary files differ
diff --git a/res/drawable-mdpi/temp_type_selector_background.9.png b/res/drawable-mdpi/temp_type_selector_background.9.png
new file mode 100644
index 0000000..7f4f3fe
--- /dev/null
+++ b/res/drawable-mdpi/temp_type_selector_background.9.png
Binary files differ
diff --git a/res/drawable-mdpi/title_bar_medium.9.png b/res/drawable-mdpi/title_bar_medium.9.png
new file mode 100644
index 0000000..2d41d02
--- /dev/null
+++ b/res/drawable-mdpi/title_bar_medium.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/title_bar_shadow.9.png b/res/drawable-mdpi/title_bar_shadow.9.png
similarity index 100%
rename from res/drawable-mdpi-finger/title_bar_shadow.9.png
rename to res/drawable-mdpi/title_bar_shadow.9.png
Binary files differ
diff --git a/res/drawable/unknown_source.png b/res/drawable-mdpi/unknown_source.png
similarity index 100%
rename from res/drawable/unknown_source.png
rename to res/drawable-mdpi/unknown_source.png
Binary files differ
diff --git a/res/drawable-mdpi/view_bg.9.png b/res/drawable-mdpi/view_bg.9.png
new file mode 100644
index 0000000..b78c56d
--- /dev/null
+++ b/res/drawable-mdpi/view_bg.9.png
Binary files differ
diff --git a/res/drawable-xlarge-hdpi/panel_message.9.png b/res/drawable-xlarge-hdpi/panel_message.9.png
new file mode 100644
index 0000000..796a8fa
--- /dev/null
+++ b/res/drawable-xlarge-hdpi/panel_message.9.png
Binary files differ
diff --git a/res/drawable-xlarge-mdpi/panel_message.9.png b/res/drawable-xlarge-mdpi/panel_message.9.png
new file mode 100644
index 0000000..529c61d
--- /dev/null
+++ b/res/drawable-xlarge-mdpi/panel_message.9.png
Binary files differ
diff --git a/res/drawable-xlarge/contact_list_bg.png b/res/drawable-xlarge/contact_list_bg.png
new file mode 100644
index 0000000..ead9603
--- /dev/null
+++ b/res/drawable-xlarge/contact_list_bg.png
Binary files differ
diff --git a/res/drawable-xlarge/divider_vertical_dark.9.png b/res/drawable-xlarge/divider_vertical_dark.9.png
new file mode 100644
index 0000000..38b794b
--- /dev/null
+++ b/res/drawable-xlarge/divider_vertical_dark.9.png
Binary files differ
diff --git a/res/drawable-finger/btn_circle.xml b/res/drawable/btn_circle.xml
similarity index 100%
rename from res/drawable-finger/btn_circle.xml
rename to res/drawable/btn_circle.xml
diff --git a/res/drawable-finger/btn_contact_picture.xml b/res/drawable/btn_contact_picture.xml
similarity index 100%
rename from res/drawable-finger/btn_contact_picture.xml
rename to res/drawable/btn_contact_picture.xml
diff --git a/res/drawable-finger/btn_dial.xml b/res/drawable/btn_dial.xml
similarity index 100%
rename from res/drawable-finger/btn_dial.xml
rename to res/drawable/btn_dial.xml
diff --git a/res/drawable-finger/btn_dial_action.xml b/res/drawable/btn_dial_action.xml
similarity index 100%
rename from res/drawable-finger/btn_dial_action.xml
rename to res/drawable/btn_dial_action.xml
diff --git a/res/drawable-finger/btn_dial_delete.xml b/res/drawable/btn_dial_delete.xml
similarity index 100%
rename from res/drawable-finger/btn_dial_delete.xml
rename to res/drawable/btn_dial_delete.xml
diff --git a/res/drawable-finger/btn_dial_voicemail.xml b/res/drawable/btn_dial_voicemail.xml
similarity index 100%
rename from res/drawable-finger/btn_dial_voicemail.xml
rename to res/drawable/btn_dial_voicemail.xml
diff --git a/res/drawable/btn_minus.xml b/res/drawable/btn_minus.xml
new file mode 100644
index 0000000..78277f4
--- /dev/null
+++ b/res/drawable/btn_minus.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_window_focused="false" android:state_enabled="true"
+        android:drawable="@drawable/btn_minus_normal" />
+    <item android:state_window_focused="false" android:state_enabled="false"
+        android:drawable="@drawable/btn_minus_disabled" />
+    <item android:state_pressed="true" 
+        android:drawable="@drawable/btn_minus_pressed" />
+    <item android:state_focused="true" android:state_enabled="true"
+        android:drawable="@drawable/btn_minus_focused" />
+    <item android:state_enabled="true"
+        android:drawable="@drawable/btn_minus_normal" />
+    <item android:state_focused="true"
+        android:drawable="@drawable/btn_minus_disabled_focused" />
+    <item
+         android:drawable="@drawable/btn_minus_disabled" />
+</selector>
diff --git a/res/drawable/btn_plus.xml b/res/drawable/btn_plus.xml
new file mode 100644
index 0000000..33a7f53
--- /dev/null
+++ b/res/drawable/btn_plus.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_window_focused="false" android:state_enabled="true"
+        android:drawable="@drawable/btn_plus_normal" />
+    <item android:state_window_focused="false" android:state_enabled="false"
+        android:drawable="@drawable/btn_plus_disabled" />
+    <item android:state_pressed="true" 
+        android:drawable="@drawable/btn_plus_pressed" />
+    <item android:state_focused="true" android:state_enabled="true"
+        android:drawable="@drawable/btn_plus_focused" />
+    <item android:state_enabled="true"
+        android:drawable="@drawable/btn_plus_normal" />
+    <item android:state_focused="true"
+        android:drawable="@drawable/btn_plus_disabled_focused" />
+    <item
+         android:drawable="@drawable/btn_plus_disabled" />
+</selector>
diff --git a/res/drawable-finger/dial_num_0.xml b/res/drawable/dial_num_0.xml
similarity index 100%
rename from res/drawable-finger/dial_num_0.xml
rename to res/drawable/dial_num_0.xml
diff --git a/res/drawable-finger/dial_num_1_no_vm.xml b/res/drawable/dial_num_1_no_vm.xml
similarity index 100%
rename from res/drawable-finger/dial_num_1_no_vm.xml
rename to res/drawable/dial_num_1_no_vm.xml
diff --git a/res/drawable-finger/dial_num_2.xml b/res/drawable/dial_num_2.xml
similarity index 100%
rename from res/drawable-finger/dial_num_2.xml
rename to res/drawable/dial_num_2.xml
diff --git a/res/drawable-finger/dial_num_3.xml b/res/drawable/dial_num_3.xml
similarity index 100%
rename from res/drawable-finger/dial_num_3.xml
rename to res/drawable/dial_num_3.xml
diff --git a/res/drawable-finger/dial_num_4.xml b/res/drawable/dial_num_4.xml
similarity index 100%
rename from res/drawable-finger/dial_num_4.xml
rename to res/drawable/dial_num_4.xml
diff --git a/res/drawable-finger/dial_num_5.xml b/res/drawable/dial_num_5.xml
similarity index 100%
rename from res/drawable-finger/dial_num_5.xml
rename to res/drawable/dial_num_5.xml
diff --git a/res/drawable-finger/dial_num_6.xml b/res/drawable/dial_num_6.xml
similarity index 100%
rename from res/drawable-finger/dial_num_6.xml
rename to res/drawable/dial_num_6.xml
diff --git a/res/drawable-finger/dial_num_7.xml b/res/drawable/dial_num_7.xml
similarity index 100%
rename from res/drawable-finger/dial_num_7.xml
rename to res/drawable/dial_num_7.xml
diff --git a/res/drawable-finger/dial_num_8.xml b/res/drawable/dial_num_8.xml
similarity index 100%
rename from res/drawable-finger/dial_num_8.xml
rename to res/drawable/dial_num_8.xml
diff --git a/res/drawable-finger/dial_num_9.xml b/res/drawable/dial_num_9.xml
similarity index 100%
rename from res/drawable-finger/dial_num_9.xml
rename to res/drawable/dial_num_9.xml
diff --git a/res/drawable-finger/dial_num_pound.xml b/res/drawable/dial_num_pound.xml
similarity index 100%
rename from res/drawable-finger/dial_num_pound.xml
rename to res/drawable/dial_num_pound.xml
diff --git a/res/drawable-finger/dial_num_star.xml b/res/drawable/dial_num_star.xml
similarity index 100%
rename from res/drawable-finger/dial_num_star.xml
rename to res/drawable/dial_num_star.xml
diff --git a/res/drawable/filter_selector_background.xml b/res/drawable/filter_selector_background.xml
new file mode 100644
index 0000000..16464f6
--- /dev/null
+++ b/res/drawable/filter_selector_background.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@color/filter_selector_selected_background" />
+    <item android:drawable="@android:color/transparent"/>
+</selector>
diff --git a/res/drawable/ic_menu_accounts.xml b/res/drawable/ic_menu_accounts.xml
new file mode 100644
index 0000000..5ae423a
--- /dev/null
+++ b/res/drawable/ic_menu_accounts.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_accounts_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_accounts_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_add_contact.xml b/res/drawable/ic_menu_add_contact.xml
new file mode 100644
index 0000000..4a6c7d9
--- /dev/null
+++ b/res/drawable/ic_menu_add_contact.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true"
+        android:drawable="@drawable/ic_menu_add_contact_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_add_contact_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_cancel.xml b/res/drawable/ic_menu_cancel.xml
new file mode 100644
index 0000000..c528dac
--- /dev/null
+++ b/res/drawable/ic_menu_cancel.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true"
+        android:drawable="@drawable/ic_menu_cancel_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_cancel_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_compose.xml b/res/drawable/ic_menu_compose.xml
new file mode 100644
index 0000000..c53fbdc
--- /dev/null
+++ b/res/drawable/ic_menu_compose.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_compose_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_compose_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_done.xml b/res/drawable/ic_menu_done.xml
new file mode 100644
index 0000000..7674e1e
--- /dev/null
+++ b/res/drawable/ic_menu_done.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_done_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_done_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_import_export.xml b/res/drawable/ic_menu_import_export.xml
new file mode 100644
index 0000000..1167ea1
--- /dev/null
+++ b/res/drawable/ic_menu_import_export.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true"
+        android:drawable="@drawable/ic_menu_import_export_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_import_export_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_merge.xml b/res/drawable/ic_menu_merge.xml
new file mode 100644
index 0000000..329f573
--- /dev/null
+++ b/res/drawable/ic_menu_merge.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_merge_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_merge_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_settings.xml b/res/drawable/ic_menu_settings.xml
new file mode 100644
index 0000000..4e21d05
--- /dev/null
+++ b/res/drawable/ic_menu_settings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_settings_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_settings_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_share.xml b/res/drawable/ic_menu_share.xml
new file mode 100644
index 0000000..ff6f2b9
--- /dev/null
+++ b/res/drawable/ic_menu_share.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_share_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_share_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_split.xml b/res/drawable/ic_menu_split.xml
new file mode 100644
index 0000000..4a88455
--- /dev/null
+++ b/res/drawable/ic_menu_split.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_split_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_split_normal_holo" />
+</selector>
diff --git a/res/drawable/ic_menu_trash.xml b/res/drawable/ic_menu_trash.xml
new file mode 100644
index 0000000..e383ded
--- /dev/null
+++ b/res/drawable/ic_menu_trash.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_menu_trash_pressed_holo" />
+    <item android:drawable="@drawable/ic_menu_trash_normal_holo" />
+</selector>
diff --git a/res/drawable-finger/ic_tab_contacts.xml b/res/drawable/ic_tab_contacts.xml
similarity index 100%
rename from res/drawable-finger/ic_tab_contacts.xml
rename to res/drawable/ic_tab_contacts.xml
diff --git a/res/drawable-finger/ic_tab_dialer.xml b/res/drawable/ic_tab_dialer.xml
similarity index 100%
rename from res/drawable-finger/ic_tab_dialer.xml
rename to res/drawable/ic_tab_dialer.xml
diff --git a/res/drawable-finger/ic_tab_recent.xml b/res/drawable/ic_tab_recent.xml
similarity index 100%
rename from res/drawable-finger/ic_tab_recent.xml
rename to res/drawable/ic_tab_recent.xml
diff --git a/res/drawable-finger/ic_tab_starred.xml b/res/drawable/ic_tab_starred.xml
similarity index 100%
rename from res/drawable-finger/ic_tab_starred.xml
rename to res/drawable/ic_tab_starred.xml
diff --git a/res/drawable-finger/quickcontact_disambig_checkbox.xml b/res/drawable/quickcontact_disambig_checkbox.xml
similarity index 100%
rename from res/drawable-finger/quickcontact_disambig_checkbox.xml
rename to res/drawable/quickcontact_disambig_checkbox.xml
diff --git a/res/drawable-finger/quickcontact_slider_btn.xml b/res/drawable/quickcontact_slider_btn.xml
similarity index 100%
rename from res/drawable-finger/quickcontact_slider_btn.xml
rename to res/drawable/quickcontact_slider_btn.xml
diff --git a/res/drawable-finger/tab_bottom.xml b/res/drawable/tab_bottom.xml
similarity index 100%
rename from res/drawable-finger/tab_bottom.xml
rename to res/drawable/tab_bottom.xml
diff --git a/res/drawable-finger/tab_indicator_bg.xml b/res/drawable/tab_indicator_bg.xml
similarity index 100%
rename from res/drawable-finger/tab_indicator_bg.xml
rename to res/drawable/tab_indicator_bg.xml
diff --git a/res/layout-finger/contacts_list_content.xml b/res/layout-finger/contacts_list_content.xml
deleted file mode 100644
index 36c03ce..0000000
--- a/res/layout-finger/contacts_list_content.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<LinearLayout 
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/pinned_header_list_layout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        >
-
-    <view
-        class="com.android.contacts.PinnedHeaderListView" 
-        android:id="@android:id/list"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:fastScrollEnabled="true"
-    />
-
-    <include layout="@layout/contacts_list_empty"/>
-
-</LinearLayout>
diff --git a/res/layout-finger/contacts_list_content_join.xml b/res/layout-finger/contacts_list_content_join.xml
deleted file mode 100644
index b50713b..0000000
--- a/res/layout-finger/contacts_list_content_join.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical">
-
-    <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content" 
-            android:orientation="horizontal"
-            android:background="@*android:drawable/title_bar_medium"
-            android:paddingLeft="5dip"
-            android:paddingRight="5dip"
-            android:gravity="center_vertical"
-            >
-    
-        <ImageView
-            android:layout_width="48dip"
-            android:layout_height="48dip"
-            android:src="@drawable/ic_join"
-            android:gravity="center"
-            android:scaleType="fitCenter"
-        />
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical"
-            android:paddingLeft="10dip">
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:text="@string/titleJoinContactDataWith"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:shadowColor="#BB000000"
-                android:shadowRadius="2.75"
-            />
-            <TextView
-                android:id="@+id/join_contact_blurb"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="-2dip"
-                android:maxLines="2"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-            />
-        </LinearLayout>
-    </LinearLayout>
-
-    <ListView android:id="@android:id/list"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:fastScrollEnabled="true"
-    />
-</LinearLayout>
-
diff --git a/res/layout-finger/contacts_list_empty.xml b/res/layout-finger/contacts_list_empty.xml
deleted file mode 100644
index 195da1e..0000000
--- a/res/layout-finger/contacts_list_empty.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-<ScrollView 
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@android:id/empty"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:fillViewport="true"
->
-    <LinearLayout 
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:orientation="vertical">
-      
-      <TextView android:id="@+id/emptyText"
-          android:layout_width="match_parent"
-          android:layout_height="wrap_content"
-          android:text="@string/noContacts"
-          android:textSize="20sp"
-          android:textColor="?android:attr/textColorSecondary"
-          android:paddingLeft="10dip"
-          android:paddingRight="10dip"
-          android:paddingTop="10dip"
-          android:lineSpacingMultiplier="0.92"
-      />
-      
-      <LinearLayout android:id="@+id/import_failure"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:gravity="fill_horizontal"
-        android:padding="20dip"
-        android:visibility="gone">
-        
-        <Button
-            android:id="@+id/import_failure_uninstall_apps"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"            
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="@string/upgrade_out_of_memory_uninstall"/>
-            
-        <Button
-            android:id="@+id/import_failure_retry_upgrade"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="10dip"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:text="@string/upgrade_out_of_memory_retry"/>
-      </LinearLayout>
-    </LinearLayout>
-</ScrollView>
diff --git a/res/layout-finger/contacts_list_search_results.xml b/res/layout-finger/contacts_list_search_results.xml
deleted file mode 100644
index 244ca80..0000000
--- a/res/layout-finger/contacts_list_search_results.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<LinearLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/pinned_header_list_layout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        >
-
-    <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical"
-            android:background="@*android:drawable/title_bar_medium"
-            android:paddingLeft="10dip"
-            android:paddingRight="10dip"
-            android:gravity="center_vertical"
-            >
-
-        <TextView
-            android:id="@+id/search_results_for"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@string/titleJoinContactDataWith"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:shadowColor="#BB000000"
-            android:shadowRadius="2.75"
-        />
-
-        <TextView
-            android:id="@+id/search_results_found"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="-2dip"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-        />
-
-    </LinearLayout>
-
-    <view
-        class="com.android.contacts.PinnedHeaderListView"
-        android:id="@android:id/list"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:fastScrollEnabled="true"
-    />
-
-    <include layout="@layout/contacts_list_empty"/>
-
-</LinearLayout>
diff --git a/res/layout-finger/contacts_search_content.xml b/res/layout-finger/contacts_search_content.xml
deleted file mode 100644
index ae72376..0000000
--- a/res/layout-finger/contacts_search_content.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<LinearLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/pinned_header_list_layout"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:background="@color/translucent_search_background"
-        >
-
-    <include android:id="@+id/searchView"
-        layout="@layout/search_bar"/>
-
-    <ListView
-        android:id="@android:id/list"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:fastScrollEnabled="true"
-        android:background="@android:color/background_dark"
-    />
-
-    <!-- Transparent filler -->
-    <View android:id="@android:id/empty"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-    />
-</LinearLayout>
diff --git a/res/layout-finger/list_item_text_icons.xml b/res/layout-finger/list_item_text_icons.xml
deleted file mode 100644
index 69e064e..0000000
--- a/res/layout-finger/list_item_text_icons.xml
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright 2009, 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:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeight"
-    android:orientation="horizontal"
-    android:paddingLeft="9dip"
-    android:gravity="center_vertical"
->
-
-    <LinearLayout
-        android:layout_width="0dip"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:layout_marginLeft="5dip"
-        android:orientation="vertical"
-        android:paddingTop="5dip"
-        android:paddingBottom="7dip"
-        android:gravity="center_vertical"
-    >
-
-        <TextView android:id="@android:id/text1"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-        />
-
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-        >
-            
-            <TextView android:id="@android:id/text2"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-            />
-    
-            <ImageView android:id="@+id/primary_icon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:paddingLeft="3dip"
-                android:src="@drawable/ic_default_number"
-            />
-
-        </LinearLayout>
-
-        <TextView
-            android:id="@+id/footer"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:visibility="gone" />
-
-    </LinearLayout>
-
-    <ImageView android:id="@+id/presence_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="5dip"
-        android:gravity="center"
-        android:scaleType="centerInside"
-    />
-
-    <ImageView android:id="@+id/action_icon"
-        android:layout_width="30dip"
-        android:layout_height="30dip"
-        android:layout_marginLeft="14dip"
-        android:layout_marginRight="14dip"
-        android:gravity="center"
-        android:scaleType="centerInside"
-    />
-    
-    <View android:id="@+id/divider"
-        android:layout_width="1px"
-        android:layout_height="match_parent"
-        android:layout_marginTop="5dip"
-        android:layout_marginBottom="5dip"
-        android:background="@drawable/divider_vertical_dark"
-    />
-
-    <ImageView android:id="@+id/secondary_action_button"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:layout_centerVertical="true"
-        android:paddingLeft="14dip"
-        android:paddingRight="14dip"
-        android:gravity="center"
-        android:scaleType="center"
-        android:background="@android:drawable/list_selector_background"
-    />
-
-</LinearLayout>
diff --git a/res/layout-finger/list_section.xml b/res/layout-finger/list_section.xml
deleted file mode 100644
index f7ba693..0000000
--- a/res/layout-finger/list_section.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<!-- Layout used for list section separators. -->
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="25dip"
-    android:background="@*android:drawable/dark_header"
-    >
-    <TextView
-        android:id="@+id/header_text"
-        android:layout_width="56dip"
-        android:layout_height="wrap_content"
-        android:layout_centerVertical="true"
-        android:layout_alignParentLeft="true"
-        android:textStyle="bold"
-        android:textColor="@*android:color/dim_foreground_dark"
-        android:textSize="14sp"
-        android:gravity="center"
-    />
-</RelativeLayout>
diff --git a/res/layout-finger/quickcontact.xml b/res/layout-finger/quickcontact.xml
deleted file mode 100644
index 340ca3f..0000000
--- a/res/layout-finger/quickcontact.xml
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<view
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    class="com.android.contacts.ui.QuickContactWindow$RootLayout"
-    android:id="@+id/root"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:paddingLeft="@dimen/quickcontact_shadow_horiz"
-    android:paddingRight="@dimen/quickcontact_shadow_horiz"
-    android:background="@drawable/quickcontact_drop_shadow">
-
-    <FrameLayout
-        android:id="@+id/header"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dip">
-
-        <ViewStub
-            android:id="@+id/header_small"
-            android:inflatedId="@+id/header_small"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout="@layout/quickcontact_header_small" />
-
-        <ViewStub
-            android:id="@+id/header_medium"
-            android:inflatedId="@+id/header_medium"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout="@layout/quickcontact_header_med" />
-
-        <ViewStub
-            android:id="@+id/header_large"
-            android:inflatedId="@+id/header_large"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout="@layout/quickcontact_header_large" />
-
-    </FrameLayout>
-
-    <HorizontalScrollView
-        android:id="@+id/scroll"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/header"
-        android:fadingEdgeLength="0dip"
-        android:background="@drawable/quickcontact_slider_background"
-        android:scrollbars="none">
-
-        <LinearLayout
-            android:id="@+id/quickcontact"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingTop="4dip"
-            android:paddingBottom="4dip"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:src="@drawable/quickcontact_slider_grip_left" />
-
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:src="@drawable/quickcontact_slider_grip_right" />
-
-        </LinearLayout>
-
-    </HorizontalScrollView>
-
-    <FrameLayout
-        android:id="@+id/footer"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/scroll"
-        android:background="@drawable/quickcontact_bottom_frame" />
-
-    <LinearLayout
-        android:id="@+id/footer_disambig"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@id/scroll"
-        android:background="@drawable/quickcontact_disambig_bottom_bg"
-        android:orientation="vertical"
-        android:visibility="gone">
-
-        <ListView
-            android:id="@android:id/list"
-            android:layout_width="match_parent"
-            android:layout_height="0dip"
-            android:layout_weight="1"
-            android:background="@color/quickcontact_disambig"
-            android:divider="@drawable/quickcontact_disambig_divider"
-            android:cacheColorHint="@null" />
-
-        <CheckBox
-            android:id="@android:id/checkbox"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="19dip"
-            android:layout_marginRight="19dip"
-            android:minHeight="60dip"
-            android:textColor="#f000"
-            android:textStyle="bold"
-            android:text="@string/quickcontact_remember_choice"
-            android:textAppearance="?android:attr/textAppearanceSmallInverse"
-            android:button="@drawable/quickcontact_disambig_checkbox" />
-
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/arrow_up"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:src="@drawable/quickcontact_arrow_up" />
-
-    <ImageView
-        android:id="@+id/arrow_down"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="-1dip"
-        android:layout_below="@id/footer"
-        android:src="@drawable/quickcontact_arrow_down" />
-
-    <ImageView
-        android:id="@+id/arrow_down_stub"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="-1dip"
-        android:layout_below="@id/footer_disambig"
-        android:visibility="invisible"
-        android:src="@drawable/quickcontact_arrow_down" />
-
-</view>
diff --git a/res/layout-finger/quickcontact_item.xml b/res/layout-finger/quickcontact_item.xml
deleted file mode 100644
index 8580ac5..0000000
--- a/res/layout-finger/quickcontact_item.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<com.android.contacts.ui.widget.CheckableImageView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="59dip"
-    android:layout_height="51dip"
-    android:paddingLeft="12dip"
-    android:paddingRight="12dip"
-    android:paddingTop="8dip"
-    android:paddingBottom="8dip"
-    android:scaleType="centerInside"
-    android:focusable="true"
-    android:clickable="true"
-    android:background="@drawable/quickcontact_slider_btn" />
diff --git a/res/layout-finger/recent_calls_list_child_item.xml b/res/layout-finger/recent_calls_list_child_item.xml
deleted file mode 100644
index 14eb24d..0000000
--- a/res/layout-finger/recent_calls_list_child_item.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
-    android:paddingLeft="7dip"
-    android:background="@drawable/list_item_background_secondary"
->
-
-    <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:paddingLeft="14dip"
-        android:paddingRight="14dip"
-        android:layout_alignParentRight="true"
-
-        android:gravity="center_vertical"
-        android:src="@android:drawable/sym_action_call"
-        android:background="@drawable/call_background_secondary"
-    />
-
-    <include layout="@layout/recent_calls_list_item_layout"/>
-
-</RelativeLayout>
diff --git a/res/layout-finger/recent_calls_list_group_item.xml b/res/layout-finger/recent_calls_list_group_item.xml
deleted file mode 100644
index 79e7bb9..0000000
--- a/res/layout-finger/recent_calls_list_group_item.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
-    android:paddingLeft="7dip"
->
-
-    <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:paddingLeft="14dip"
-        android:paddingRight="14dip"
-        android:layout_alignParentRight="true"
-
-        android:gravity="center_vertical"
-        android:src="@android:drawable/sym_action_call"
-        android:background="@drawable/call_background"
-    />
-
-    <View android:id="@+id/divider"
-        android:layout_width="1px"
-        android:layout_height="match_parent"
-        android:layout_marginTop="5dip"
-        android:layout_marginBottom="5dip"
-        android:layout_toLeftOf="@id/call_icon"
-        android:layout_marginLeft="11dip"
-        android:background="@drawable/divider_vertical_dark"
-    />
-
-    <TextView android:id="@+id/date"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_toLeftOf="@id/divider"
-        android:layout_alignParentBottom="true"
-        android:layout_marginBottom="8dip"
-        android:layout_marginLeft="10dip"
-
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:singleLine="true"
-    />
-
-    <TextView android:id="@+id/label"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentBottom="true"
-        android:layout_marginLeft="36dip"
-        android:layout_marginRight="5dip"
-        android:layout_alignBaseline="@id/date"
-
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:textStyle="bold"
-    />
-
-    <TextView android:id="@+id/number"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_toRightOf="@id/label"
-        android:layout_toLeftOf="@id/date"
-        android:layout_alignBaseline="@id/label"
-        android:layout_alignWithParentIfMissing="true"
-
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-    />
-
-    <TextView android:id="@+id/groupSize"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_toLeftOf="@id/divider"
-        android:layout_above="@id/date"
-        android:layout_alignWithParentIfMissing="true"
-        android:layout_marginBottom="-10dip"
-
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:singleLine="true"
-        android:gravity="center_vertical"
-    />
-
-    <TextView android:id="@+id/line1"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentLeft="true"
-        android:layout_alignParentTop="true"
-        android:layout_toLeftOf="@+id/groupSize"
-        android:layout_above="@id/date"
-        android:layout_alignWithParentIfMissing="true"
-        android:layout_marginLeft="36dip"
-        android:layout_marginBottom="-10dip"
-
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:gravity="center_vertical"
-    />
-
-    <ImageView
-        android:id="@+id/groupIndicator"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentLeft="true"
-        android:layout_centerVertical="true"
-        android:src="@*android:drawable/expander_ic_minimized"
-        android:gravity="center_vertical"
-    />
-</RelativeLayout>
diff --git a/res/layout-finger/recent_calls_list_item.xml b/res/layout-finger/recent_calls_list_item.xml
deleted file mode 100644
index 8efa23c..0000000
--- a/res/layout-finger/recent_calls_list_item.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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.
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
-    android:paddingLeft="7dip"
->
-
-    <com.android.contacts.ui.widget.DontPressWithParentImageView android:id="@+id/call_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:paddingLeft="14dip"
-        android:paddingRight="14dip"
-        android:layout_alignParentRight="true"
-
-        android:gravity="center_vertical"
-        android:src="@android:drawable/sym_action_call"
-        android:background="@drawable/call_background"
-    />
-
-    <include layout="@layout/recent_calls_list_item_layout"/>
-
-</RelativeLayout>
diff --git a/res/layout-finger/search_bar.xml b/res/layout-finger/search_bar.xml
deleted file mode 100644
index d322948..0000000
--- a/res/layout-finger/search_bar.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/search_bar"
-    android:layout_width="match_parent"
-    android:layout_height="64dip"
-    android:orientation="vertical"
-    android:focusable="true"
-    android:descendantFocusability="afterDescendants"
-    android:background="@drawable/bg_blk_search_contact">
-
-    <!-- Outer layout defines the entire search bar at the top of the screen -->
-    <LinearLayout
-        android:id="@+id/search_plate"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:paddingLeft="4dip"
-        android:paddingRight="10dip"
-        android:paddingTop="6dip"
-        android:paddingBottom="0dip"        
-        >
-
-        <!-- Inner layout contains the app icon, button(s) and EditText -->
-        <LinearLayout
-            android:id="@+id/search_edit_frame"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal">
-
-            <ImageView 
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content" 
-                android:src="@drawable/ic_launcher_contacts"
-                android:layout_marginRight="7dip"
-                android:layout_gravity="center_vertical"
-                android:scaleType="centerInside" />
-              
-            <view
-                class="com.android.contacts.SearchEditText"
-                android:id="@+id/search_src_text"
-                android:layout_height="wrap_content"
-                android:layout_width="0dip"
-                android:layout_weight="1.0"
-                android:layout_marginLeft="4dip"
-                android:layout_marginBottom="0dip"
-                android:singleLine="true"
-                android:ellipsize="end"
-                android:inputType="textNoSuggestions"
-                android:imeOptions="flagNoExtractUi"
-                android:hint="@string/search_bar_hint"
-                android:drawableRight="@drawable/magnifying_glass"
-                android:freezesText="true"
-            />
-        </LinearLayout>
-        
-    </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout-land-finger/twelve_key_dialer.xml b/res/layout-land/twelve_key_dialer.xml
similarity index 100%
rename from res/layout-land-finger/twelve_key_dialer.xml
rename to res/layout-land/twelve_key_dialer.xml
diff --git a/res/layout-long-land-finger/twelve_key_dialer.xml b/res/layout-long-land/twelve_key_dialer.xml
similarity index 100%
rename from res/layout-long-land-finger/twelve_key_dialer.xml
rename to res/layout-long-land/twelve_key_dialer.xml
diff --git a/res/layout-long-finger/dialpad.xml b/res/layout-long/dialpad.xml
similarity index 100%
rename from res/layout-long-finger/dialpad.xml
rename to res/layout-long/dialpad.xml
diff --git a/res/layout-long-finger/twelve_key_dialer.xml b/res/layout-long/twelve_key_dialer.xml
similarity index 100%
rename from res/layout-long-finger/twelve_key_dialer.xml
rename to res/layout-long/twelve_key_dialer.xml
diff --git a/res/layout-long-finger/voicemail_dial_delete.xml b/res/layout-long/voicemail_dial_delete.xml
similarity index 100%
rename from res/layout-long-finger/voicemail_dial_delete.xml
rename to res/layout-long/voicemail_dial_delete.xml
diff --git a/res/layout-xlarge/aggregation_suggestions.xml b/res/layout-xlarge/aggregation_suggestions.xml
new file mode 100644
index 0000000..81b4edd
--- /dev/null
+++ b/res/layout-xlarge/aggregation_suggestions.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ */
+-->
+
+<com.android.contacts.widget.InterpolatingLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingBottom="20dip">
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:background="@drawable/aggregation_suggestions_bg_light_holo"
+        android:minWidth="100dip"
+        android:paddingBottom="10dip"
+        ex:layout_narrowParentWidth="600dip"
+        ex:layout_narrowWidth="400dip"
+        ex:layout_wideParentWidth="300dip"
+        ex:layout_wideWidth="240dip">
+        <TextView
+            android:id="@+id/aggregation_suggestion_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentLeft="true"
+            android:layout_marginLeft="5dip"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="?android:attr/textColorTertiary"
+            android:textStyle="bold" />
+
+        <LinearLayout
+            android:id="@+id/aggregation_suggestions"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical" />
+    </LinearLayout>
+</com.android.contacts.widget.InterpolatingLayout>
\ No newline at end of file
diff --git a/res/layout-xlarge/aggregation_suggestions_item.xml b/res/layout-xlarge/aggregation_suggestions_item.xml
new file mode 100644
index 0000000..865c492
--- /dev/null
+++ b/res/layout-xlarge/aggregation_suggestions_item.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ */
+-->
+
+<view xmlns:android="http://schemas.android.com/apk/res/android"
+    class="com.android.contacts.views.editor.AggregationSuggestionView"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:paddingLeft="5dip"
+    android:paddingRight="15dip"
+>
+    <Button
+        android:id="@+id/aggregation_suggestion_join_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/aggregation_suggestion_join_button"
+        android:layout_centerInParent="true"
+        android:layout_alignParentRight="true"
+    />
+
+    <Button
+        android:id="@+id/aggregation_suggestion_edit_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/aggregation_suggestion_edit_button"
+        android:layout_centerInParent="true"
+        android:layout_alignParentRight="true"
+    />
+
+    <ImageView
+        android:id="@+id/aggregation_suggestion_photo"
+        android:layout_width="@dimen/aggregation_suggestion_icon_size"
+        android:layout_height="@dimen/aggregation_suggestion_icon_size"
+        android:layout_alignParentLeft="true"
+        android:layout_centerInParent="true"
+        android:layout_marginTop="4dip"
+        android:scaleType="fitCenter"
+    />
+
+    <TextView
+        android:id="@+id/aggregation_suggestion_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toRightOf="@id/aggregation_suggestion_photo"
+        android:layout_toLeftOf="@id/aggregation_suggestion_join_button"
+        android:layout_marginLeft="10dip"
+        android:layout_marginTop="4dip"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="?android:attr/textColorSecondary"
+    />
+
+    <TextView
+        android:id="@+id/aggregation_suggestion_data"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toRightOf="@id/aggregation_suggestion_photo"
+        android:layout_toLeftOf="@id/aggregation_suggestion_join_button"
+        android:layout_below="@id/aggregation_suggestion_name"
+        android:layout_marginLeft="10dip"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="?android:attr/textColorSecondary"
+    />
+</view>
diff --git a/res/layout-xlarge/contact_browser.xml b/res/layout-xlarge/contact_browser.xml
new file mode 100644
index 0000000..b04fab0
--- /dev/null
+++ b/res/layout-xlarge/contact_browser.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<com.android.contacts.widget.InterpolatingLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:id="@+id/two_pane_activity"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:splitMotionEvents="true">
+
+    <FrameLayout
+        android:id="@+id/list_container"
+        android:layout_height="match_parent"
+        android:layout_width="wrap_content"
+        android:minWidth="100dip"
+        ex:layout_narrowParentWidth="800dip"
+        ex:layout_narrowWidth="310dip"
+        ex:layout_wideParentWidth="1280dip"
+        ex:layout_wideWidth="430dip"
+    />
+
+    <!--  Holder for detail- or editor-fragment. -->
+    <FrameLayout
+        android:id="@+id/detail_container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:paddingBottom="48dip"
+        ex:layout_narrowParentWidth="800dip"
+        ex:layout_narrowRightMargin="0dip"
+        ex:layout_wideParentWidth="1280dip"
+        ex:layout_wideRightMargin="48dip"
+        />
+
+</com.android.contacts.widget.InterpolatingLayout>
diff --git a/res/layout-xlarge/contact_detail_fragment.xml b/res/layout-xlarge/contact_detail_fragment.xml
new file mode 100644
index 0000000..b01789e
--- /dev/null
+++ b/res/layout-xlarge/contact_detail_fragment.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:id="@+id/contact_detail"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/panel_message">
+
+    <!-- Header View (including social status) -->
+    <com.android.contacts.widget.InterpolatingLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <com.android.contacts.views.detail.ContactDetailHeaderView
+            android:id="@+id/contact_header_widget"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            ex:layout_wideParentWidth="800dip"
+            ex:layout_wideLeftMargin="80dip"
+            ex:layout_narrowParentWidth="500dip"
+            ex:layout_narrowLeftMargin="15dip"
+        />
+    </com.android.contacts.widget.InterpolatingLayout>
+
+    <!-- Placeholder for empty list -->
+    <com.android.contacts.widget.InterpolatingLayout
+        android:id="@android:id/empty"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:visibility="gone">
+        <TextView android:id="@+id/emptyText"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/no_contact_details"
+            android:textSize="20sp"
+            android:textColor="?android:attr/textColorSecondary"
+            ex:layout_wideParentWidth="800dip"
+            ex:layout_wideLeftMargin="144dip"
+            ex:layout_narrowParentWidth="500dip"
+            ex:layout_narrowLeftMargin="42dip"
+            android:paddingTop="10dip"
+            android:lineSpacingMultiplier="0.92"
+        />
+    </com.android.contacts.widget.InterpolatingLayout>
+
+    <!-- Real list -->
+    <com.android.contacts.widget.InterpolatingLayout
+        android:layout_width="match_parent"
+        android:layout_height="0px"
+        android:layout_weight="1">
+        <ListView android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            ex:layout_wideParentWidth="800dip"
+            ex:layout_wideLeftMargin="124dip"
+            ex:layout_wideRightMargin="64dip"
+            ex:layout_narrowParentWidth="500dip"
+            ex:layout_narrowLeftMargin="32dip"
+            ex:layout_narrowRightMargin="0dip"
+            android:cacheColorHint="#00000000"
+            android:divider="#ffe5e5e5"
+            android:dividerHeight="1px"
+        />
+    </com.android.contacts.widget.InterpolatingLayout>
+    
+    <!-- "Copy to my contacts"- button -->
+    <Button
+        android:id="@+id/copyLocal"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/menu_copyContact"
+        android:visibility="gone"
+        android:layout_gravity="right"
+        android:layout_marginRight="40dip"
+        android:layout_marginTop="20dip"
+        android:layout_marginBottom="20dip" />
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-xlarge/contact_detail_header_view.xml b/res/layout-xlarge/contact_detail_header_view.xml
new file mode 100644
index 0000000..f2ddd52
--- /dev/null
+++ b/res/layout-xlarge/contact_detail_header_view.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/banner"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:paddingTop="40dip"
+    android:paddingRight="5dip">
+
+    <ImageView android:id="@+id/photo"
+        android:layout_marginRight="8dip"
+        android:layout_marginLeft="-1dip"
+        android:layout_width="96dip"
+        android:layout_height="96dip"
+        android:src="@*android:drawable/ic_contact_picture"
+    />
+
+    <LinearLayout
+        android:layout_width="0px"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical">
+
+        <!-- Name, PhoneticName, Directory -->
+        <LinearLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingLeft="64dip"
+            android:orientation="vertical" >
+
+            <TextView android:id="@+id/name"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:textSize="26sp"
+            />
+
+            <TextView android:id="@+id/phonetic_name"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:layout_marginTop="-2dip"
+                android:visibility="gone"
+            />
+
+            <TextView android:id="@+id/organization"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:layout_marginTop="-2dip"
+                android:visibility="gone"
+                android:textColor="#999999"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+            />
+
+            <TextView android:id="@+id/directory_name"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+                android:textColor="?android:attr/textColorSecondary"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:layout_marginTop="-2dip"
+                android:visibility="gone"
+            />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            <!-- Status info -->
+            <LinearLayout
+                android:id="@+id/status_container"
+                android:layout_width="0px"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:orientation="vertical"
+                android:background="@drawable/social_bubble"
+                android:layout_marginTop="30dip"
+                android:paddingLeft="64dip"
+                android:paddingTop="16dip"
+                android:paddingRight="16dip"
+                android:paddingBottom="16dip"
+                android:visibility="gone">
+    
+                <TextView android:id="@+id/status"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="#66666666"
+                    android:maxLines="2"
+                    android:ellipsize="end"
+                    android:visibility="gone"
+                />
+    
+                <TextView android:id="@+id/status_date"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dip"
+                    android:layout_weight="1"
+                    android:textAppearance="?android:attr/textAppearanceMedium"
+                    android:textColor="#66666666"
+                    android:visibility="gone"
+                />
+            </LinearLayout>
+
+            <!-- Presence -->
+            <ImageView
+                android:id="@+id/presence"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:paddingLeft="3dip"
+                android:paddingRight="6dip"
+                android:visibility="gone"
+            />
+
+            <!-- Star -->
+            <CheckBox
+                android:id="@+id/star"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:contentDescription="@string/description_star"
+                style="?android:attr/starStyle" />
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout-xlarge/contact_detail_list_item.xml b/res/layout-xlarge/contact_detail_list_item.xml
new file mode 100644
index 0000000..8de118c
--- /dev/null
+++ b/res/layout-xlarge/contact_detail_list_item.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ */
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:orientation="horizontal"
+    android:paddingLeft="9dip"
+    android:gravity="center_vertical"
+>
+    <TextView android:id="@+id/kind"
+        android:layout_width="120dip"
+        android:layout_height="wrap_content"
+        android:textColor="#7F7F7F"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+    />
+
+    <TextView android:id="@+id/type"
+        android:layout_width="100dip"
+        android:layout_height="wrap_content"
+        android:textColor="#999999"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+    />
+
+    <TextView android:id="@+id/data"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:layout_weight="1"
+        android:layout_marginLeft="8dip"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+    />
+
+    <ImageView android:id="@+id/primary_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingLeft="3dip"
+        android:src="@drawable/ic_default_number"
+    />
+
+    <TextView
+        android:id="@+id/footer"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:visibility="gone" />
+
+    <ImageView android:id="@+id/presence_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="5dip"
+        android:gravity="center"
+        android:scaleType="centerInside"
+    />
+
+    <ImageView android:id="@+id/action_icon"
+        android:layout_width="30dip"
+        android:layout_height="30dip"
+        android:layout_marginLeft="14dip"
+        android:layout_marginRight="14dip"
+        android:gravity="center"
+        android:scaleType="centerInside"
+    />
+    
+    <View android:id="@+id/divider"
+        android:layout_width="1px"
+        android:layout_height="match_parent"
+        android:layout_marginTop="5dip"
+        android:layout_marginBottom="5dip"
+        android:background="@drawable/divider_vertical_dark"
+    />
+
+    <ImageView android:id="@+id/secondary_action_button"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_centerVertical="true"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:gravity="center"
+        android:scaleType="center"
+        android:background="@android:drawable/list_selector_background"
+    />
+
+</LinearLayout>
diff --git a/res/layout-xlarge/contact_editor_activity.xml b/res/layout-xlarge/contact_editor_activity.xml
new file mode 100644
index 0000000..61c526f
--- /dev/null
+++ b/res/layout-xlarge/contact_editor_activity.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fillViewport="true">
+    <com.android.contacts.widget.InterpolatingLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+        <fragment class="com.android.contacts.views.editor.ContactEditorFragment"
+            android:id="@+id/contact_editor_fragment"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            ex:layout_wideParentWidth="1280dip"
+            ex:layout_wideLeftMargin="160dip"
+            ex:layout_wideRightMargin="160dip"
+            ex:layout_narrowParentWidth="800dip"
+            ex:layout_narrowLeftMargin="0dip"
+            ex:layout_narrowRightMargin="0dip"
+         />
+    </com.android.contacts.widget.InterpolatingLayout>
+</ScrollView>
diff --git a/res/layout-xlarge/contact_editor_fragment.xml b/res/layout-xlarge/contact_editor_fragment.xml
new file mode 100644
index 0000000..0d01214
--- /dev/null
+++ b/res/layout-xlarge/contact_editor_fragment.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:id="@+id/editors"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/panel_message"
+    android:orientation="vertical"
+/>
diff --git a/res/layout-xlarge/contact_picker_content.xml b/res/layout-xlarge/contact_picker_content.xml
new file mode 100644
index 0000000..9112073
--- /dev/null
+++ b/res/layout-xlarge/contact_picker_content.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout 
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal"
+    >
+
+    <view
+        class="com.android.contacts.list.ContactListAizyView"
+        android:id="@+id/contacts_list_aizy"
+        android:layout_width="40dip"
+        android:layout_height="match_parent"
+    />
+
+    <LinearLayout
+        android:layout_width="0px"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:layout_weight="1"
+        >
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="2dip"
+            android:layout_marginTop="1dip"
+            android:layout_marginBottom="1dip"
+            android:background="#7e7e87"
+        />
+
+        <view
+            class="com.android.contacts.list.ContactEntryListView"
+            android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:fastScrollEnabled="true"
+            android:layout_weight="1"
+            android:scrollingCache="false"
+        />
+
+        <include layout="@layout/contacts_list_empty"/>
+
+        <ViewStub android:id="@+id/footer_stub"
+            android:layout="@layout/footer_panel"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+        />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout-xlarge/contacts_list_content.xml b/res/layout-xlarge/contacts_list_content.xml
new file mode 100644
index 0000000..a025751
--- /dev/null
+++ b/res/layout-xlarge/contacts_list_content.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout 
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/pinned_header_list_layout"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal"
+    >
+
+    <view
+        class="com.android.contacts.list.ContactListAizyView"
+        android:id="@+id/contacts_list_aizy"
+        android:layout_width="40dip"
+        android:layout_height="match_parent"
+    />
+
+    <LinearLayout
+        android:layout_width="0px"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:layout_weight="1"
+        >
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="2dip"
+            android:layout_marginTop="1dip"
+            android:layout_marginBottom="1dip"
+            android:background="#7e7e87"
+        />
+
+        <view
+            class="com.android.contacts.list.ContactEntryListView"
+            android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:fastScrollEnabled="true"
+            android:layout_weight="1"
+            android:scrollingCache="false"
+        />
+
+        <include layout="@layout/contacts_list_empty"/>
+
+        <ViewStub android:id="@+id/footer_stub"
+            android:layout="@layout/footer_panel"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+        />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout-xlarge/item_contact_editor.xml b/res/layout-xlarge/item_contact_editor.xml
new file mode 100644
index 0000000..f44e4c3
--- /dev/null
+++ b/res/layout-xlarge/item_contact_editor.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<com.android.contacts.views.editor.RawContactEditorView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+>
+
+    <!-- Account info header -->
+    <RelativeLayout android:id="@+id/header"
+        android:layout_height="64dip"
+        android:layout_width="match_parent"
+        android:background="@android:drawable/list_selector_background"
+    >
+
+        <ImageView android:id="@+id/header_color_bar"
+            android:layout_width="match_parent"
+            android:layout_height="4dip"
+            android:layout_marginBottom="5dip"
+            android:background="@color/edit_divider"
+        />
+
+        <ImageView android:id="@+id/header_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="7dip"
+            android:layout_marginRight="7dip"
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_below="@id/header_color_bar"
+        />
+
+        <TextView android:id="@+id/header_account_type"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_toLeftOf="@+id/header_icon"
+            android:layout_alignTop="@id/header_icon"
+            android:layout_marginTop="-4dip"
+
+            android:textSize="24sp"
+            android:textColor="?android:attr/textColorPrimary"
+            android:singleLine="true"
+        />
+
+        <TextView android:id="@+id/header_account_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_toLeftOf="@+id/header_icon"
+            android:layout_alignBottom="@+id/header_icon"
+            android:layout_marginBottom="2dip"
+
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorPrimary"
+            android:singleLine="true"
+        />
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_alignParentBottom="true"
+
+            android:background="?android:attr/listDivider"
+        />
+    </RelativeLayout>
+
+    <LinearLayout
+        android:id="@+id/body"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:paddingTop="10dip"
+        >
+
+        <com.android.contacts.widget.InterpolatingLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <FrameLayout
+                android:id="@+id/stub_photo"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                ex:layout_wideParentWidth="960dip"
+                ex:layout_wideLeftMargin="128dip"
+                ex:layout_narrowParentWidth="800dip"
+                ex:layout_narrowLeftMargin="15dip"
+                >
+
+                <include
+                    android:id="@+id/edit_photo"
+                    layout="@layout/item_photo_editor" />
+
+            </FrameLayout>
+        </com.android.contacts.widget.InterpolatingLayout>
+
+        <com.android.contacts.widget.InterpolatingLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                ex:layout_wideParentWidth="960dip"
+                ex:layout_wideLeftMargin="230dip"
+                ex:layout_wideRightMargin="50dip"
+                ex:layout_narrowParentWidth="800dip"
+                ex:layout_narrowLeftMargin="160dip"
+                ex:layout_narrowRightMargin="50dip"
+                >
+
+                <com.android.contacts.views.editor.FieldEditorView
+                    android:id="@+id/edit_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingRight="?android:attr/scrollbarSize"
+                    android:layout_below="@id/stub_photo"
+                    android:layout_marginTop="6dip"
+                    android:layout_marginBottom="4dip" />
+
+                <ViewStub android:id="@+id/aggregation_suggestion_stub"
+                    android:inflatedId="@+id/aggregation_suggestion"
+                    android:layout="@layout/aggregation_suggestions"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:visibility="visible"/>
+
+                <LinearLayout
+                    android:id="@+id/sect_fields"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical"
+                    android:paddingRight="?android:attr/scrollbarSize"
+                />
+            </LinearLayout>
+        </com.android.contacts.widget.InterpolatingLayout>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_alignParentBottom="true"
+            android:background="?android:attr/listDivider"
+        />
+
+        <Button
+            android:id="@+id/button_add_field"
+            android:text="@string/add_field"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="right"
+            android:layout_marginTop="10dip"
+        />
+    </LinearLayout>
+</com.android.contacts.views.editor.RawContactEditorView>
diff --git a/res/layout-xlarge/item_group_membership.xml b/res/layout-xlarge/item_group_membership.xml
new file mode 100644
index 0000000..4ce0eb4
--- /dev/null
+++ b/res/layout-xlarge/item_group_membership.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<!-- the body surrounding all editors for a specific kind -->
+
+<com.android.contacts.views.editor.GroupMembershipView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/kind_title"
+        android:layout_width="100dip"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:singleLine="true"
+        android:ellipsize="marquee" />
+
+    <TextView
+        android:id="@+id/group_list"
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:background="@drawable/group_membership_edit_background"
+        android:gravity="left"
+        android:ellipsize="end"
+    />
+</com.android.contacts.views.editor.GroupMembershipView>
diff --git a/res/layout-xlarge/item_kind_section.xml b/res/layout-xlarge/item_kind_section.xml
new file mode 100644
index 0000000..9ab5d97
--- /dev/null
+++ b/res/layout-xlarge/item_kind_section.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<!-- the body surrounding all editors for a specific kind -->
+
+<com.android.contacts.views.editor.KindSectionView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/kind_title"
+        android:layout_width="100dip"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:singleLine="true"
+        android:ellipsize="marquee" />
+
+    <LinearLayout
+        android:id="@+id/kind_editors"
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_gravity="bottom"
+        android:orientation="vertical" />
+
+    <ImageButton
+        android:id="@+id/kind_plus"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
+        android:paddingLeft="@dimen/editor_round_button_padding_left"
+        android:paddingRight="@dimen/editor_round_button_padding_right"
+        android:paddingTop="@dimen/editor_round_button_padding_top"
+        android:paddingBottom="@dimen/editor_round_button_padding_bottom"
+        android:src="@drawable/btn_plus"
+        android:background="@null"
+        android:contentDescription="@string/description_plus_button" />
+</com.android.contacts.views.editor.KindSectionView>
diff --git a/res/layout-xlarge/item_photo_editor.xml b/res/layout-xlarge/item_photo_editor.xml
new file mode 100644
index 0000000..35ade24
--- /dev/null
+++ b/res/layout-xlarge/item_photo_editor.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<com.android.contacts.views.editor.PhotoEditorView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="@dimen/edit_photo_size"
+    android:layout_height="@dimen/edit_photo_size"
+    android:clickable="true"
+    android:focusable="true"
+    android:src="@drawable/ic_menu_add_picture"
+    android:cropToPadding="true"
+    android:scaleType="center"
+    android:background="@drawable/btn_contact_picture"
+    android:contentDescription="@string/description_contact_photo"
+    android:gravity="center" />
diff --git a/res/layout-xlarge/list_section.xml b/res/layout-xlarge/list_section.xml
new file mode 100644
index 0000000..c684a0f
--- /dev/null
+++ b/res/layout-xlarge/list_section.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<!-- Layout used for list section separators. -->
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="37dip"
+    android:background="@drawable/section_header_holo"
+    >
+    <TextView
+        android:id="@+id/header_text"
+        android:layout_width="56dip"
+        android:layout_height="wrap_content"
+        android:layout_centerVertical="true"
+        android:layout_alignParentLeft="true"
+        android:textStyle="bold"
+        android:textColor="@color/section_header_text_color"
+        android:textSize="14sp"
+        android:gravity="center"
+    />
+</RelativeLayout>
diff --git a/res/layout-xlarge/search_header.xml b/res/layout-xlarge/search_header.xml
new file mode 100644
index 0000000..e543883
--- /dev/null
+++ b/res/layout-xlarge/search_header.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    style="DirectoryHeader"
+    android:layout_width="match_parent"
+    android:layout_height="56dip">
+    <TextView
+        android:id="@+id/totalContactsText"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_centerVertical="true"
+        android:layout_alignParentLeft="true"
+        android:layout_marginLeft="8dip"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="?android:attr/textColorTertiary"
+        android:textStyle="bold" />
+
+    <ProgressBar
+        android:id="@+id/progress"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        style="?android:attr/progressBarStyleSmall"
+        android:layout_alignParentRight="true"
+        android:layout_centerVertical="true"
+        android:layout_marginRight="10dip" />
+
+</RelativeLayout>
diff --git a/res/layout-xlarge/total_contacts.xml b/res/layout-xlarge/total_contacts.xml
new file mode 100644
index 0000000..8c05119
--- /dev/null
+++ b/res/layout-xlarge/total_contacts.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="47dip"
+    android:paddingLeft="5dp"
+    android:paddingRight="7dp"
+    >
+
+    <TextView
+        android:id="@+id/totalContactsText"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:textColor="#ff666666"
+        android:textSize="14sp"
+        android:textStyle="normal"
+        android:layout_alignParentLeft="true"
+        android:gravity="center_vertical"
+    />
+
+</RelativeLayout>
diff --git a/res/layout/act_edit.xml b/res/layout/act_edit.xml
deleted file mode 100644
index 2a71717..0000000
--- a/res/layout/act_edit.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
->
-
-    <ScrollView 
-        android:layout_width="match_parent"
-        android:layout_height="1px"
-        android:layout_weight="1"
-        android:fillViewport="true"
-    >
-
-        <LinearLayout android:id="@+id/editors"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical"
-        />
-
-    </ScrollView>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        style="@android:style/ButtonBar"
-    >
-
-        <Button android:id="@+id/btn_done"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:text="@string/menu_done"
-        />
-
-        <Button android:id="@+id/btn_discard"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:text="@string/menu_doNotSave"
-        />
-
-    </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout/aggregation_suggestions.xml b/res/layout/aggregation_suggestions.xml
new file mode 100644
index 0000000..0542daa
--- /dev/null
+++ b/res/layout/aggregation_suggestions.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ */
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:background="@drawable/aggregation_suggestions_bg">
+    <TextView
+        android:id="@+id/aggregation_suggestion_title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:layout_marginLeft="5dip"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textColor="?android:attr/textColorPrimary"
+        android:textStyle="bold"
+    />
+
+    <LinearLayout
+        android:id="@+id/aggregation_suggestions"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+    />
+</LinearLayout>
diff --git a/res/layout/aggregation_suggestions_item.xml b/res/layout/aggregation_suggestions_item.xml
new file mode 100644
index 0000000..988508b
--- /dev/null
+++ b/res/layout/aggregation_suggestions_item.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ */
+-->
+
+<view xmlns:android="http://schemas.android.com/apk/res/android"
+    class="com.android.contacts.views.editor.AggregationSuggestionView"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:paddingLeft="5dip"
+    android:paddingRight="15dip"
+>
+    <Button
+        android:id="@+id/aggregation_suggestion_join_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/aggregation_suggestion_join_button"
+        android:layout_centerInParent="true"
+        android:layout_alignParentRight="true"
+    />
+
+    <Button
+        android:id="@+id/aggregation_suggestion_edit_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/aggregation_suggestion_edit_button"
+        android:layout_centerInParent="true"
+        android:layout_alignParentRight="true"
+    />
+
+    <ImageView
+        android:id="@+id/aggregation_suggestion_photo"
+        android:layout_width="@dimen/aggregation_suggestion_icon_size"
+        android:layout_height="@dimen/aggregation_suggestion_icon_size"
+        android:layout_alignParentLeft="true"
+        android:layout_centerInParent="true"
+        android:layout_marginTop="4dip"
+        android:scaleType="fitCenter"
+    />
+
+    <TextView
+        android:id="@+id/aggregation_suggestion_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toRightOf="@id/aggregation_suggestion_photo"
+        android:layout_toLeftOf="@id/aggregation_suggestion_join_button"
+        android:layout_marginLeft="10dip"
+        android:layout_marginTop="4dip"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="?android:attr/textColorSecondary"
+    />
+
+    <TextView
+        android:id="@+id/aggregation_suggestion_data"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toRightOf="@id/aggregation_suggestion_photo"
+        android:layout_toLeftOf="@id/aggregation_suggestion_join_button"
+        android:layout_below="@id/aggregation_suggestion_name"
+        android:layout_marginLeft="10dip"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="?android:attr/textColorSecondary"
+    />
+</view>
diff --git a/res/layout/aizy_popup_window.xml b/res/layout/aizy_popup_window.xml
new file mode 100644
index 0000000..4b3668f
--- /dev/null
+++ b/res/layout/aizy_popup_window.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="@dimen/aizy_preview_width"
+    android:layout_height="@dimen/aizy_preview_height"
+    android:background="@drawable/aizy_label"
+    android:paddingTop="0dip"
+    android:id="@+id/caption"
+    android:textSize="55sp"
+    android:gravity="center"
+    android:textColor="#ffffffff" />
diff --git a/res/layout-finger/call_detail.xml b/res/layout/call_detail.xml
similarity index 100%
rename from res/layout-finger/call_detail.xml
rename to res/layout/call_detail.xml
diff --git a/res/layout-finger/call_detail_list_item.xml b/res/layout/call_detail_list_item.xml
similarity index 100%
rename from res/layout-finger/call_detail_list_item.xml
rename to res/layout/call_detail_list_item.xml
diff --git a/res/layout/contact_browser.xml b/res/layout/contact_browser.xml
new file mode 100644
index 0000000..0b4bb63
--- /dev/null
+++ b/res/layout/contact_browser.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/list_container"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+</FrameLayout>
diff --git a/res/layout-finger/contact_card_layout.xml b/res/layout/contact_card_layout.xml
similarity index 100%
rename from res/layout-finger/contact_card_layout.xml
rename to res/layout/contact_card_layout.xml
diff --git a/res/layout/contact_detail_activity.xml b/res/layout/contact_detail_activity.xml
new file mode 100644
index 0000000..ab5ec69
--- /dev/null
+++ b/res/layout/contact_detail_activity.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <fragment class="com.android.contacts.views.detail.ContactDetailFragment"
+            android:id="@+id/contact_detail_fragment"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+</FrameLayout>
diff --git a/res/layout/contact_detail_fragment.xml b/res/layout/contact_detail_fragment.xml
new file mode 100644
index 0000000..a3ca198
--- /dev/null
+++ b/res/layout/contact_detail_fragment.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/contact_detail"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    
+    <com.android.contacts.views.detail.ContactDetailHeaderView
+        android:id="@+id/contact_header_widget"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"/>
+        
+    <ListView android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0px"
+        android:layout_weight="1"
+        android:background="@drawable/title_bar_shadow"
+    />
+
+    <ScrollView android:id="@android:id/empty"
+        android:layout_width="match_parent"
+        android:layout_height="0px"
+        android:layout_weight="1"
+        android:visibility="gone"
+    >
+        <TextView android:id="@+id/emptyText"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/no_contact_details"
+            android:textSize="20sp"
+            android:textColor="?android:attr/textColorSecondary"
+            android:paddingLeft="10dip"
+            android:paddingRight="10dip"
+            android:paddingTop="10dip"
+            android:lineSpacingMultiplier="0.92"
+        />
+    </ScrollView>
+
+    <!-- "Copy to my contacts"- button -->
+    <Button
+        android:id="@+id/copyLocal"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/menu_copyContact"
+        android:visibility="gone"
+        android:layout_gravity="right"
+        android:layout_marginRight="40dip"
+        android:layout_marginTop="20dip"
+        android:layout_marginBottom="20dip" />
+</LinearLayout>
+
diff --git a/res/layout/contact_detail_header_view.xml b/res/layout/contact_detail_header_view.xml
new file mode 100644
index 0000000..6273c8a
--- /dev/null
+++ b/res/layout/contact_detail_header_view.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/banner"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal"
+    android:background="@drawable/title_bar_medium"
+    android:paddingRight="5dip">
+
+    <ImageView android:id="@+id/photo"
+        android:layout_gravity="center_vertical"
+        android:layout_marginRight="8dip"
+        android:layout_marginLeft="-1dip"
+        android:src="@*android:drawable/ic_contact_picture"
+    />
+
+    <LinearLayout
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical"
+        android:layout_gravity="center_vertical" >
+
+        <TextView android:id="@+id/name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textStyle="bold"
+            android:shadowColor="#BB000000"
+            android:shadowRadius="2.75"
+         />
+
+        <TextView android:id="@+id/phonetic_name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+
+        <TextView android:id="@+id/organization"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+
+        <TextView android:id="@+id/directory_name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorSecondary"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+
+        <TextView android:id="@+id/status"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+
+        <TextView android:id="@+id/status_date"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:layout_weight="1"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textSize="12sp"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+    </LinearLayout>
+
+    <ImageView
+        android:id="@+id/presence"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingLeft="3dip"
+        android:paddingRight="6dip"
+        android:visibility="gone"
+    />
+
+    <CheckBox
+        android:id="@+id/star"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:contentDescription="@string/description_star"
+        style="?android:attr/starStyle" />
+</LinearLayout>
diff --git a/res/layout/contact_detail_list_item.xml b/res/layout/contact_detail_list_item.xml
new file mode 100644
index 0000000..a110ec2
--- /dev/null
+++ b/res/layout/contact_detail_list_item.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 2009, 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:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:orientation="horizontal"
+    android:paddingLeft="9dip"
+    android:gravity="center_vertical"
+>
+
+    <LinearLayout
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginLeft="5dip"
+        android:orientation="vertical"
+        android:paddingTop="5dip"
+        android:paddingBottom="7dip"
+        android:gravity="center_vertical"
+    >
+
+        <TextView android:id="@+id/kind_and_type"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+        />
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+        >
+            
+            <TextView android:id="@+id/data"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+            />
+    
+            <ImageView android:id="@+id/primary_icon"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:paddingLeft="3dip"
+                android:src="@drawable/ic_default_number"
+            />
+
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/footer"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:visibility="gone" />
+
+    </LinearLayout>
+
+    <ImageView android:id="@+id/presence_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="5dip"
+        android:gravity="center"
+        android:scaleType="centerInside"
+    />
+
+    <ImageView android:id="@+id/action_icon"
+        android:layout_width="30dip"
+        android:layout_height="30dip"
+        android:layout_marginLeft="14dip"
+        android:layout_marginRight="14dip"
+        android:gravity="center"
+        android:scaleType="centerInside"
+    />
+    
+    <View android:id="@+id/divider"
+        android:layout_width="1px"
+        android:layout_height="match_parent"
+        android:layout_marginTop="5dip"
+        android:layout_marginBottom="5dip"
+        android:background="@drawable/divider_vertical_dark"
+    />
+
+    <ImageView android:id="@+id/secondary_action_button"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:layout_centerVertical="true"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:gravity="center"
+        android:scaleType="center"
+        android:background="@android:drawable/list_selector_background"
+    />
+
+</LinearLayout>
diff --git a/res/layout/contact_editor_activity.xml b/res/layout/contact_editor_activity.xml
new file mode 100644
index 0000000..e51869b
--- /dev/null
+++ b/res/layout/contact_editor_activity.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <fragment class="com.android.contacts.views.editor.ContactEditorFragment"
+            android:id="@+id/contact_editor_fragment"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent" />
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="50dip"
+        android:orientation="horizontal"
+        android:gravity="center_horizontal">
+
+        <Button
+            android:id="@+id/done"
+            android:layout_width="150dip"
+            android:layout_height="match_parent"
+            android:text="@string/menu_done" />
+        <Button
+            android:id="@+id/revert"
+            android:layout_width="150dip"
+            android:layout_height="match_parent"
+            android:text="@string/menu_doNotSave" />
+    </LinearLayout>
+</FrameLayout>
diff --git a/res/layout/contact_editor_fragment.xml b/res/layout/contact_editor_fragment.xml
new file mode 100644
index 0000000..602f7f9
--- /dev/null
+++ b/res/layout/contact_editor_fragment.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+>
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:fillViewport="true"
+    >
+
+        <LinearLayout android:id="@+id/editors"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+        />
+
+    </ScrollView>
+</FrameLayout>
diff --git a/res/layout/contact_editor_header_view.xml b/res/layout/contact_editor_header_view.xml
new file mode 100644
index 0000000..fb5596e
--- /dev/null
+++ b/res/layout/contact_editor_header_view.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/banner"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal"
+    android:background="@drawable/title_bar_medium"
+    android:paddingRight="5dip">
+
+    <TextView android:id="@+id/caption"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:singleLine="true"
+        android:ellipsize="end"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:textStyle="bold"
+        android:shadowColor="#BB000000"
+        android:shadowRadius="2.75"
+        android:text="@string/edit_contact"
+        android:layout_gravity="center_vertical"
+        />
+
+    <LinearLayout
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical"
+        android:layout_gravity="center_vertical" />
+
+    <TextView android:id="@+id/merge_info"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:singleLine="true"
+        android:ellipsize="end"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textStyle="bold"
+        android:shadowColor="#BB000000"
+        android:shadowRadius="2.75"
+        android:layout_gravity="center_vertical"
+        />
+</LinearLayout>
diff --git a/res/layout/contact_list_filter_custom.xml b/res/layout/contact_list_filter_custom.xml
new file mode 100644
index 0000000..6c34fec
--- /dev/null
+++ b/res/layout/contact_list_filter_custom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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"
+    style="@style/CustomContactListFilterView"
+    android:orientation="vertical"
+    android:fillViewport="true">
+
+    <ExpandableListView
+        android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        style="@android:style/ButtonBar">
+
+        <Button
+            android:id="@+id/btn_done"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@android:string/ok" />
+
+        <Button
+            android:id="@+id/btn_discard"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@android:string/cancel" />
+
+    </LinearLayout>
+
+</LinearLayout>
diff --git a/res/layout-finger/display_options_phones_only.xml b/res/layout/contact_list_filter_phones_only.xml
similarity index 100%
rename from res/layout-finger/display_options_phones_only.xml
rename to res/layout/contact_list_filter_phones_only.xml
diff --git a/res/layout/contact_none_fragment.xml b/res/layout/contact_none_fragment.xml
new file mode 100644
index 0000000..6617427
--- /dev/null
+++ b/res/layout/contact_none_fragment.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+>
+
+<!-- TODO: need an image -->
+<!--  <ImageView-->
+<!--    android:layout_width="wrap_content"-->
+<!--    android:layout_height="wrap_content"-->
+<!--    android:src="@drawable/contact_none"-->
+<!--    android:layout_centerInParent="true"/>-->
+    
+</RelativeLayout>
diff --git a/res/layout-finger/contact_options.xml b/res/layout/contact_options.xml
similarity index 100%
rename from res/layout-finger/contact_options.xml
rename to res/layout/contact_options.xml
diff --git a/res/layout/contact_picker.xml b/res/layout/contact_picker.xml
new file mode 100644
index 0000000..4fa8c8e
--- /dev/null
+++ b/res/layout/contact_picker.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/ContactPickerLayout"
+    android:id="@+id/list_container"
+    >
+</FrameLayout>
diff --git a/res/layout/contact_picker_content.xml b/res/layout/contact_picker_content.xml
new file mode 100644
index 0000000..56e8340
--- /dev/null
+++ b/res/layout/contact_picker_content.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout 
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/pinned_header_list_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        >
+
+    <LinearLayout
+            android:layout_width="0px"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            >
+
+        <view
+            class="com.android.contacts.list.ContactEntryListView"
+            android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:fastScrollEnabled="true"
+            android:layout_weight="1"
+        />
+
+        <include layout="@layout/contacts_list_empty"/>
+
+        <ViewStub android:id="@+id/footer_stub"
+            android:layout="@layout/footer_panel"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+        />
+    </LinearLayout>
+    <view
+        class="com.android.contacts.list.ContactListAizyView"
+        android:id="@+id/contacts_list_aizy"
+        android:layout_width="30dip"
+        android:layout_height="match_parent"
+    />
+</LinearLayout>
diff --git a/res/layout/contacts_list_content.xml b/res/layout/contacts_list_content.xml
new file mode 100644
index 0000000..56e8340
--- /dev/null
+++ b/res/layout/contacts_list_content.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout 
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/pinned_header_list_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        >
+
+    <LinearLayout
+            android:layout_width="0px"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            >
+
+        <view
+            class="com.android.contacts.list.ContactEntryListView"
+            android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:fastScrollEnabled="true"
+            android:layout_weight="1"
+        />
+
+        <include layout="@layout/contacts_list_empty"/>
+
+        <ViewStub android:id="@+id/footer_stub"
+            android:layout="@layout/footer_panel"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+        />
+    </LinearLayout>
+    <view
+        class="com.android.contacts.list.ContactListAizyView"
+        android:id="@+id/contacts_list_aizy"
+        android:layout_width="30dip"
+        android:layout_height="match_parent"
+    />
+</LinearLayout>
diff --git a/res/layout/contacts_list_content_join.xml b/res/layout/contacts_list_content_join.xml
new file mode 100644
index 0000000..de285fa
--- /dev/null
+++ b/res/layout/contacts_list_content_join.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical">
+
+    <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" 
+            android:orientation="horizontal"
+            android:background="@*android:drawable/title_bar_medium"
+            android:paddingLeft="5dip"
+            android:paddingRight="5dip"
+            android:gravity="center_vertical"
+            >
+    
+        <ImageView
+            android:layout_width="48dip"
+            android:layout_height="48dip"
+            android:src="@drawable/ic_join"
+            android:gravity="center"
+            android:scaleType="fitCenter"
+        />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:paddingLeft="10dip">
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/titleJoinContactDataWith"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:shadowColor="#BB000000"
+                android:shadowRadius="2.75"
+            />
+            <TextView
+                android:id="@+id/join_contact_blurb"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="-2dip"
+                android:maxLines="2"
+                android:textAppearance="?android:attr/textAppearanceSmall"
+            />
+        </LinearLayout>
+    </LinearLayout>
+
+    <LinearLayout
+            android:id="@+id/pinned_header_list_layout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="horizontal"
+            >
+
+        <com.android.contacts.list.ContactListAizyView
+            android:id="@+id/contacts_list_aizy"
+            android:layout_width="50dip"
+            android:layout_height="match_parent"
+        />
+
+        <view
+            class="com.android.contacts.list.ContactEntryListView" 
+            android:id="@android:id/list"
+            android:layout_width="0px"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:fastScrollEnabled="true"
+        />
+    </LinearLayout>
+</LinearLayout>
+
diff --git a/res/layout/contacts_list_empty.xml b/res/layout/contacts_list_empty.xml
new file mode 100644
index 0000000..d655899
--- /dev/null
+++ b/res/layout/contacts_list_empty.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<view 
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    class="com.android.contacts.ContactListEmptyView"
+    android:id="@android:id/empty"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fillViewport="true"
+>
+    <LinearLayout 
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:orientation="vertical">
+      
+      <TextView android:id="@+id/emptyText"
+          android:layout_width="match_parent"
+          android:layout_height="wrap_content"
+          android:text="@string/noContacts"
+          android:textSize="20sp"
+          android:textColor="?android:attr/textColorSecondary"
+          android:paddingLeft="10dip"
+          android:paddingRight="10dip"
+          android:paddingTop="10dip"
+          android:lineSpacingMultiplier="0.92"
+          android:visibility="gone"
+      />
+      
+      <LinearLayout android:id="@+id/import_failure"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:gravity="fill_horizontal"
+        android:padding="20dip"
+        android:visibility="gone">
+        
+        <Button
+            android:id="@+id/import_failure_uninstall_apps"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"            
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:text="@string/upgrade_out_of_memory_uninstall"/>
+            
+        <Button
+            android:id="@+id/import_failure_retry_upgrade"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dip"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:text="@string/upgrade_out_of_memory_retry"/>
+      </LinearLayout>
+    </LinearLayout>
+</view>
diff --git a/res/layout-finger/contacts_list_search_all_item.xml b/res/layout/contacts_list_search_all_item.xml
similarity index 100%
rename from res/layout-finger/contacts_list_search_all_item.xml
rename to res/layout/contacts_list_search_all_item.xml
diff --git a/res/layout-finger/contacts_list_show_all_item.xml b/res/layout/contacts_list_show_all_item.xml
similarity index 100%
rename from res/layout-finger/contacts_list_show_all_item.xml
rename to res/layout/contacts_list_show_all_item.xml
diff --git a/res/layout/contacts_preferences.xml b/res/layout/contacts_preferences.xml
deleted file mode 100644
index c8a1bcf..0000000
--- a/res/layout/contacts_preferences.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:fillViewport="true">
-
-    <ExpandableListView
-        android:id="@android:id/list"
-        android:layout_width="match_parent"
-        android:layout_height="0dip"
-        android:layout_weight="1" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        style="@android:style/ButtonBar">
-
-        <Button
-            android:id="@+id/btn_done"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:text="@string/menu_done" />
-
-        <Button
-            android:id="@+id/btn_discard"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:text="@string/menu_doNotSave" />
-
-    </LinearLayout>
-
-</LinearLayout>
diff --git a/res/layout/contacts_search_content.xml b/res/layout/contacts_search_content.xml
new file mode 100644
index 0000000..d36ad00
--- /dev/null
+++ b/res/layout/contacts_search_content.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/pinned_header_list_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="@color/translucent_search_background"
+        >
+
+    <include android:id="@+id/searchView"
+        layout="@layout/search_bar"/>
+
+    <FrameLayout
+        android:id="@+id/list_container"
+        android:layout_width="match_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1"
+        android:fastScrollEnabled="true"
+        android:background="@android:color/background_dark"
+    />
+
+    <!-- Transparent filler -->
+    <View android:id="@android:id/empty"
+        android:layout_width="match_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1"
+        android:visibility="gone"
+    />
+    <ViewStub android:id="@+id/footer_stub"
+        android:layout="@layout/footer_panel"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+    />
+</LinearLayout>
diff --git a/res/layout-finger/create_new_contact.xml b/res/layout/create_new_contact.xml
similarity index 100%
rename from res/layout-finger/create_new_contact.xml
rename to res/layout/create_new_contact.xml
diff --git a/res/layout/custom_list_filter.xml b/res/layout/custom_list_filter.xml
new file mode 100644
index 0000000..2b029a7
--- /dev/null
+++ b/res/layout/custom_list_filter.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/pinned_header_list_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        >
+
+    <LinearLayout
+            android:layout_width="0px"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:layout_weight="1"
+            >
+
+        <Spinner
+            android:id="@+id/filter_spinner"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:prompt="@string/list_filter_prompt"
+            android:visibility="gone"
+        />
+
+        <view
+            class="com.android.contacts.list.ContactEntryListView"
+            android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:fastScrollEnabled="true"
+            android:layout_weight="1"
+        />
+
+        <include layout="@layout/contacts_list_empty"/>
+
+        <ViewStub android:id="@+id/footer_stub"
+            android:layout="@layout/footer_panel"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+        />
+    </LinearLayout>
+    <com.android.contacts.list.ContactListAizyView
+        android:id="@+id/contacts_list_aizy"
+        android:layout_width="30dip"
+        android:layout_height="match_parent"
+    />
+</LinearLayout>
diff --git a/res/layout-finger/dialer_activity.xml b/res/layout/dialer_activity.xml
similarity index 100%
rename from res/layout-finger/dialer_activity.xml
rename to res/layout/dialer_activity.xml
diff --git a/res/layout-finger/dialpad.xml b/res/layout/dialpad.xml
similarity index 100%
rename from res/layout-finger/dialpad.xml
rename to res/layout/dialpad.xml
diff --git a/res/layout-finger/dialpad_chooser_list_item.xml b/res/layout/dialpad_chooser_list_item.xml
similarity index 100%
rename from res/layout-finger/dialpad_chooser_list_item.xml
rename to res/layout/dialpad_chooser_list_item.xml
diff --git a/res/layout/directory_header.xml b/res/layout/directory_header.xml
new file mode 100644
index 0000000..63d8297
--- /dev/null
+++ b/res/layout/directory_header.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<!-- Layout used for list section separators. -->
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/DirectoryHeader"
+    android:layout_width="match_parent"
+    android:layout_height="56dip"
+    >
+    <TextView
+        android:id="@+id/count"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_centerVertical="true"
+        android:layout_alignParentRight="true"
+        android:layout_marginRight="8dip"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="?android:attr/textColorTertiary"
+        android:textStyle="bold"
+    />
+    <TextView
+        android:id="@+id/label"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignBaseline="@id/count"
+        android:layout_marginLeft="8dip"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="?android:attr/textColorTertiary"
+        android:textStyle="bold"
+    />
+    <TextView
+        android:id="@+id/display_name"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_toRightOf="@id/label"
+        android:layout_toLeftOf="@id/count"
+        android:layout_alignBaseline="@id/count"
+        android:layout_marginLeft="6dip"
+        android:layout_marginRight="6dip"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textColor="?android:attr/textColorTertiary"
+        android:singleLine="true"
+        android:ellipsize="end"
+    />
+</RelativeLayout>
diff --git a/res/layout-finger/display_child.xml b/res/layout/display_child.xml
similarity index 100%
rename from res/layout-finger/display_child.xml
rename to res/layout/display_child.xml
diff --git a/res/layout-finger/display_group.xml b/res/layout/display_group.xml
similarity index 100%
rename from res/layout-finger/display_group.xml
rename to res/layout/display_group.xml
diff --git a/res/layout-finger/edit_contact_entry_voicemail.xml b/res/layout/edit_contact_entry_voicemail.xml
similarity index 100%
rename from res/layout-finger/edit_contact_entry_voicemail.xml
rename to res/layout/edit_contact_entry_voicemail.xml
diff --git a/res/layout-finger/edit_divider.xml b/res/layout/edit_divider.xml
similarity index 100%
rename from res/layout-finger/edit_divider.xml
rename to res/layout/edit_divider.xml
diff --git a/res/layout-finger/edit_phonetic_name.xml b/res/layout/edit_phonetic_name.xml
similarity index 100%
rename from res/layout-finger/edit_phonetic_name.xml
rename to res/layout/edit_phonetic_name.xml
diff --git a/res/layout-finger/empty.xml b/res/layout/empty.xml
similarity index 100%
rename from res/layout-finger/empty.xml
rename to res/layout/empty.xml
diff --git a/res/layout/filter_spinner_item.xml b/res/layout/filter_spinner_item.xml
new file mode 100644
index 0000000..9a3ca98
--- /dev/null
+++ b/res/layout/filter_spinner_item.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<view
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    class="com.android.contacts.list.ContactListFilterView"
+    android:layout_height="52dip"
+    android:layout_width="fill_parent"
+    android:paddingLeft="7dip"
+    android:paddingRight="7dip"
+    android:paddingTop="2dip"
+    android:paddingBottom="2dip"
+    android:gravity="left">
+
+    <ImageView
+        android:id="@+id/icon"
+        android:scaleType="fitCenter"
+        android:layout_width="24dip"
+        android:layout_height="24dip"
+        android:layout_marginLeft="8dip"
+        android:layout_marginRight="7dip"
+        android:layout_gravity="center_vertical" />
+
+    <TextView
+        android:id="@+id/label"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:gravity="center_vertical"
+        android:ellipsize="end" />
+
+    <TextView
+        android:id="@+id/indented_label"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:gravity="center_vertical"
+        android:ellipsize="end"
+        android:paddingLeft="40dip" />
+</view>
+
diff --git a/res/layout/footer_panel.xml b/res/layout/footer_panel.xml
new file mode 100644
index 0000000..2625a43
--- /dev/null
+++ b/res/layout/footer_panel.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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/footer"
+    android:orientation="horizontal"
+    android:visibility="gone"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    style="@android:style/ButtonBar"
+>
+
+    <Button android:id="@+id/done"
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:text="@string/menu_done"
+    />
+
+    <Button android:id="@+id/revert"
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:text="@string/menu_doNotSave"
+    />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/layout-finger/horizontal_divider.xml b/res/layout/horizontal_divider.xml
similarity index 100%
rename from res/layout-finger/horizontal_divider.xml
rename to res/layout/horizontal_divider.xml
diff --git a/res/layout/item_contact_editor.xml b/res/layout/item_contact_editor.xml
index f5e7bd3..4d9e26b 100644
--- a/res/layout/item_contact_editor.xml
+++ b/res/layout/item_contact_editor.xml
@@ -14,85 +14,74 @@
      limitations under the License.
 -->
 
-<!-- placed inside act_edit as tabcontent -->
-<com.android.contacts.ui.widget.ContactEditorView
+<com.android.contacts.views.editor.RawContactEditorView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal"
+    android:orientation="vertical"
 >
 
-    <!-- Left side color bar -->
-    <ImageView
-        android:id="@+id/color_bar"
-        android:layout_width="4dip"
-        android:layout_height="match_parent"
-        android:visibility="gone"
-    />
-
-    <!-- The content -->
-    <LinearLayout
-        android:layout_width="0dip"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical"
+    <!-- Account info header -->
+    <RelativeLayout android:id="@+id/header"
+        android:layout_height="64dip"
+        android:layout_width="match_parent"
+        android:background="@android:drawable/list_selector_background"
     >
 
-        <!-- Account info header -->
-        <RelativeLayout android:id="@+id/header"
-            android:layout_height="64dip"
+        <ImageView android:id="@+id/header_color_bar"
             android:layout_width="match_parent"
-        >
+            android:layout_height="4dip"
+            android:layout_marginBottom="5dip"
+            android:background="@color/edit_divider"
+        />
 
-            <ImageView android:id="@+id/header_color_bar"
-                android:layout_width="match_parent"
-                android:layout_height="4dip"
-                android:layout_marginBottom="5dip"
-                android:background="@color/edit_divider"
-            />
+        <ImageView android:id="@+id/header_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="7dip"
+            android:layout_marginRight="7dip"
+            android:layout_centerVertical="true"
+            android:layout_below="@id/header_color_bar"
+        />
 
-            <ImageView android:id="@+id/header_icon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="7dip"
-                android:layout_marginRight="7dip"
-                android:layout_centerVertical="true"
-                android:layout_below="@id/header_color_bar"
-            />
+        <TextView android:id="@+id/header_account_type"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_toRightOf="@+id/header_icon"
+            android:layout_alignTop="@id/header_icon"
+            android:layout_marginTop="-4dip"
 
-            <TextView android:id="@+id/header_account_type"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_toRightOf="@+id/header_icon"
-                android:layout_alignTop="@id/header_icon"
-                android:layout_marginTop="-4dip"
+            android:textSize="24sp"
+            android:textColor="?android:attr/textColorPrimary"
+            android:singleLine="true"
+        />
 
-                android:textSize="24sp"
-                android:textColor="?android:attr/textColorPrimary"
-                android:singleLine="true"
-            />
+        <TextView android:id="@+id/header_account_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_toRightOf="@+id/header_icon"
+            android:layout_alignBottom="@+id/header_icon"
+            android:layout_marginBottom="2dip"
 
-            <TextView android:id="@+id/header_account_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_toRightOf="@+id/header_icon"
-                android:layout_alignBottom="@+id/header_icon"
-                android:layout_marginBottom="2dip"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorPrimary"
+            android:singleLine="true"
+        />
 
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:textColor="?android:attr/textColorPrimary"
-                android:singleLine="true"
-            />
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_alignParentBottom="true"
 
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:layout_alignParentBottom="true"
+            android:background="?android:attr/listDivider"
+        />
+    </RelativeLayout>
 
-                android:background="?android:attr/listDivider"
-            />
-
-        </RelativeLayout>
+    <LinearLayout
+        android:id="@+id/body"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
 
         <FrameLayout
             android:id="@+id/stub_photo"
@@ -107,74 +96,43 @@
 
         </FrameLayout>
 
-        <include
+        <com.android.contacts.views.editor.FieldEditorView
             android:id="@+id/edit_name"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:paddingRight="?android:attr/scrollbarSize"
             android:layout_below="@id/stub_photo"
             android:layout_marginTop="6dip"
-            android:layout_marginBottom="4dip"
-            layout="@layout/item_generic_editor" />
+            android:layout_marginBottom="4dip" />
 
-        <TextView android:id="@+id/read_only_name"
+        <ViewStub android:id="@+id/aggregation_suggestion_stub"
+            android:inflatedId="@+id/aggregation_suggestion"
+            android:layout="@layout/aggregation_suggestions"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="6dip"
-            android:layout_marginBottom="6dip"
-            android:layout_marginLeft="10dip"
-
-            android:textAppearance="?android:attr/textAppearanceLarge"
-        />
+            android:visibility="visible"/>
 
         <LinearLayout
-            android:id="@+id/sect_general"
+            android:id="@+id/sect_fields"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="vertical"
         />
 
-        <View android:id="@+id/head_secondary_divider"
+        <View
             android:layout_width="match_parent"
             android:layout_height="1px"
-            android:background="?android:attr/listDivider" />
-
-        <TextView
-            android:id="@+id/head_secondary"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-
-            android:gravity="center_vertical"
-            android:minHeight="?android:attr/listPreferredItemHeight"
-            android:text="@string/edit_secondary_collapse"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="@color/kind_title"
-            android:singleLine="true"
-            android:ellipsize="marquee"
-            android:focusable="true"
-            android:clickable="true"
-            android:paddingLeft="10dip"
-            android:drawablePadding="10dip" />
-
-        <LinearLayout
-            android:id="@+id/sect_secondary"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical" />
-
-        <TextView
-            android:id="@+id/edit_read_only"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="10dip"
-            android:layout_marginBottom="10dip"
-            android:layout_marginLeft="10dip"
-
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="?android:attr/textColorPrimary"
-            android:drawableLeft="@android:drawable/ic_dialog_alert"
-            android:drawablePadding="10dip"
+            android:layout_alignParentBottom="true"
+            android:background="?android:attr/listDivider"
         />
 
+        <Button
+            android:id="@+id/button_add_field"
+            android:text="@string/add_field"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="right"
+            android:layout_marginTop="10dip"
+        />
     </LinearLayout>
-
-</com.android.contacts.ui.widget.ContactEditorView>
+</com.android.contacts.views.editor.RawContactEditorView>
diff --git a/res/layout/item_editor_field.xml b/res/layout/item_editor_field.xml
deleted file mode 100644
index 9ad8689..0000000
--- a/res/layout/item_editor_field.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<EditText
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content" />
diff --git a/res/layout/item_generic_editor.xml b/res/layout/item_generic_editor.xml
deleted file mode 100644
index e672eba..0000000
--- a/res/layout/item_generic_editor.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
--->
-
-<com.android.contacts.ui.widget.GenericEditorView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:baselineAligned="false"
-    android:paddingRight="?android:attr/scrollbarSize">
-
-    <Button
-        android:id="@+id/edit_label"
-        android:layout_width="100dip"
-        android:layout_height="wrap_content"
-        android:visibility="gone"
-        android:gravity="left|center_vertical" />
-
-    <ImageButton
-        android:id="@+id/edit_delete"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        style="@style/MinusButton" />
-
-    <LinearLayout
-        android:id="@+id/edit_fields"
-        android:layout_width="0dip"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="4dip"
-        android:layout_alignWithParentIfMissing="true"
-        android:layout_toRightOf="@id/edit_label"
-        android:layout_toLeftOf="@id/edit_delete"
-        android:orientation="vertical"
-        android:baselineAligned="false"
-        android:gravity="center_vertical" />
-
-    <ImageButton
-        android:id="@+id/edit_more"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_alignBottom="@id/edit_fields"
-        android:visibility="gone"
-        style="@style/MoreButton" />
-
-    <ImageButton
-        android:id="@+id/edit_less"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_alignBottom="@id/edit_fields"
-        android:visibility="gone"
-        style="@style/LessButton" />
-
-</com.android.contacts.ui.widget.GenericEditorView>
diff --git a/res/layout/item_group_membership.xml b/res/layout/item_group_membership.xml
new file mode 100644
index 0000000..b349390
--- /dev/null
+++ b/res/layout/item_group_membership.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<com.android.contacts.views.editor.GroupMembershipView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+    android:orientation="vertical">
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1px"
+        android:background="?android:attr/listDivider" />
+
+    <LinearLayout
+        android:id="@+id/kind_header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_marginLeft="14dip"
+        android:layout_marginTop="2dip"
+        android:layout_marginBottom="2dip"
+        android:layout_marginRight="?android:attr/scrollbarSize"
+        android:orientation="horizontal"
+        android:gravity="center_vertical"
+        android:focusable="true"
+        android:clickable="true">
+
+        <TextView
+            android:id="@+id/kind_title"
+            android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="@color/kind_title"
+            android:singleLine="true"
+            android:ellipsize="marquee"
+            android:fadingEdge="horizontal" />
+
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/group_list"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:attr/textAppearanceMedium"
+        android:ellipsize="end"
+        android:gravity="left"
+    />
+
+</com.android.contacts.views.editor.GroupMembershipView>
diff --git a/res/layout/item_kind_section.xml b/res/layout/item_kind_section.xml
index d1dec5e..0b0656d 100644
--- a/res/layout/item_kind_section.xml
+++ b/res/layout/item_kind_section.xml
@@ -16,7 +16,7 @@
 
 <!-- the body surrounding all editors for a specific kind -->
 
-<com.android.contacts.ui.widget.KindSectionView
+<com.android.contacts.views.editor.KindSectionView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -25,7 +25,7 @@
 
     <View
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
+        android:layout_height="1px"
         android:background="?android:attr/listDivider" />
 
     <LinearLayout
@@ -53,12 +53,17 @@
             android:ellipsize="marquee"
             android:fadingEdge="horizontal" />
 
-        <ImageView
+        <ImageButton
             android:id="@+id/kind_plus"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:duplicateParentState="true"
-            style="@style/PlusButton" />
+            android:background="@drawable/btn_plus"
+            android:paddingLeft="@dimen/editor_round_button_padding_left"
+            android:paddingRight="@dimen/editor_round_button_padding_right"
+            android:paddingTop="@dimen/editor_round_button_padding_top"
+            android:paddingBottom="@dimen/editor_round_button_padding_bottom"
+            android:contentDescription="@string/description_plus_button" />
 
     </LinearLayout>
 
@@ -69,4 +74,4 @@
         android:paddingBottom="6dip"
         android:orientation="vertical" />
 
-</com.android.contacts.ui.widget.KindSectionView>
+</com.android.contacts.views.editor.KindSectionView>
diff --git a/res/layout/item_photo_editor.xml b/res/layout/item_photo_editor.xml
index b981131..35ade24 100644
--- a/res/layout/item_photo_editor.xml
+++ b/res/layout/item_photo_editor.xml
@@ -14,7 +14,7 @@
      limitations under the License.
 -->
 
-<com.android.contacts.ui.widget.PhotoEditorView
+<com.android.contacts.views.editor.PhotoEditorView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="@dimen/edit_photo_size"
     android:layout_height="@dimen/edit_photo_size"
diff --git a/res/layout/item_read_only_contact_editor.xml b/res/layout/item_read_only_contact_editor.xml
index df442c8..eb8ec7f 100644
--- a/res/layout/item_read_only_contact_editor.xml
+++ b/res/layout/item_read_only_contact_editor.xml
@@ -15,7 +15,7 @@
 -->
 
 <!-- placed inside act_edit as tabcontent -->
-<com.android.contacts.ui.widget.ReadOnlyContactEditorView
+<com.android.contacts.views.editor.ReadOnlyRawContactEditorView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -150,4 +150,4 @@
         />
     </LinearLayout>
 
-</com.android.contacts.ui.widget.ReadOnlyContactEditorView>
+</com.android.contacts.views.editor.ReadOnlyRawContactEditorView>
diff --git a/res/layout/list_section.xml b/res/layout/list_section.xml
new file mode 100644
index 0000000..e920673
--- /dev/null
+++ b/res/layout/list_section.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<!-- Layout used for list section separators. -->
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="25dip"
+    android:background="@drawable/section_header"
+    >
+    <TextView
+        android:id="@+id/header_text"
+        android:layout_width="56dip"
+        android:layout_height="wrap_content"
+        android:layout_centerVertical="true"
+        android:layout_alignParentLeft="true"
+        android:textStyle="bold"
+        android:textColor="@color/section_header_text_color"
+        android:textSize="14sp"
+        android:gravity="center"
+    />
+</RelativeLayout>
diff --git a/res/layout-finger/list_separator.xml b/res/layout/list_separator.xml
similarity index 100%
rename from res/layout-finger/list_separator.xml
rename to res/layout/list_separator.xml
diff --git a/res/layout/navigation_bar.xml b/res/layout/navigation_bar.xml
new file mode 100644
index 0000000..b52815c
--- /dev/null
+++ b/res/layout/navigation_bar.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/navigation_bar"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="horizontal">
+
+    <LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/filter_container"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        android:layout_marginLeft="8dip">
+        <FrameLayout
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:minWidth="220dip"
+            android:background="@drawable/filter_selector_background">
+            <TextView
+                android:id="@+id/search_label"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:gravity="center_vertical"
+                android:textAppearance="?android:attr/textAppearanceMedium"
+                android:text="@string/search_label" />
+
+            <view
+                class="com.android.contacts.list.ContactListFilterView"
+                android:id="@+id/filter_view"
+                android:layout_height="match_parent"
+                android:layout_width="wrap_content">
+                <FrameLayout
+                    android:layout_height="match_parent"
+                    android:layout_width="wrap_content">
+                    <TextView
+                        android:id="@+id/label"
+                        android:layout_height="match_parent"
+                        android:layout_width="wrap_content"
+                        android:gravity="center_vertical"
+                        android:textAppearance="?android:attr/textAppearanceMedium"
+                        android:ellipsize="end" />
+                    <LinearLayout
+                        android:id="@+id/group"
+                        android:layout_height="wrap_content"
+                        android:layout_width="wrap_content"
+                        android:orientation="vertical"
+                        android:layout_gravity="center_vertical">
+                        <TextView
+                            android:id="@+id/group_label"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:textAppearance="?android:attr/textAppearanceMedium"
+                            android:ellipsize="end" />
+                        <TextView
+                            android:id="@+id/account_label"
+                            android:layout_height="wrap_content"
+                            android:layout_width="wrap_content"
+                            android:textAppearance="?android:attr/textAppearanceSmall"
+                            android:ellipsize="end" />
+                    </LinearLayout>
+                </FrameLayout>
+            </view>
+        </FrameLayout>
+
+        <ImageView
+            android:id="@+id/filter_indicator"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dip"
+            android:layout_marginBottom="13dip"
+            android:layout_gravity="bottom"
+            android:src="@drawable/filter_selector_corner" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="3dip"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="7dip"
+        android:layout_marginRight="7dip"
+        android:background="@drawable/cab_divider_holo_light" />
+    <view
+        class="android.widget.SearchView"
+        android:id="@+id/search_view"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical" />
+    />
+
+</LinearLayout>
diff --git a/res/layout-finger/phone_disambig_item.xml b/res/layout/phone_disambig_item.xml
similarity index 100%
rename from res/layout-finger/phone_disambig_item.xml
rename to res/layout/phone_disambig_item.xml
diff --git a/res/layout/pinned_header_list_demo.xml b/res/layout/pinned_header_list_demo.xml
new file mode 100644
index 0000000..9a26e98
--- /dev/null
+++ b/res/layout/pinned_header_list_demo.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/pinned_header_list_layout"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        >
+
+    <view
+        class="com.android.contacts.widget.PinnedHeaderListView"
+        android:id="@android:id/list"
+        android:layout_width="match_parent"
+        android:layout_height="0dip"
+        android:fastScrollEnabled="true"
+        android:layout_weight="1"
+    />
+</LinearLayout>
diff --git a/res/layout-finger/preference_with_more_button.xml b/res/layout/preference_with_more_button.xml
similarity index 100%
rename from res/layout-finger/preference_with_more_button.xml
rename to res/layout/preference_with_more_button.xml
diff --git a/res/layout/quickcontact.xml b/res/layout/quickcontact.xml
new file mode 100644
index 0000000..34bbc9a
--- /dev/null
+++ b/res/layout/quickcontact.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<view
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    class="com.android.contacts.quickcontact.QuickContactWindow$RootLayout"
+    android:id="@+id/root"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingLeft="@dimen/quickcontact_shadow_horiz"
+    android:paddingRight="@dimen/quickcontact_shadow_horiz"
+    android:background="@drawable/quickcontact_drop_shadow">
+
+    <FrameLayout
+        android:id="@+id/header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dip">
+
+        <ViewStub
+            android:id="@+id/header_small"
+            android:inflatedId="@+id/header_small"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout="@layout/quickcontact_header_small" />
+
+        <ViewStub
+            android:id="@+id/header_medium"
+            android:inflatedId="@+id/header_medium"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout="@layout/quickcontact_header_med" />
+
+        <ViewStub
+            android:id="@+id/header_large"
+            android:inflatedId="@+id/header_large"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout="@layout/quickcontact_header_large" />
+
+    </FrameLayout>
+
+    <HorizontalScrollView
+        android:id="@+id/scroll"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/header"
+        android:fadingEdgeLength="0dip"
+        android:background="@drawable/quickcontact_slider_background"
+        android:scrollbars="none">
+
+        <LinearLayout
+            android:id="@+id/quickcontact"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:paddingTop="4dip"
+            android:paddingBottom="4dip"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@drawable/quickcontact_slider_grip_left" />
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@drawable/quickcontact_slider_grip_right" />
+
+        </LinearLayout>
+
+    </HorizontalScrollView>
+
+    <FrameLayout
+        android:id="@+id/footer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/scroll"
+        android:background="@drawable/quickcontact_bottom_frame" />
+
+    <LinearLayout
+        android:id="@+id/footer_disambig"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/scroll"
+        android:background="@drawable/quickcontact_disambig_bottom_bg"
+        android:orientation="vertical"
+        android:visibility="gone">
+
+        <ListView
+            android:id="@android:id/list"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:layout_weight="1"
+            android:background="@color/quickcontact_disambig"
+            android:divider="@drawable/quickcontact_disambig_divider"
+            android:cacheColorHint="@null" />
+
+        <CheckBox
+            android:id="@android:id/checkbox"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="19dip"
+            android:layout_marginRight="19dip"
+            android:minHeight="60dip"
+            android:textColor="#f000"
+            android:textStyle="bold"
+            android:text="@string/quickcontact_remember_choice"
+            android:textAppearance="?android:attr/textAppearanceSmallInverse"
+            android:button="@drawable/quickcontact_disambig_checkbox" />
+
+    </LinearLayout>
+
+    <ImageView
+        android:id="@+id/arrow_up"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:src="@drawable/quickcontact_arrow_up" />
+
+    <ImageView
+        android:id="@+id/arrow_down"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="-1dip"
+        android:layout_below="@id/footer"
+        android:src="@drawable/quickcontact_arrow_down" />
+
+    <ImageView
+        android:id="@+id/arrow_down_stub"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="-1dip"
+        android:layout_below="@id/footer_disambig"
+        android:visibility="invisible"
+        android:src="@drawable/quickcontact_arrow_down" />
+
+</view>
diff --git a/res/layout-finger/quickcontact_header_large.xml b/res/layout/quickcontact_header_large.xml
similarity index 100%
rename from res/layout-finger/quickcontact_header_large.xml
rename to res/layout/quickcontact_header_large.xml
diff --git a/res/layout-finger/quickcontact_header_med.xml b/res/layout/quickcontact_header_med.xml
similarity index 100%
rename from res/layout-finger/quickcontact_header_med.xml
rename to res/layout/quickcontact_header_med.xml
diff --git a/res/layout-finger/quickcontact_header_small.xml b/res/layout/quickcontact_header_small.xml
similarity index 100%
rename from res/layout-finger/quickcontact_header_small.xml
rename to res/layout/quickcontact_header_small.xml
diff --git a/res/layout/quickcontact_item.xml b/res/layout/quickcontact_item.xml
new file mode 100644
index 0000000..ca57d66
--- /dev/null
+++ b/res/layout/quickcontact_item.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<com.android.contacts.quickcontact.CheckableImageView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="59dip"
+    android:layout_height="51dip"
+    android:paddingLeft="12dip"
+    android:paddingRight="12dip"
+    android:paddingTop="8dip"
+    android:paddingBottom="8dip"
+    android:scaleType="centerInside"
+    android:focusable="true"
+    android:clickable="true"
+    android:background="@drawable/quickcontact_slider_btn" />
diff --git a/res/layout-finger/quickcontact_resolve_item.xml b/res/layout/quickcontact_resolve_item.xml
similarity index 100%
rename from res/layout-finger/quickcontact_resolve_item.xml
rename to res/layout/quickcontact_resolve_item.xml
diff --git a/res/layout-finger/recent_calls.xml b/res/layout/recent_calls.xml
similarity index 100%
rename from res/layout-finger/recent_calls.xml
rename to res/layout/recent_calls.xml
diff --git a/res/layout/recent_calls_list_child_item.xml b/res/layout/recent_calls_list_child_item.xml
new file mode 100644
index 0000000..527e259
--- /dev/null
+++ b/res/layout/recent_calls_list_child_item.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeight"
+    android:paddingLeft="7dip"
+    android:background="@drawable/list_item_background_secondary"
+>
+
+    <ImageView android:id="@+id/call_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:layout_alignParentRight="true"
+
+        android:gravity="center_vertical"
+        android:src="@android:drawable/sym_action_call"
+        android:background="@drawable/call_background_secondary"
+    />
+
+    <include layout="@layout/recent_calls_list_item_layout"/>
+
+</RelativeLayout>
diff --git a/res/layout/recent_calls_list_group_item.xml b/res/layout/recent_calls_list_group_item.xml
new file mode 100644
index 0000000..79423fa
--- /dev/null
+++ b/res/layout/recent_calls_list_group_item.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeight"
+    android:paddingLeft="7dip"
+>
+
+    <ImageView android:id="@+id/call_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:layout_alignParentRight="true"
+
+        android:gravity="center_vertical"
+        android:src="@android:drawable/sym_action_call"
+        android:background="@drawable/call_background"
+    />
+
+    <View android:id="@+id/divider"
+        android:layout_width="1px"
+        android:layout_height="match_parent"
+        android:layout_marginTop="5dip"
+        android:layout_marginBottom="5dip"
+        android:layout_toLeftOf="@id/call_icon"
+        android:layout_marginLeft="11dip"
+        android:background="@drawable/divider_vertical_dark"
+    />
+
+    <TextView android:id="@+id/date"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/divider"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="8dip"
+        android:layout_marginLeft="10dip"
+
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:singleLine="true"
+    />
+
+    <TextView android:id="@+id/label"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentBottom="true"
+        android:layout_marginLeft="36dip"
+        android:layout_marginRight="5dip"
+        android:layout_alignBaseline="@id/date"
+
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+        android:textStyle="bold"
+    />
+
+    <TextView android:id="@+id/number"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toRightOf="@id/label"
+        android:layout_toLeftOf="@id/date"
+        android:layout_alignBaseline="@id/label"
+        android:layout_alignWithParentIfMissing="true"
+
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:textAppearance="?android:attr/textAppearanceSmall"
+    />
+
+    <TextView android:id="@+id/groupSize"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_toLeftOf="@id/divider"
+        android:layout_above="@id/date"
+        android:layout_alignWithParentIfMissing="true"
+        android:layout_marginBottom="-10dip"
+
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:singleLine="true"
+        android:gravity="center_vertical"
+    />
+
+    <TextView android:id="@+id/line1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:layout_toLeftOf="@+id/groupSize"
+        android:layout_above="@id/date"
+        android:layout_alignWithParentIfMissing="true"
+        android:layout_marginLeft="36dip"
+        android:layout_marginBottom="-10dip"
+
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:singleLine="true"
+        android:ellipsize="marquee"
+        android:gravity="center_vertical"
+    />
+
+    <ImageView
+        android:id="@+id/groupIndicator"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_centerVertical="true"
+        android:src="@*android:drawable/expander_ic_minimized"
+        android:gravity="center_vertical"
+    />
+</RelativeLayout>
diff --git a/res/layout/recent_calls_list_item.xml b/res/layout/recent_calls_list_item.xml
new file mode 100644
index 0000000..2c519d6
--- /dev/null
+++ b/res/layout/recent_calls_list_item.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 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.
+-->
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="?android:attr/listPreferredItemHeight"
+    android:paddingLeft="7dip"
+>
+
+    <ImageView android:id="@+id/call_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent"
+        android:paddingLeft="14dip"
+        android:paddingRight="14dip"
+        android:layout_alignParentRight="true"
+
+        android:gravity="center_vertical"
+        android:src="@android:drawable/sym_action_call"
+        android:background="@drawable/call_background"
+    />
+
+    <include layout="@layout/recent_calls_list_item_layout"/>
+
+</RelativeLayout>
diff --git a/res/layout-finger/recent_calls_list_item_layout.xml b/res/layout/recent_calls_list_item_layout.xml
similarity index 100%
rename from res/layout-finger/recent_calls_list_item_layout.xml
rename to res/layout/recent_calls_list_item_layout.xml
diff --git a/res/layout/search_bar.xml b/res/layout/search_bar.xml
new file mode 100644
index 0000000..304c35d
--- /dev/null
+++ b/res/layout/search_bar.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/search_bar"
+    android:layout_width="match_parent"
+    android:layout_height="64dip"
+    android:orientation="vertical"
+    android:focusable="true"
+    android:descendantFocusability="afterDescendants"
+    android:background="@drawable/bg_blk_search_contact">
+
+    <!-- Outer layout defines the entire search bar at the top of the screen -->
+    <LinearLayout
+        android:id="@+id/search_plate"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:paddingLeft="4dip"
+        android:paddingRight="10dip"
+        android:paddingTop="6dip"
+        android:paddingBottom="0dip"        
+        >
+
+        <!-- Inner layout contains the app icon, button(s) and EditText -->
+        <LinearLayout
+            android:id="@+id/search_edit_frame"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <ImageView 
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content" 
+                android:src="@drawable/ic_launcher_contacts"
+                android:layout_marginRight="7dip"
+                android:layout_gravity="center_vertical"
+                android:scaleType="centerInside" />
+              
+            <view
+                class="com.android.contacts.widget.SearchEditText"
+                android:id="@+id/search_src_text"
+                android:layout_height="wrap_content"
+                android:layout_width="0dip"
+                android:layout_weight="1.0"
+                android:layout_marginLeft="4dip"
+                android:layout_marginBottom="0dip"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:inputType="textNoSuggestions"
+                android:imeOptions="flagNoExtractUi"
+                android:hint="@string/search_bar_hint"
+                android:drawableRight="@drawable/magnifying_glass"
+                android:freezesText="true"
+            />
+        </LinearLayout>
+        
+    </LinearLayout>
+
+</LinearLayout>
diff --git a/res/layout/search_header.xml b/res/layout/search_header.xml
new file mode 100644
index 0000000..1eaa4e0
--- /dev/null
+++ b/res/layout/search_header.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="28dip"
+    android:background="@drawable/infobar_dark">
+    <TextView
+        android:id="@+id/totalContactsText"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_centerVertical="true"
+        android:layout_alignParentLeft="true"
+        android:layout_marginLeft="8dip"
+        android:textColor="#ffbfbfbf"
+        android:textSize="14sp"
+        android:textStyle="normal" />
+
+    <ProgressBar
+        android:id="@+id/progress"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        style="?android:attr/progressBarStyleSmall"
+        android:layout_alignParentRight="true"
+        android:layout_centerVertical="true"
+        android:layout_marginRight="10dip" />
+
+</RelativeLayout>
diff --git a/res/layout-finger/set_primary_checkbox.xml b/res/layout/set_primary_checkbox.xml
similarity index 100%
rename from res/layout-finger/set_primary_checkbox.xml
rename to res/layout/set_primary_checkbox.xml
diff --git a/res/layout/social_widget.xml b/res/layout/social_widget.xml
new file mode 100644
index 0000000..b6d662b
--- /dev/null
+++ b/res/layout/social_widget.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="#ff222222"
+>
+    <ImageView
+        android:id="@+id/image"
+        android:layout_width="72dip"
+        android:layout_height="72dip"
+        android:layout_marginRight="8dip" />
+    <LinearLayout
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:orientation="vertical"
+        android:layout_gravity="center_vertical" >
+
+        <TextView android:id="@+id/name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textStyle="bold"
+            android:shadowColor="#BB000000"
+            android:shadowRadius="2.75"
+         />
+
+        <TextView android:id="@+id/phonetic_name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+
+        <TextView android:id="@+id/status"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+
+        <TextView android:id="@+id/status_date"
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:layout_weight="1"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textSize="12sp"
+            android:layout_marginTop="-2dip"
+            android:visibility="gone"
+        />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout-finger/split_aggregate_list_item.xml b/res/layout/split_aggregate_list_item.xml
similarity index 100%
rename from res/layout-finger/split_aggregate_list_item.xml
rename to res/layout/split_aggregate_list_item.xml
diff --git a/res/layout/status_bar_ongoing_event_progress_bar.xml b/res/layout/status_bar_ongoing_event_progress_bar.xml
new file mode 100644
index 0000000..3c7530a
--- /dev/null
+++ b/res/layout/status_bar_ongoing_event_progress_bar.xml
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+ * Copyright 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.
+ /
+TODO: This is copied from DownloadProvider, and looks similar to Bluetooth's.
+      It might be better to have this in framework.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:background="@android:drawable/status_bar_item_app_background"
+    >
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="horizontal"
+        >
+        <LinearLayout
+            android:layout_width="40dp"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:paddingTop="8dp"
+            android:focusable="true"
+            >
+            <ImageView
+                android:id="@+id/status_icon"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:src="@android:drawable/sym_def_app_icon"
+                />
+            <TextView android:id="@+id/status_progress_text"
+                android:layout_width="wrap_content" 
+                android:layout_height="wrap_content"
+                android:textColor="#ff000000"
+                android:singleLine="true"
+                android:textSize="14sp"
+                android:layout_gravity="center_horizontal" />
+        </LinearLayout>
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:focusable="true">
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:focusable="true"
+                android:layout_alignParentTop="true"
+                android:paddingTop="10dp">
+                <TextView android:id="@+id/status_description"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="#ff000000"
+                    android:singleLine="true"
+                    android:textSize="18sp"
+                    android:paddingLeft="5dp" />
+            </LinearLayout>
+            <ProgressBar
+               android:id="@+id/status_progress_bar"
+               style="?android:attr/progressBarStyleHorizontal"
+               android:layout_width="match_parent"
+               android:layout_height="wrap_content"
+               android:layout_alignParentBottom="true"
+               android:paddingBottom="8dp"
+               android:paddingRight="25dp" />
+        </RelativeLayout>
+    </LinearLayout>
+
+    <ImageView
+       android:layout_width="match_parent"
+       android:layout_height="wrap_content"
+       android:src="@android:drawable/divider_horizontal_bright"
+       />
+</LinearLayout>
+
diff --git a/res/layout-finger/tab_account_name.xml b/res/layout/tab_account_name.xml
similarity index 100%
rename from res/layout-finger/tab_account_name.xml
rename to res/layout/tab_account_name.xml
diff --git a/res/layout-finger/tab_indicator.xml b/res/layout/tab_indicator.xml
similarity index 100%
rename from res/layout-finger/tab_indicator.xml
rename to res/layout/tab_indicator.xml
diff --git a/res/layout-finger/tab_layout.xml b/res/layout/tab_layout.xml
similarity index 100%
rename from res/layout-finger/tab_layout.xml
rename to res/layout/tab_layout.xml
diff --git a/res/layout-finger/tab_left_arrow.xml b/res/layout/tab_left_arrow.xml
similarity index 100%
rename from res/layout-finger/tab_left_arrow.xml
rename to res/layout/tab_left_arrow.xml
diff --git a/res/layout-finger/tab_right_arrow.xml b/res/layout/tab_right_arrow.xml
similarity index 100%
rename from res/layout-finger/tab_right_arrow.xml
rename to res/layout/tab_right_arrow.xml
diff --git a/res/layout-finger/total_contacts.xml b/res/layout/total_contacts.xml
similarity index 100%
rename from res/layout-finger/total_contacts.xml
rename to res/layout/total_contacts.xml
diff --git a/res/layout-finger/twelve_key_dialer.xml b/res/layout/twelve_key_dialer.xml
similarity index 100%
rename from res/layout-finger/twelve_key_dialer.xml
rename to res/layout/twelve_key_dialer.xml
diff --git a/res/layout-finger/voicemail_dial_delete.xml b/res/layout/voicemail_dial_delete.xml
similarity index 100%
rename from res/layout-finger/voicemail_dial_delete.xml
rename to res/layout/voicemail_dial_delete.xml
diff --git a/res/menu/actions.xml b/res/menu/actions.xml
new file mode 100644
index 0000000..bc537c3
--- /dev/null
+++ b/res/menu/actions.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item
+        android:id="@+id/menu_add"
+        android:icon="@drawable/ic_menu_add_contact"
+        android:title="@string/menu_newContact"
+        android:showAsAction="always" />
+
+    <item
+        android:id="@+id/menu_settings"
+        android:icon="@drawable/ic_menu_settings"
+        android:title="@string/menu_settings" />
+
+    <item
+        android:id="@+id/menu_accounts"
+        android:icon="@drawable/ic_menu_accounts"
+        android:title="@string/menu_accounts" />
+
+    <item
+        android:id="@+id/menu_import_export"
+        android:icon="@drawable/ic_menu_import_export"
+        android:title="@string/menu_import_export" />
+
+</menu>
diff --git a/res/menu/edit.xml b/res/menu/edit.xml
index 6fafbcf..40fbf2d 100644
--- a/res/menu/edit.xml
+++ b/res/menu/edit.xml
@@ -18,23 +18,24 @@
     <item
         android:id="@+id/menu_done"
         android:alphabeticShortcut="\n"
-        android:icon="@android:drawable/ic_menu_save"
-        android:title="@string/menu_done" />
+        android:icon="@drawable/ic_menu_done"
+        android:title="@string/menu_done"
+        android:showAsAction="always" />
 
     <item
         android:id="@+id/menu_discard"
         android:alphabeticShortcut="q"
-        android:icon="@android:drawable/ic_menu_close_clear_cancel"
+        android:icon="@drawable/ic_menu_cancel"
         android:title="@string/menu_doNotSave" />
 
     <item
-        android:id="@+id/menu_add"
-        android:icon="@android:drawable/ic_menu_add"
+        android:id="@+id/menu_add_raw_contact"
+        android:icon="@drawable/ic_menu_add_contact"
         android:title="@string/menu_newContact" />
 
     <item
         android:id="@+id/menu_delete"
-        android:icon="@android:drawable/ic_menu_delete"
+        android:icon="@drawable/ic_menu_trash"
         android:title="@string/menu_deleteContact" />
 
     <item
diff --git a/res/menu/list.xml b/res/menu/list.xml
index b8f9b76..327c3ca 100644
--- a/res/menu/list.xml
+++ b/res/menu/list.xml
@@ -22,7 +22,7 @@
 
     <item
         android:id="@+id/menu_add"
-        android:icon="@android:drawable/ic_menu_add"
+        android:icon="@drawable/ic_menu_add_contact"
         android:title="@string/menu_newContact"
         android:alphabeticShortcut="n" />
 
@@ -33,7 +33,7 @@
 
     <item
         android:id="@+id/menu_accounts"
-        android:icon="@drawable/ic_menu_account_list"
+        android:icon="@drawable/ic_menu_accounts"
         android:title="@string/menu_accounts" />
 
     <item
diff --git a/res/menu/pick.xml b/res/menu/pick.xml
new file mode 100644
index 0000000..5302dd9
--- /dev/null
+++ b/res/menu/pick.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:id="@+id/menu_display_selected"
+        android:icon="@drawable/ic_menu_display_selected"
+        android:title="@string/menu_display_selected" />
+
+    <item
+        android:id="@+id/menu_display_all"
+        android:icon="@drawable/ic_menu_display_all"
+        android:title="@string/menu_display_all" />
+
+    <item
+        android:id="@+id/menu_select_all"
+        android:icon="@drawable/ic_menu_select"
+        android:title="@string/menu_select_all" />
+
+    <item
+        android:id="@+id/menu_select_none"
+        android:icon="@drawable/ic_menu_unselect"
+        android:title="@string/menu_select_none" />
+
+</menu>
diff --git a/res/menu/search.xml b/res/menu/search.xml
new file mode 100644
index 0000000..4e2e8e3
--- /dev/null
+++ b/res/menu/search.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item
+        android:id="@+id/menu_search"
+        android:icon="@android:drawable/ic_menu_search"
+        android:title="@string/menu_search" />
+
+</menu>
diff --git a/res/menu/view.xml b/res/menu/view.xml
index 428434d..f33a3f1 100644
--- a/res/menu/view.xml
+++ b/res/menu/view.xml
@@ -17,13 +17,14 @@
 <menu xmlns:android="http://schemas.android.com/apk/res/android">
     <item
         android:id="@+id/menu_edit"
-        android:icon="@android:drawable/ic_menu_edit"
+        android:icon="@drawable/ic_menu_compose"
         android:title="@string/menu_editContact"
-        android:alphabeticShortcut="e" />
+        android:alphabeticShortcut="e"
+        android:showAsAction="always" />
 
     <item
         android:id="@+id/menu_share"
-        android:icon="@android:drawable/ic_menu_share"
+        android:icon="@drawable/ic_menu_share"
         android:title="@string/menu_share"
         android:alphabeticShortcut="s" />
 
@@ -34,7 +35,6 @@
 
     <item
         android:id="@+id/menu_delete"
-        android:icon="@android:drawable/ic_menu_delete"
+        android:icon="@drawable/ic_menu_trash"
         android:title="@string/menu_deleteContact" />
-
 </menu>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 1aeb5ba..de3841e 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Kontaktní informace"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Zobrazit kontakt"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Upravit kontakt"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-mailová adresa:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Typ:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Vytvořit kontakt"</string>
     <string name="searchHint" msgid="8482945356247760701">"Vyhledat kontakty"</string>
     <string name="menu_search" msgid="9147752853603483719">"Hledat"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Nový kontakt"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Foneticky"</string>
     <string name="label_notes" msgid="8337354953278341042">"Poznámky"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Internetový hovor"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Vyzváněcí tón"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Jméno a příjmení"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Jméno (foneticky)"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Žádné kontakty nejsou viditelné"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Nalezen 1 kontakt"</item>
-    <item quantity="other" msgid="7752927996850263152">"Počet nalezených kontaktů: <xliff:g id="COUNT">%d</xliff:g>"</item>
+    <item quantity="one" msgid="5517063038754171134">"Počet nalezených položek: 1"</item>
+    <item quantity="other" msgid="3852668542926965042">"Počet nalezených položek: <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Kontakt nebyl nalezen"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Nenalezeno"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 kontakt"</item>
-    <item quantity="other" msgid="5660384247071761844">"Počet kontaktů: <xliff:g id="COUNT">%d</xliff:g>"</item>
+    <item quantity="one" msgid="4826918429708286628">"Počet nalezených položek: 1"</item>
+    <item quantity="other" msgid="7988132539476575389">"Počet nalezených položek: <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kontakty"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Oblíbené"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Kontakty na kartě SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Nemáte uloženy žádné kontakty, které by bylo možno zobrazit. (Pokud jste účet přidali právě teď, může synchronizace kontaktů trvat několik minut.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Nemáte uloženy žádné kontakty, které by bylo možno zobrazit."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Nemáte žádné kontakty, které by bylo možné zobrazit."\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>"."\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Nemáte žádné kontakty, které by bylo možné zobrazit. (Pokud jste právě přidali účet, může synchronizace kontaktů trvat několik minut.)"\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Možnosti zobrazení"</b></font>", pokud chcete změnit, které kontakty budou zobrazeny;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>"."\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Nemáte žádné kontakty, které by bylo možné zobrazit."\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>"."\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Nemáte žádné kontakty, které by bylo možné zobrazit. (Pokud jste právě přidali účet, může synchronizace kontaktů trvat několik minut.)"\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Možnosti zobrazení"</b></font>", pokud chcete změnit, které kontakty budou zobrazeny;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>"."\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Nemáte žádné kontakty, které by bylo možné zobrazit."\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>", pokud chcete importovat kontakty z karty SIM nebo SD."\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Nemáte žádné kontakty, které by bylo možné zobrazit. (Pokud jste právě přidali účet, může synchronizace kontaktů trvat několik minut.)"\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Možnosti zobrazení"</b></font>", pokud chcete změnit, které kontakty budou zobrazeny;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>", pokud chcete importovat kontakty z karty SIM nebo SD."\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Nemáte žádné kontakty, které by bylo možné zobrazit."\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>", pokud chcete importovat kontakty z karty SD."\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Nemáte žádné kontakty, které by bylo možné zobrazit. (Pokud jste právě přidali účet, může synchronizace kontaktů trvat několik minut.)"\n\n"Chcete-li přidat kontakty, stiskněte tlačítko "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" a dotkněte se položky:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Účty"</b></font>", pokud chcete přidat nebo nakonfigurovat účet a kontakty v něm synchronizovat s telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Možnosti zobrazení"</b></font>", pokud chcete změnit, které kontakty budou zobrazeny;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nový kontakt"</b></font>", pokud chcete vytvořit úplně nový kontakt;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importovat nebo exportovat"</b></font>", pokud chcete importovat kontakty z karty SD."\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Nemáte žádné oblíbené kontakty."\n\n"Přidání kontaktu do seznamu oblíbených:"\n\n"        "<li>"Dotkněte se karty "<b>"Kontakty"</b>"."\n</li>" "\n<li>"Dotkněte se kontaktu, který chcete přidat mezi oblíbené."\n</li>" "\n<li>"Dotkněte se hvězdičky vedle jména kontaktu."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Všechny kontakty"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Označené hvězdičkou"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Zavolat zpět"</string>
     <string name="callAgain" msgid="3197312117049874778">"Zavolat znovu"</string>
     <string name="returnCall" msgid="8171961914203617813">"Zpětné volání"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min <xliff:g id="SECONDS">%2$s</xliff:g> s"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> s"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Nejčastěji používané kontakty"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Přidat kontakt"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Chcete přidat „<xliff:g id="EMAIL">%s</xliff:g>“ do kontaktů?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"fotografie kontaktu"</string>
     <string name="description_minus_button" msgid="387136707700230172">"mínus"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Sdíl. úložiště nedostupné"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Žádná karta SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Sdílené úložiště nenalezeno"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Nebyla zjištěna žádná karta SD"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Žádná karta SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Nebyla zjištěna žádná karta SD"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Vyhledávání karty vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importovat z karty SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Import ze sdíl. úložiště"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importovat z karty SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Export do sdíl. úložiště"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exportovat na kartu SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importovat z karty SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportovat na kartu SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Sdílet viditelné kontakty"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importovat jeden soubor vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importovat několik souborů vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importovat všechny soubory vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Vyhledávání dat karty vCard ve sdíleném úložišti"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Vyhledávání dat karty vCard na kartě SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Vyhledávání ve sdíleném úložišti se nezdařilo"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Vyhledávání na kartě SD se nezdařilo"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Vyhledávání ve sdíleném úložišti se nezdařilo (Důvod: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Vyhledávání na kartě SD se nezdařilo. (Důvod: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Vyhledávání dat karty vCard na kartě SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Vyhledávání na kartě SD se nezdařilo"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Vyhledávání na kartě SD se nezdařilo. (Důvod: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Chyba V/V"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Není k dispozici dostatek paměti (soubor může být příliš velký)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Analýza karty vCard se z neznámého důvodu nezdařila."</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Analýza karty vCard se nezdařila. Přestože se zřejmě jedná o správný formát, aktuální implementace jej nepodporuje."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Ve sdíleném úložišti nebyl nalezen žádný soubor vCard"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Na kartě SD nebyl nalezen žádný soubor vCard"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Na kartě SD nebyl nalezen žádný soubor vCard"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Shromáždění metainformací zadaných souborů vCard se nezdařilo."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Import jednoho nebo více souborů se nezdařil (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Neznámá chyba"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Výběr souboru vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Čtení karty vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Čtení souborů vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Čtení dat karty vCard se nezdařilo"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontaktů"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> souborů"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Načítání vizitek vCard do mezipaměti místního dočasného úložiště"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Nástroj pro import načítá vizitky vCard do mezipaměti místního dočasného úložiště. Vlastní import bude zahájen v krátké době."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Čtení dat vizitky vCard se nezdařilo."</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Čtení dat vizitky vCard bylo zrušeno"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Import vizitky vCard byl dokončen"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Nástroj pro import vizitky vCard byl spuštěn."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Nástroj pro import vizitek vCard za okamžik importuje vizitku vCard."</string>
+    <string name="percentage" msgid="34897865327092209">"%s %%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Potvrdit export"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Opravdu chcete exportovat seznam kontaktů do souboru <xliff:g id="VCARD_FILENAME">%s</xliff:g>?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Export dat kontaktů se nezdařil"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Export dat kontaktů se nezdařil."\n"Příčina chyby: <xliff:g id="FAIL_REASON">%s</xliff:g>"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Žádný kontakt nelze exportovat"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Ve sdíleném úložišti je příliš mnoho souborů vCard"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Na kartě SD je příliš mnoho souborů vCard"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Na kartě SD je příliš mnoho souborů vCard"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Požadovaný název souboru (<xliff:g id="FILENAME">%s</xliff:g>) je příliš dlouhý"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Nástroj pro export vizitky vCard byl spuštěn."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Export vizitky vCard byl dokončen"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Export dat kontaktů"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Probíhá export dat kontaktů do souboru <xliff:g id="FILE_NAME">%s</xliff:g>"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Nelze spustit exportní program: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Načtení informací z databáze se nezdařilo"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Nelze exportovat žádné kontakty. Pokud máte v telefonu skutečně uložené kontakty, je možné, že některý poskytovatel datových služeb zakázal jejich export mimo telefon."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Editor karty vCard není správně inicializován"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Soubor <xliff:g id="FILE_NAME">%1$s</xliff:g> nelze otevřít: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontaktů"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Soubor <xliff:g id="FILE_NAME">%s</xliff:g> nelze otevřít: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%s</xliff:g> kontaktů"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Jména vašich kontaktů"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Přidat 2s pauzu"</string>
     <string name="add_wait" msgid="3360818652790319634">"Přidat čekání"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Aplikace potřebná k provedení této akce nebyla nalezena"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Zapamatovat tuto volbu"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Neznámé"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Žádná data"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Účty"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importovat/Exportovat"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importovat nebo exportovat kontakty"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Všechny ostatní kontakty"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Všechny kontakty"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Odebráním skupiny <xliff:g id="GROUP">%s</xliff:g> ze synchronizace odeberete ze synchronizace také všechny kontakty mimo skupinu."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Pouze v telefonu (nesynchronizováno)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Pouze v telefonu (nesynchronizováno)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Volat kontakt <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Volat domů"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Volat mobil"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chatovat pomocí ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chatovat pomocí Jabberu"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adresa"</string>
     <string name="postal_street" msgid="8133143961580058972">"Ulice"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Číslo poštovní schránky"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Čtvrť"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Stát"</string>
     <string name="postal_postcode" msgid="572136414136673751">"PSČ"</string>
     <string name="postal_country" msgid="7638264508416368690">"Země"</string>
+    <string name="full_name" msgid="6602579550613988977">"Jméno"</string>
     <string name="name_given" msgid="1687286314106019813">"Křestní jméno"</string>
     <string name="name_family" msgid="3416695586119999058">"Příjmení"</string>
     <string name="name_prefix" msgid="59756378548779822">"Titul před jménem"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Příjmení (foneticky)"</string>
     <string name="account_type_format" msgid="718948015590343010">"Kontakt ze zdroje <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"z účtu <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Kontakt služby <xliff:g id="SOURCE_0">%1$s</xliff:g> od uživatele <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Použít tuto fotografii"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Kontaktní informace ze zdroje <xliff:g id="SOURCE">%1$s</xliff:g> není možné na tomto zařízení upravit."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"U tohoto kontaktu nejsou uvedeny dodatečné informace"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Vybrat fotografii z galerie"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"V souvislosti se změnou jazyka probíhá aktualizace seznamu kontaktů."\n\n"Čekejte prosím..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Aktualizace seznamu kontaktů."\n\n"Čekejte prosím..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Probíhá upgrade kontaktů. "\n\n"Upgrade vyžaduje přibližně <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB vnitřní paměti telefonu. "\n\n"Zvolte jednu z následujících možností:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Probíhá upgrade kontaktů. "\n\n"Upgrade vyžaduje přibližně <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB vnitřní paměti telefonu. "\n\n"Zvolte jednu z následujících možností:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Odinstalovat některé aplikace"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Zkusit upgradovat znovu"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Výsledky vyhledávání pro dotaz: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Vyhledávání..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Načítání…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Zobrazit vybrané"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Zobrazit vše"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Vybrat vše"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Zrušit výběr všech"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"Počet vybraných příjemců: 1"</item>
+    <item quantity="other" msgid="4608837420986126229">"Počet vybraných příjemců: <xliff:g id="COUNT">%d</xliff:g>"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Neznámé kontakty"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Nevybrali jste žádné kontakty."</string>
+    <string name="add_field" msgid="5257149039253569615">"Přidat informace"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"pomocí služby <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> prostřednictvím služby <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"upravit"</string>
+    <string name="description_star" msgid="2605854427360036550">"oblíbené"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Upravit kontakt"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"sloučení se nezdařilo"</item>
+    <item quantity="other" msgid="425683718017380845">"sloučeno ze <xliff:g id="COUNT">%0$d</xliff:g> zdrojů"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Smazat"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Chyba při ukládání"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Ostatní"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;Č;D;E;F;G;H;CH;I;J;K;L;M;N;O;P;Q;R;Ř;S;Š;T;U;V;W;X;Y;Z;Ž"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index a42745e..19848d4 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Kontaktoplysninger"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Vis kontakt"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Rediger kontakt"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-mail-adresse:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Type: "</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Opret kontakt"</string>
     <string name="searchHint" msgid="8482945356247760701">"Søg i kontakter"</string>
     <string name="menu_search" msgid="9147752853603483719">"Søg"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Ny kontakt"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetisk"</string>
     <string name="label_notes" msgid="8337354953278341042">"Noter"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Internetopkald"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Ringetone"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Fornavn og efternavn"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Fonetisk navn"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Ingen synlige kontakter"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Fandt 1 kontakt"</item>
-    <item quantity="other" msgid="7752927996850263152">"Fandt <xliff:g id="COUNT">%d</xliff:g> kontaktpersoner"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 fundet"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> fundet"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Kontakten blev ikke fundet"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Ikke fundet"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 kontaktperson"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> kontaktpersoner"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 fundet"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> fundet"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kontakter"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favorit"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Kontakter på SIM-kort"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Du har ingen kontaktpersoner. (Hvis du lige har tilføjet en konto, kan det tage et par minutter at synkronisere kontaktpersoner)."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Du har ingen kontaktpersoner."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Du har ingen kontaktpersoner, der kan vises."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og på"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, som du kan synkronisere med telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en ny kontaktperson helt fra bunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Du har ingen kontaktpersoner, der kan vises. (Hvis du lige har tilføjet en konto, kan det tage et par minutter at synkronisere kontaktpersoner)."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og på"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, du kan synkronisere til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsindstillinger"</b></font>" for at ændre, hvilke kontaktpersoner der er synlige"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en ny kontaktperson fra bunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Du har ingen kontaktpersoner, der kan vises."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og på"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, du kan synkronisere med telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en ny kontaktperson fra bunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Du har ingen kontaktpersoner, der kan vises. (Hvis du lige har tilføjet en konto, kan det tage et par minutter at synkronisere kontaktpersonerne)."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og på"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, du kan synkronisere til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsindstillinger"</b></font>" for at ændre, hvilke kontaktpersoner der er synlige"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en ny kontaktperson fra bunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Du har ingen kontaktpersoner."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, som du kan synkronisere med telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en helt ny kontaktperson"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>" for at importere kontaktpersoner fra dit SIM-kort eller SD-kort"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Du har ingen kontaktpersoner. (Hvis du lige har tilføjet en konto, kan det tage et par minutter at synkronisere kontaktpersoner)."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, som du kan synkronisere til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsindstillinger"</b></font>" for at ændre, hvilke kontaktpersoner der er synlige"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en helt ny kontaktperson"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>" for at importere kontaktpersoner fra dit SIM-kort eller SD.kort"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Du har ingen kontaktpersoner."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, som du kan synkronisere med telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en helt ny kontaktperson "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>" for at importere kontaktpersoner fra dit SD-kort"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Du har ingen kontaktpersoner. (Hvis du lige har tilføjet en konto, kan det tage et par minutter at synkronisere kontaktpersoner)."\n\n"Hvis du vil tilføje kontaktpersoner, skal du trykke på "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" og "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konti"</b></font>" for at tilføje eller konfigurere en konto med kontaktpersoner, som du kan synkronisere til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsindstillinger"</b></font>" for at ændre, hvilke kontaktpersoner der er synlige"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontaktperson"</b></font>" for at oprette en ny kontaktperson fra bunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/eksporter"</b></font>" for at importere kontaktpersoner fra dit SD-kort"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Du har ingen favoritter."\n\n"Sådan føjer du en kontaktperson til din liste over favoritter:"\n\n"        "<li>"Tryk på fanen "<b>"Kontaktpersoner"</b>\n</li>" "\n<li>"Tryk på den kontaktperson, du ønsker at føje til dine foretrukne"\n</li>" "\n<li>"Tryk på stjerne ud for kontaktpersonens navn"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Alle kontakter"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Stjernemarkerede"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Ring tilbage"</string>
     <string name="callAgain" msgid="3197312117049874778">"Ring op igen"</string>
     <string name="returnCall" msgid="8171961914203617813">"Ring tilbage"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min. <xliff:g id="SECONDS">%2$s</xliff:g> sek."</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min. <xliff:g id="SECONDS">%s</xliff:g> sek."</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Jævnligt kontaktet"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Tilføj kontakt"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Føj \"<xliff:g id="EMAIL">%s</xliff:g>\" til kontaktpersoner?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"kontaktpersonfoto"</string>
     <string name="description_minus_button" msgid="387136707700230172">"minus"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Delt hukommelse utilgæng."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Der er intet SD-kort"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Ingen delt hukommelse fundet"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Der blev ikke fundet noget SD-kort"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Der er intet SD-kort"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Der blev ikke fundet noget SD-kort"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Søger efter vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importer fra SIM-kort"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importer fra delt hukom."</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importer fra SD-kort"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Eksporter til delt hukommelse"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Eksporter til SD-kort"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importer fra SD-kort"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Eksporter til SD-kort"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Del synlige kontaktpersoner"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importer en VCard-fil"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importer flere VCard-filer"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importer alle VCard-filer"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Søger efter vCard-filer i delt hukommelse"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Søger efter vCard-kort på SD-kortet"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Scanningen af delt hukommelse mislykkedes"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Scanningen af SD-kortet mislykkedes"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Scanningen af delt hukommelse mislykkedes (årsag: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Scanningen af SD-kortet mislykkedes: (Årsag: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Søger efter vCard-kort på SD-kortet"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Scanningen af SD-kortet mislykkedes"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Scanningen af SD-kortet mislykkedes: (Årsag: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"I/O-fejl"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Der er ikke nok hukommelse (filen er muligvis for stor)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"vCard kunne ikke parses pga. en uventet årsag"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"vCard kunne ikke parses, selv om det ser ud til at være et gyldigt format, da den nuværende implementering ikke understøtter det"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Der blev ikke fundet nogen vCard-fil i den delte hukommelse."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Der blev ikke fundet nogen VCard-fil på SD-kortet"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Der blev ikke fundet nogen VCard-fil på SD-kortet"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Metaoplysninger om angivne vCard-filer kunne ikke hentes."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"En eller flere filer blev ikke importeret (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Ukendt fejl"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Vælg vCard-fil"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Læser vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Læser vCard-fil(er)"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Læsning af vCard-data mislykkedes"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> af <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontakter"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> af <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> filer"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Gemmer vCard-fil(er) midlertidigt på lokal lagerplads"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Importøren gemmer vCard-fil(er) midlertidigt på lokal lagerplads. Den egentlige import begynder snart."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"vCard-data kunne ikke læses"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Læsning af vCard-data blev annulleret"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Import af vCard afsluttet"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Import af vCard startet."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"vCard-importøren importerer vCard-filen efter et stykke tid."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Bekræft eksport"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Er du sikker på, at du vil eksportere listen over kontaktpersoner til  \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Eksport af kontaktdata mislykkedes"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Eksport af kontaktpersondata mislykkedes."\n"Årsag til fejl: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Der er ingen kontakter, der kan eksporteres"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Der er for mange vCard-data på den delte hukommelse"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Der er for mange vCard-data på SD-kortet"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Der er for mange vCard-data på SD-kortet"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Det krævede filnavn er for langt (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Eksport af vCard startet."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Eksport af vCard afsluttet"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Eksporterer kontaktdata"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Kontaktdata eksporteres til \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Eksportfunktionen kunne ikke startes: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Kunne ikke hente databaseoplysninger"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Der er ingen kontaktpersoner, der kan eksporteres. Hvis du har kontaktpersoner på din telefon, har en dataudbyder muligvis forbudt, at kontaktpersonerne eksporteres fra telefonen."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"vCard-oprettelse ikke korrekt initialiseret"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%1$s</xliff:g>\" kunne ikke åbnes: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> af <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontakter"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%s</xliff:g>\" kunne ikke åbnes: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> af <xliff:g id="TOTAL_NUMBER">%s</xliff:g> kontakter"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Navne på dine kontakter"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Tilføj pause på 2 sek."</string>
     <string name="add_wait" msgid="3360818652790319634">"Tilføj Vent"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Der blev ikke fundet noget program til denne handling"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Husk dette valg"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Ukendte"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Ingen data"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Konti"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Import/eksport"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importer/eksporter kontakter"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Alle andre kontakter"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Alle kontakter"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Hvis \'<xliff:g id="GROUP">%s</xliff:g>\' fjernes fra synkronisering, vil kontaktpersoner, der ikke er i grupper, også fjernes fra synkroniseringen."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Kun telefon (ikke synkroniseret)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Kun telefon (ikke synkroniseret)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Ring til <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Ring hjem"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Ring til mobil"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chat ved hjælp af ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chat ved hjælp af Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adresse"</string>
     <string name="postal_street" msgid="8133143961580058972">"Gade"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Postboks"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Nabolag"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Stat"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Postnummer"</string>
     <string name="postal_country" msgid="7638264508416368690">"Land"</string>
+    <string name="full_name" msgid="6602579550613988977">"Navn"</string>
     <string name="name_given" msgid="1687286314106019813">"Fornavn"</string>
     <string name="name_family" msgid="3416695586119999058">"Efternavn"</string>
     <string name="name_prefix" msgid="59756378548779822">"Navnepræfiks"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Fonetisk efternavn"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> kontaktperson"</string>
     <string name="from_account_format" msgid="687567483928582084">"fra<xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_0">%1$s</xliff:g> kontaktperson fra <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Brug dette billede"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g> kontaktoplysninger kan ikke redigeres på denne enhed."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Ingen yderligere oplysninger for denne kontakt"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Vælg foto fra Galleri"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Kontaktlisten opdateres for at afspejle ændringen af sprog."\n\n"Vent et øjeblik..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Listen over kontaktpersoner opdateres."\n\n"Vent et øjeblik ..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Kontaktpersonerne er ved at blive opgraderet. "\n\n"Opgraderingen kræver ca. <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB intern lagerplads på telefonen."\n\n"Vælg et af følgende:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Kontaktpersonerne er ved at blive opgraderet. "\n\n"Opgraderingen kræver ca. <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB intern lagerplads på telefonen."\n\n"Vælg et af følgende:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Afinstaller nogle programmer"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Prøv at opgradere igen"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Søgeresultater for: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Søger ..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Indlæser…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Vis valgte"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Vis alle"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Vælg alle"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Fravælg alle"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 modtager er valgt"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> modtagere er valgt"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Ukendte kontaktpersoner"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Ingen kontaktpersoner er valgt."</string>
+    <string name="add_field" msgid="5257149039253569615">"Tilføj oplysninger"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"rediger"</string>
+    <string name="description_star" msgid="2605854427360036550">"foretrukken"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Rediger kontaktperson"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"blev ikke flettet"</item>
+    <item quantity="other" msgid="425683718017380845">"flettet fra <xliff:g id="COUNT">%0$d</xliff:g> kilder "</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Slet"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Fejl ved lagring"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Andre"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;Æ;Ø;Å"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 0fdf970..9d093c2 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Kontaktinformationen"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Kontakt anzeigen"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Kontakt bearbeiten"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-Mail-Adresse:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Typ:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Kontakt erstellen"</string>
     <string name="searchHint" msgid="8482945356247760701">"Kontakte durchsuchen"</string>
     <string name="menu_search" msgid="9147752853603483719">"Suche"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Neuer Kontakt"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Phonetisch"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notizen"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Internetanruf"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Klingelton"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Vor- und Nachname"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Phonetischer Name"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Keine sichtbaren Kontakte"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"1 Kontakt gefunden"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> Kontakte gefunden"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 gefunden"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> gefunden"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Kein Kontakt gefunden"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Nicht gefunden"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 Kontakt"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> Kontakte"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 gefunden"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> gefunden"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kontakte"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoriten"</string>
@@ -141,7 +144,7 @@
     <string name="liveFolderPhone" msgid="3739376066610926780">"Kontakte mit Telefonnummern"</string>
     <string name="menu_sendTextMessage" msgid="6937343460284499306">"Textnachricht senden"</string>
     <string name="recentCalls_callNumber" msgid="1756372533999226126">"<xliff:g id="NAME">%s</xliff:g> anrufen"</string>
-    <string name="recentCalls_editNumberBeforeCall" msgid="7756171675833267857">"Nr. vor Anruf bearbeiten"</string>
+    <string name="recentCalls_editNumberBeforeCall" msgid="7756171675833267857">"Nummer vor Anruf bearbeiten"</string>
     <string name="recentCalls_addToContact" msgid="1429899535546487008">"Zu Kontakten hinzufügen"</string>
     <string name="recentCalls_removeFromRecentList" msgid="401662244636511330">"Aus Anrufliste entfernen"</string>
     <string name="recentCalls_deleteAll" msgid="6352364392762163704">"Anrufliste löschen"</string>
@@ -160,11 +163,11 @@
     <string name="simContacts_title" msgid="27341688347689769">"Kontakte auf SIM-Karte"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Sie haben keine Kontakte. Wenn Sie gerade ein Konto hinzugefügt haben, kann die Synchronisierung der Kontakte einige Minuten dauern."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Sie haben keine Kontakte."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Es sind keine Kontakte vorhanden."\n\n"Drücken Sie zum Hinzufügen von Kontakten die "<font fgcolor="#ffffffff"><b>"Menütaste"</b></font>" und berühren Sie anschließend "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto mit Kontakten, die Sie mit dem Telefon synchronisieren möchten, hinzuzufügen oder zu konfigurieren."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen neuen Kontakt von Grund auf zu erstellen."\n</li>\n<li><font fgcolor="#ffffffff"><b>"Importieren/Exportieren"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Es sind keine Kontakte vorhanden. Wenn Sie gerade ein Konto hinzugefügt haben, kann es einige Minuten dauern, bis die Kontakte synchronisiert sind."\n\n"Drücken Sie zum Hinzufügen von Kontakten die "<font fgcolor="#ffffffff"><b>"Menütaste"</b></font>" und tippen Sie anschließend auf "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto mit Kontakten, die Sie mit dem Telefon synchronisieren möchten, hinzuzufügen oder zu konfigurieren."\n" "</li>\n<li><font fgcolor="#ffffffff"><b>"Anzeigeoptionen"</b></font>", um zu ändern, welche Kontakte angezeigt werden."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen neuen Kontakt von Grund auf zu erstellen."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importieren/Exportieren"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Es sind keine Kontakte vorhanden."\n\n"Drücken Sie zum Hinzufügen von Kontakten die "<font fgcolor="#ffffffff"><b>"Menütaste"</b></font>" und berühren Sie anschließend "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto mit Kontakten, die Sie mit dem Telefon synchronisieren möchten, hinzuzufügen oder zu konfigurieren."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen neuen Kontakt von Grund auf zu erstellen."\n</li>\n<li><font fgcolor="#ffffffff"><b>"Importieren/Exportieren"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Es sind keine Kontakte vorhanden. Wenn Sie gerade ein Konto hinzugefügt haben, kann es einige Minuten dauern, bis die Kontakte synchronisiert sind."\n\n"Drücken Sie zum Hinzufügen von Kontakten die "<font fgcolor="#ffffffff"><b>"Menütaste"</b></font>" und berühren Sie anschließend "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto mit Kontakten, die Sie mit dem Telefon synchronisieren möchten, hinzuzufügen oder zu konfigurieren."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Anzeigeoptionen"</b></font>", um zu ändern, welche Kontakte angezeigt werden."\n</li>\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen neuen Kontakt von Grund auf zu erstellen."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importieren/Exportieren"</b></font>\n</li></string>
-    <string name="noFavoritesHelpText" msgid="3744655776704833277">"Es sind keine Favoriten vorhanden."\n\n"So fügen Sie einen Kontakt zu Ihrer Favoritenliste hinzu:"\n\n" "<li>"Berühren Sie den Tab "<b>"Kontakte"</b>"."\n</li>" "\n<li>"Berühren Sie den Kontakt, den Sie zu Ihren Favoriten hinzufügen möchten."\n</li>" "\n<li>"Berühren Sie den Stern neben dem Kontaktnamen."\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Es können keine Kontakte angezeigt werden."\n\n"Tippen Sie zum Hinzufügen von Kontakten auf "<font fgcolor="#ffffffff"><b>"Menü"</b></font>" und dann auf "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto hinzuzufügen oder mit Kontakten für die Synchronisierung mit dem Telefon zu konfigurieren"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen Kontakt neu zu erstellen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Import/Export"</b></font>", um Kontakte aus Ihrer SIM- oder SD-Karte zu importieren"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Es können keine Kontakte angezeigt werden. Wenn Sie gerade ein Konto hinzugefügt haben, kann die Kontaktsynchronisierung etwas dauern."\n\n"Zum Hinzufügen von Kontakten drücken Sie auf "<font fgcolor="#ffffffff"><b>"Menü"</b></font>" und tippen auf "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto hinzuzufügen oder mit Kontakten für die Synchronisierung mit dem Telefon zu konfigurieren."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Anzeigeoptionen"</b></font>", um zu ändern, welche Kontakte angezeigt werden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen Kontakt neu zu erstellen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Import/Export"</b></font>", um Kontakte aus Ihrer SIM- oder SD-Karte zu importieren"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Es können keine Kontakte angezeigt werden."\n\n"Tippen Sie zum Hinzufügen von Kontakten auf "<font fgcolor="#ffffffff"><b>"Menü"</b></font>" und dann auf "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto hinzuzufügen oder mit Kontakten für die Synchronisierung mit dem Telefon zu konfigurieren."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen Kontakt neu zu erstellen"\n</li>"."\n<li><font fgcolor="#ffffffff"><b>"Import/Export"</b></font>", um Kontakte aus Ihrer SD-Karte zu importieren"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Es können keine Kontakte angezeigt werden. Wenn Sie gerade ein Konto hinzugefügt haben, kann die Kontaktsynchronisierung etwas dauern."\n\n"Zum Hinzufügen von Kontakten drücken Sie auf "<font fgcolor="#ffffffff"><b>"Menü"</b></font>" und tippen dann auf "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konten"</b></font>", um ein Konto hinzuzufügen oder mit Kontakten für die Synchronisierung mit dem Telefon zu konfigurieren."\n" "</li>\n<li><font fgcolor="#ffffffff"><b>"Anzeigeoptionen"</b></font>", um zu ändern, welche Kontakte angezeigt werden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Neuer Kontakt"</b></font>", um einen Kontakt neu zu erstellen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Import/Export"</b></font>\n</li></string>
+    <string name="noFavoritesHelpText" msgid="3744655776704833277">"Es sind keine Favoriten vorhanden."\n\n"So fügen Sie einen Kontakt zu Ihrer Favoritenliste hinzu:"\n\n"        "<li>"Tippen Sie auf den Tab "<b>"Kontakte"</b>"."\n</li>" "\n<li>"Tippen Sie auf den Kontakt, den Sie zu Ihren Favoriten hinzufügen möchten."\n</li>" "\n<li>"Tippen Sie auf die Markierung neben dem Kontaktnamen."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Alle Kontakte"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Markiert"</string>
     <string name="liveFolder_phones_label" msgid="1709786878793436245">"Nummern"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Rückruf"</string>
     <string name="callAgain" msgid="3197312117049874778">"Erneut anrufen"</string>
     <string name="returnCall" msgid="8171961914203617813">"Zurückrufen"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> Minuten, <xliff:g id="SECONDS">%2$s</xliff:g> Sekunden"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> Minuten, <xliff:g id="SECONDS">%s</xliff:g> Sekunden"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Häufig kontaktiert"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Kontakt hinzufügen"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"\"<xliff:g id="EMAIL">%s</xliff:g>\" zu den Kontakten hinzufügen?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"Kontaktbild"</string>
     <string name="description_minus_button" msgid="387136707700230172">"minus"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Kein gem. Speicher"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Keine SD-Karte"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Keinen gemeinsamen Speicher gefunden"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Keine SD-Karte gefunden"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Keine SD-Karte"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Keine SD-Karte gefunden"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"vCard wird gesucht."</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Von SIM-Karte importieren"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Import aus gem. Speicher"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Von SD-Karte importieren"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Export in gem. Speicher"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"An SD-Karte exportieren"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Von SD-Karte importieren"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"An SD-Karte exportieren"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Sichtbare Kontakte weiterleiten"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Eine VCard-Datei importieren"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Mehrere VCard-Dateien importieren"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Alle VCard-Dateien importieren"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Suche nach vCard-Daten in gemeinsamem Speicher"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Suche nach einer vCard-Information auf der SD-Karte"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Scannen des gemeinsamen Speichers fehlgeschlagen"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Fehler beim Lesen der SD-Karte"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Scannen des gemeinsamen Speichers fehlgeschlagen. Grund: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Fehler beim Lesen der SD-Karte. Grund: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Suche nach einer vCard-Information auf der SD-Karte"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Fehler beim Lesen der SD-Karte"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Fehler beim Lesen der SD-Karte. Grund: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"E/A-Fehler"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Zu wenig Speicherplatz (Datei ist eventuell zu groß)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Die vCard konnte aus einem unbekannten Grund nicht geparst werden."</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Beim Parsen der vCard ist ein Fehler aufgetreten. Obwohl die vCard anscheinend ein gültiges Format aufweist, wird sie von der aktuellen Implementierung nicht unterstützt."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Im gemeinsamen Speicher wurde keine vCard-Datei gefunden."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Keine VCard-Datei auf der SD-Karte gefunden"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Keine VCard-Datei auf der SD-Karte gefunden"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Metainformationen konnten nicht von den angegebenen vCards abgerufen werden."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Fehler beim Import einer oder mehrerer Dateien (%s)"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Unbekannter Fehler"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"vCard-Datei auswählen"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"vCard wird gelesen."</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"vCard-Dateien werden gelesen."</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Fehler beim Lesen der vCard-Daten"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> von <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> Kontakten"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> von <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> Dateien"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Caching von vCards in lokalen temporären Speicher"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Importprogramm führt gerade Caching der vCard(s) in lokalen temporären Speicher durch. Der eigentliche Import beginnt gleich."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Fehler beim Lesen von vCard-Daten"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Lesen von vCard-Daten abgebrochen"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Import der vCard abgeschlossen"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard-Importprogramm gestartet"</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Das vCard-Importprogramm importiert nach kurzer Zeit die vCard."</string>
+    <string name="percentage" msgid="34897865327092209">"%s %%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Export bestätigen"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Soll Ihre Kontaktliste wirklich an \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\" exportiert werden?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Fehler beim Exportieren von Kontaktdaten"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Fehler beim Exportieren der Kontaktdaten."\n"Fehlerursache: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Es ist kein exportierbarer Kontakt vorhanden"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Zu viele vCard-Dateien im gemeinsamen Speicher"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Zu viele vCard-Dateien auf der SD-Karte"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Zu viele vCard-Dateien auf der SD-Karte"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Erforderlicher Dateiname ist zu lang (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard-Exportprogramm gestartet"</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Export der vCard abgeschlossen"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Kontaktdaten werden exportiert."</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Kontaktdaten werden in \"<xliff:g id="FILE_NAME">%s</xliff:g>\" exportiert."</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Exportprogramm konnte nicht initialisiert werden: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Fehler bei der Ermittlung von Datenbank-Informationen"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Es ist kein exportierbarer Kontakt vorhanden. Falls sich Kontakte auf Ihrem Telefon befinden, ist das Exportieren der Kontakte möglicherweise durch einen Datenanbieter gesperrt."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Das Programm zum Erstellen der vCard wurde nicht richtig initialisiert."</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%1$s</xliff:g>\" konnte nicht geöffnet werden: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> von <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> Kontakten"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%s</xliff:g>\" konnte nicht geöffnet werden: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> von <xliff:g id="TOTAL_NUMBER">%s</xliff:g> Kontakten"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Namen meiner Kontakte"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"2 Sekunden Pause hinzufügen"</string>
     <string name="add_wait" msgid="3360818652790319634">"Warten hinzufügen"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Für diese Aktion wurde keine Anwendung gefunden."</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Diese Auswahl speichern"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Unbekannt"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Keine Daten"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Konten"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importieren/Exportieren"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Kontakte importieren/exportieren"</string>
@@ -290,13 +301,13 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Alle weiteren Kontakte"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Alle Kontakte"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Wenn \"<xliff:g id="GROUP">%s</xliff:g>\" aus der Synchronisierung entfernt wird, werden auch alle nicht gruppierten Kontakte aus der Synchronisierung entfernt."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Nur Telefon (nicht synchronisiert)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Nur Telefon (nicht synchronisiert)"</string>
     <string name="call_custom" msgid="7756571794763171802">"<xliff:g id="CUSTOM">%s</xliff:g> anrufen"</string>
     <string name="call_home" msgid="1990519474420545392">"Anruf (privat)"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Anruf (mobil)"</string>
-    <string name="call_work" msgid="5328785911463744028">"Anruf (geschäftl.)"</string>
-    <string name="call_fax_work" msgid="7467763592359059243">"Anruf (Fax, geschäftl.)"</string>
-    <string name="call_fax_home" msgid="8342175628887571876">"Anruf Fax (privat)"</string>
+    <string name="call_work" msgid="5328785911463744028">"Anruf (Arbeit)"</string>
+    <string name="call_fax_work" msgid="7467763592359059243">"Anruf (Fax, Arbeit)"</string>
+    <string name="call_fax_home" msgid="8342175628887571876">"Faxanruf (privat)"</string>
     <string name="call_pager" msgid="9003902812293983281">"Anruf (Pager)"</string>
     <string name="call_other" msgid="8563753966926932052">"Anruf bei"</string>
     <string name="call_callback" msgid="1910165691349426858">"Rückrufnummer anrufen"</string>
@@ -308,16 +319,16 @@
     <string name="call_radio" msgid="8296755876398357063">"Anruf (Mobilfunk)"</string>
     <string name="call_telex" msgid="2223170774548648114">"Telexnummer anrufen"</string>
     <string name="call_tty_tdd" msgid="8951266948204379604">"TTY/TDD anrufen"</string>
-    <string name="call_work_mobile" msgid="8707874281430105394">"Anruf Handy (geschäftl.)"</string>
-    <string name="call_work_pager" msgid="3419348514157949008">"Anruf Pager (geschäftl.)"</string>
+    <string name="call_work_mobile" msgid="8707874281430105394">"Mobilfunknummer (geschäftlich) anrufen"</string>
+    <string name="call_work_pager" msgid="3419348514157949008">"Pager (beruflich) anrufen"</string>
     <string name="call_assistant" msgid="2141641383068514308">"<xliff:g id="ASSISTANT">%s</xliff:g> anrufen"</string>
     <string name="call_mms" msgid="6274041545876221437">"Anruf (MMS)"</string>
     <string name="sms_custom" msgid="5932736853732191825">"Text <xliff:g id="CUSTOM">%s</xliff:g>"</string>
-    <string name="sms_home" msgid="7524332261493162995">"SMS (privat)"</string>
+    <string name="sms_home" msgid="7524332261493162995">"Text (privat)"</string>
     <string name="sms_mobile" msgid="5200107250451030769">"Text (mobil)"</string>
-    <string name="sms_work" msgid="2269624156655267740">"SMS (geschäftl.)"</string>
-    <string name="sms_fax_work" msgid="8028189067816907075">"SMS an Fax (geschäftl.)"</string>
-    <string name="sms_fax_home" msgid="9204042076306809634">"SMS an Fax (privat)"</string>
+    <string name="sms_work" msgid="2269624156655267740">"Text (Arbeit)"</string>
+    <string name="sms_fax_work" msgid="8028189067816907075">"Text (Fax, Arbeit)"</string>
+    <string name="sms_fax_home" msgid="9204042076306809634">"Text (Fax, privat)"</string>
     <string name="sms_pager" msgid="7730404569637015192">"Text-Pager"</string>
     <string name="sms_other" msgid="806127844607642331">"Textnachricht an"</string>
     <string name="sms_callback" msgid="5004824430094288752">"Textnachricht an Rückrufnummer"</string>
@@ -329,29 +340,30 @@
     <string name="sms_radio" msgid="3329166673433967820">"Text (Mobilfunk)"</string>
     <string name="sms_telex" msgid="9034802430065267848">"Textnachricht an Telex"</string>
     <string name="sms_tty_tdd" msgid="6782284969132531532">"Textnachricht an TTY/TDD"</string>
-    <string name="sms_work_mobile" msgid="2459939960512702560">"SMS an Handy (geschäftl.)"</string>
-    <string name="sms_work_pager" msgid="5566924423316960597">"SMS an Pager (geschäftl.)"</string>
+    <string name="sms_work_mobile" msgid="2459939960512702560">"Textnachricht an Mobilfunknummer (geschäftlich)"</string>
+    <string name="sms_work_pager" msgid="5566924423316960597">"Textnachricht an Pager (geschäftlich)"</string>
     <string name="sms_assistant" msgid="2773424339923116234">"Textnachricht an <xliff:g id="ASSISTANT">%s</xliff:g>"</string>
     <string name="sms_mms" msgid="4069352461380762677">"Text (MMS)"</string>
     <string name="email_home" msgid="8573740658148184279">"E-Mail (privat)"</string>
     <string name="email_mobile" msgid="2042889209787989814">"E-Mail (mobil)"</string>
-    <string name="email_work" msgid="2807430017302722689">"E-Mail (geschäftl.)"</string>
+    <string name="email_work" msgid="2807430017302722689">"E-Mail (Arbeit)"</string>
     <string name="email_other" msgid="3454004077967657109">"E-Mail an"</string>
     <string name="email_custom" msgid="7548003991586214105">"E-Mail <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="email" msgid="5668400997660065897">"E-Mail"</string>
     <string name="map_home" msgid="1243547733423343982">"Privatadresse anzeigen"</string>
-    <string name="map_work" msgid="1360474076921878088">"Geschäftsadresse anzeigen"</string>
+    <string name="map_work" msgid="1360474076921878088">"Arbeitsadresse anzeigen"</string>
     <string name="map_other" msgid="3817820803587012641">"Adresse anzeigen"</string>
     <string name="map_custom" msgid="6184363799976265281">"<xliff:g id="CUSTOM">%s</xliff:g>-Adresse anzeigen"</string>
     <string name="chat_aim" msgid="2588492205291249142">"Chat über AIM"</string>
     <string name="chat_msn" msgid="8041633440091073484">"Chat über Windows Live"</string>
-    <string name="chat_yahoo" msgid="6629211142719943666">"Chat über Yahoo!"</string>
+    <string name="chat_yahoo" msgid="6629211142719943666">"Chat über Yahoo"</string>
     <string name="chat_skype" msgid="1210045020427480566">"Chat über Skype"</string>
     <string name="chat_qq" msgid="4294637812847719693">"Chat über QQ"</string>
     <string name="chat_gtalk" msgid="981575737258117697">"Chat über Google Talk"</string>
     <string name="chat_icq" msgid="8438405386153745775">"Chat über ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chat über Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adresse"</string>
     <string name="postal_street" msgid="8133143961580058972">"Straße"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Postfach"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Nachbarschaft"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Bundesland"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Postleitzahl"</string>
     <string name="postal_country" msgid="7638264508416368690">"Land"</string>
+    <string name="full_name" msgid="6602579550613988977">"Name"</string>
     <string name="name_given" msgid="1687286314106019813">"Vorname"</string>
     <string name="name_family" msgid="3416695586119999058">"Nachname"</string>
     <string name="name_prefix" msgid="59756378548779822">"Namenpräfix"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Phonetischer Nachname"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g>-Kontakt"</string>
     <string name="from_account_format" msgid="687567483928582084">"von <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_0">%1$s</xliff:g>-Kontakt aus <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Dieses Foto verwenden"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g>-Kontaktinformationen können auf diesem Gerät nicht bearbeitet werden."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Keine Zusatzinformationen zu diesem Kontakt"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Foto aus Galerie auswählen"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Die Kontaktliste wird an die geänderte Sprache angepasst."\n\n"Bitte warten..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Die Kontaktliste wird aktualisiert."\n\n"Bitte warten..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Kontakte werden gerade aktualisiert. "\n\n"Das Upgrade erfordert etwa <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>MB des internen Telefonspeichers."\n\n"Wählen Sie eine der folgenden Optionen:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Kontakte werden gerade aktualisiert. "\n\n"Das Upgrade erfordert etwa <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB des internen Telefonspeichers."\n\n"Wählen Sie eine der folgenden Optionen:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Einige Anwendungen deinstallieren"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Upgrade wiederholen"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Suchergebnisse für: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Suche..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Wird geladen..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Auswahl anzeigen"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Alle anzeigen"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Alles auswählen"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Auswahl für alle aufheben"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"Ein Empfänger ausgewählt"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> Empfänger ausgewählt"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Unbekannte Kontakte"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Kein Kontakt ausgewählt"</string>
+    <string name="add_field" msgid="5257149039253569615">"Informationen hinzufügen"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"über <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> über <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"bearbeiten"</string>
+    <string name="description_star" msgid="2605854427360036550">"Favorit"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Kontakt bearbeiten"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"nicht zusammengeführt"</item>
+    <item quantity="other" msgid="425683718017380845">"aus <xliff:g id="COUNT">%0$d</xliff:g> Quellen zusammengeführt"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Löschen"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Fehler beim Speichern"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Andere"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index e870567..358325e 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Λεπτομέρειες επαφής"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Προβολή επαφής"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Επεξεργασία επαφής"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Διεύθυνση ηλεκτρονικού ταχυδρομείου:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Τύπος:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Δημιουργία επαφής"</string>
     <string name="searchHint" msgid="8482945356247760701">"Αναζήτηση επαφών"</string>
     <string name="menu_search" msgid="9147752853603483719">"Αναζήτηση"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Νέα επαφή"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Φωνητική"</string>
     <string name="label_notes" msgid="8337354953278341042">"Σημειώσεις"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Κλήση Internet"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Ήχος κλήσης"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Όνομα και επίθετο"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Φωνητικό όνομα"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Δεν υπάρχουν ορατές επαφές"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Βρέθηκε 1 επαφή"</item>
-    <item quantity="other" msgid="7752927996850263152">"Βρέθηκαν <xliff:g id="COUNT">%d</xliff:g> επαφές"</item>
+    <item quantity="one" msgid="5517063038754171134">"Βρέθηκε 1"</item>
+    <item quantity="other" msgid="3852668542926965042">"Βρέθηκαν <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Δεν βρέθηκε η επαφή"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Δεν βρέθηκε"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 επαφή"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> επαφές"</item>
+    <item quantity="one" msgid="4826918429708286628">"Βρέθηκε 1"</item>
+    <item quantity="other" msgid="7988132539476575389">"Βρέθηκαν <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Επαφές"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Αγαπ."</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Επαφές στην κάρτα SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Δεν υπάρχουν επαφές για προβολή. (Εάν προσθέσατε τώρα ένα λογαριασμό, ο συγχρονισμός των επαφών μπορεί να καθυστερήσει μερικά λεπτά.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Δεν υπάρχουν επαφές για προβολή."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Δεν έχετε επαφές προς προβολή."\n\n"Για προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για προσθήκη ή διαμόρφωση λογαριασμού με επαφές που μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Δεν έχετε επαφές προς προβολή. (Αν προσθέσατε κάποιον λογαριασμό μόλις τώρα, θα χρειαστούν λίγα λεπτά έως ότου γίνει ο συγχρονισμός.)"\n\n"Για την προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για την προσθήκη ή διαμόρφωση λογαριασμού με επαφές τις οποίες μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Επιλογές προβολής"</b></font>" για να αλλάξετε τις επαφές που είναι ορατές"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Δεν έχετε επαφές προς προβολή."\n\n"Για προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για προσθήκη ή διαμόρφωση λογαριασμού με επαφές που μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Δεν έχετε επαφές προς προβολή. (Αν προσθέσατε κάποιον λογαριασμό μόλις τώρα, θα χρειαστούν λίγα λεπτά έως ότου γίνει ο συγχρονισμός.)"\n\n"Για την προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για την προσθήκη ή διαμόρφωση λογαριασμού με επαφές τις οποίες μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Προβολή επιλογών"</b></font>" για να αλλάξετε τις επαφές που είναι ορατές"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Δεν έχετε επαφές προς προβολή."\n\n"Για προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για προσθήκη ή διαμόρφωση λογαριασμού με επαφές που μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>" για την εισαγωγή επαφών από την κάρτα SIM ή SD"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Δεν έχετε επαφές προς προβολή. (Αν προσθέσατε κάποιο λογαριασμό μόλις τώρα, θα χρειαστούν λίγα λεπτά έως ότου γίνει ο συγχρονισμός.)"\n\n"Για την προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για την προσθήκη ή διαμόρφωση λογαριασμού με επαφές τις οποίες μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Προβολή επιλογών"</b></font>" για να αλλάξετε τις επαφές που είναι ορατές"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>" για την εισαγωγή επαφών από την κάρτα SIM ή SD"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Δεν έχετε επαφές προς προβολή."\n\n"Για προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για προσθήκη ή διαμόρφωση λογαριασμού με επαφές που μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>" για την εισαγωγή επαφών από την κάρτα SD"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Δεν έχετε επαφές προς προβολή. (Αν προσθέσατε κάποιον λογαριασμό μόλις τώρα, θα χρειαστούν λίγα λεπτά έως ότου γίνει ο συγχρονισμός.)"\n\n"Για την προσθήκη επαφών, πατήστε "<font fgcolor="#ffffffff"><b>"Μενού"</b></font>" και αγγίξτε την επιλογή:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Λογαριασμοί"</b></font>" για την προσθήκη ή διαμόρφωση λογαριασμού με επαφές τις οποίες μπορείτε να συγχρονίσετε στο τηλέφωνο"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Προβολή επιλογών"</b></font>" για να αλλάξετε τις επαφές που είναι ορατές"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Νέα επαφή"</b></font>" για δημιουργία νέας επαφής από το μηδέν"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Εισαγωγή/Εξαγωγή"</b></font>" για την εισαγωγή επαφών από την κάρτα SD"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Δεν έχετε αγαπημένα."\n\n"Για προσθήκη επαφής στη λίστα των αγαπημένων σας:"\n\n"        "<li>"Αγγίξτε την καρτέλα "<b>"Επαφές"</b>\n</li>" "\n<li>"Αγγίξτε το όνομα της επαφής που θέλετε να προσθέσετε στα αγαπημένα σας"\n</li>" "\n<li>"Αγγίξτε το αστέρι πλάι στο όνομα της επαφής"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Όλες οι επαφές"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Με αστέρι"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Επανάκληση"</string>
     <string name="callAgain" msgid="3197312117049874778">"Επανάληψη κλήσης"</string>
     <string name="returnCall" msgid="8171961914203617813">"Επιστροφή κλήσης"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> λεπτά <xliff:g id="SECONDS">%2$s</xliff:g> δευτερόλεπτα"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> λεπτά <xliff:g id="SECONDS">%s</xliff:g> δευτερόλεπτα"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Επαφές με τις οποίες έχετε συχνή επικοινωνία"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Προσθήκη επαφής"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Προσθήκη του \"<xliff:g id="EMAIL">%s</xliff:g>\" στις επαφές?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"φωτογραφία επαφής"</string>
     <string name="description_minus_button" msgid="387136707700230172">"μείον"</string>
     <string name="description_plus_button" msgid="515164827856229880">"συν"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Χωρίς κοινόχρ. αποθ. χώρο"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Δεν υπάρχει κάρτα SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Χωρίς εντοπ. κοιν. αποθ. χώρου"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Δεν ανιχνεύθηκε κάρτα SD"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Δεν υπάρχει κάρτα SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Δεν ανιχνεύθηκε κάρτα SD"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Αναζήτηση κάρτας vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Εισαγωγή από κάρτα SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Εισ. από κοιν. αποθ. χώρο"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Εισαγωγή από κάρτα SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Εξαγ. σε κοιν. αποθ. χώρο"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Εξαγωγή σε κάρτα SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Εισαγωγή από κάρτα SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Εξαγωγή σε κάρτα SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Κοινή χρήση ορατών επαφών"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Εισαγωγή ενός αρχείου VCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Εισαγωγή πολλαπλών αρχείων vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Εισαγωγή όλων των αρχείων vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Αναζήτηση δεδομένων vCard στον κοινόχρηστο αποθηκευτικό χώρο"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Αναζήτηση για δεδομένα vCard στην κάρτα SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Η σάρωση του κοινόχρηστου αποθηκευτικού χώρου απέτυχε"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Η σάρωση της κάρτας SD απέτυχε"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Η σάρωση του κοινόχρηστου αποθηκευτικού χώρου απέτυχε (Αιτία: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Η σάρωση της κάρτας SD απέτυχε (Αιτία:\"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Αναζήτηση για δεδομένα vCard στην κάρτα SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Η σάρωση της κάρτας SD απέτυχε"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Η σάρωση της κάρτας SD απέτυχε (Αιτία:\"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Σφάλμα I/O"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Η μνήμη είναι ανεπαρκής (το αρχείο μπορεί να είναι πολύ μεγάλο)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Η ανάλυση της κάρτας vCard απέτυχε εξαιτίας μη αναμενόμενου συμβάντος"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Αν και το VCard φαίνεται να βρίσκεται σε έγκυρη μορφή, η ανάλυσή του απέτυχε, εφόσον η τρέχουσα εφαρμογή δεν το υποστηρίζει"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Δεν βρέθηκαν αρχεία vCard στον κοινόχρηστο αποθηκευτικό σας χώρο"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Δεν βρέθηκε αρχείο VCard στην κάρτα SD"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Δεν βρέθηκε αρχείο VCard στην κάρτα SD"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Η συλλογή μετα-πληροφοριών του δεδομένου αρχείου(ων) vCard απέτυχε."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Η εισαγωγή ενός ή περισσοτέρων αρχείων απέτυχε (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Άγνωστο σφάλμα"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Επιλογή αρχείου vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Ανάγνωση vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Ανάγνωση αρχείου(ων) vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Η ανάγνωση των δεδομένων vCard απέτυχε"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> από <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> επαφές"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> από <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> αρχεία"</string>
-    <string name="confirm_export_title" msgid="7648747763127442983">"Επιβεβαίωση εξαγωγής"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Αποθήκευση vCard(s) σε τοπικό προσωρινό χώρο αποθήκευσης"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Το πρόγραμμα εισαγωγής αποθηκεύει προσωρινά vCard(s) σε τοπικό χώρο προσωρινής αποθήκευσης. Η κανονική εισαγωγή θα ξεκινήσει σύντομα."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Αποτυχία ανάγνωσης δεδομένων vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Η ανάγνωση των δεδομένων vCard ακυρώθηκε"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Η εισαγωγή vCard ολοκληρώθηκε"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Έγινε εκκίνηση του προγράμματος εισαγωγής vCard."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Το πρόγραμμα εισαγωγής vCard θα εισαγάγει την vCard μετά από λίγο."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
+    <string name="confirm_export_title" msgid="7648747763127442983">"Επιβεβαίωση\nεξαγωγής"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Είστε σίγουροι ότι θέλετε να εξαγάγετε τη λίστα των επαφών σας στο \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\";"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Αποτυχία εξαγωγής δεδομένων επαφής"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Αποτυχία εξαγωγής δεδομένων επαφής."\n"Αιτία αποτυχίας: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Δεν υπάρχει επαφή με δυνατότητα εξαγωγής"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Υπερβολικά μεγάλος όγκος αρχείων VCard στον κοινόχρηστο αποθηκευτικό χώρο"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Υπερβολικά μεγάλος όγκος αρχείων VCard στην κάρτα SD"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Υπερβολικά μεγάλος όγκος αρχείων VCard στην κάρτα SD"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Το απαιτούμενο όνομα αρχείου είναι υπερβολικά μεγάλο (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Εκκινήθηκε το πρόγραμμα εξαγωγής vCard."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Η εξαγωγή της vCard ολοκληρώθηκε"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Εξαγωγή δεδομένων επαφών"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Εξαγωγή δεδομένων επαφών προς \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Δεν ήταν δυνατή η εκκίνηση της εξαγωγής: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Αποτυχία λήψης πληροφοριών βάσης δεδομένων"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Δεν υπάρχει επαφή με δυνατότητα εξαγωγής. Αν έχετε επαφές στο τηλέφωνό σας, ενδέχεται να μην επιτρέπεται η εξαγωγή όλων των επαφών εκτός του τηλεφώνου από κάποιον πάροχο δεδομένων."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Δεν έχει γίνει σωστή εκκίνηση του προγράμματος σύνθεσης της vCard"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Δεν ήταν δυνατό το άνοιγμα του \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> από <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> επαφές"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Δεν ήταν δυνατό το άνοιγμα του \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> από <xliff:g id="TOTAL_NUMBER">%s</xliff:g> επαφές"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Ονόματα ων επαφών σας"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Προσθήκη παύσης 2 δευτερολέπτων"</string>
     <string name="add_wait" msgid="3360818652790319634">"Προσθήκη αναμονής"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Δεν βρέθηκε εφαρμογή για τη διαχείριση αυτής της ενέργειας"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Διατήρηση αυτής της επιλογής"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Άγνωστος"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Δεν υπάρχουν δεδομένα"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Λογαριασμοί"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Εισαγωγή/Εξαγωγή"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Εισαγωγή/Εξαγωγή επαφών"</string>
@@ -283,14 +294,14 @@
     <string name="edit_read_only" msgid="8158629550655830981">"Αυτή η επαφή είναι μόνο για ανάγνωση"</string>
     <string name="edit_secondary_collapse" msgid="5371618426594477103">"Περισσότερα"</string>
     <string name="dialog_primary_name" msgid="5521591005692614833">"Κύριο όνομα"</string>
-    <string name="dialog_new_contact_account" msgid="9044704073286262197">"Δημιουργία επαφής στον λογαριασμό"</string>
+    <string name="dialog_new_contact_account" msgid="9044704073286262197">"Δημιουργία επαφής\nστον λογαριασμό"</string>
     <string name="menu_sync_remove" msgid="3266725887008450161">"Κατάργηση ομάδας συγχρονισμού"</string>
     <string name="dialog_sync_add" msgid="8267045393119375803">"Προσθήκη ομάδας συγχρονισμού"</string>
     <string name="display_more_groups" msgid="2682547080423434170">"Περισσότερες ομάδες…"</string>
     <string name="display_ungrouped" msgid="4602580795576261158">"Όλες οι άλλες επαφές"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Όλες οι επαφές"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Η κατάργηση της ομάδας \"<xliff:g id="GROUP">%s</xliff:g>\" από τον συγχρονισμό θα καταργήσει επίσης και τις επαφές χωρίς ομαδοποίηση από τον συγχρονισμό."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Μόνο στο τηλέφωνο (Χωρίς συγχρονισμό)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Μόνο στο τηλέφωνο (Χωρίς συγχρονισμό)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Κλήση <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Κλήση οικίας"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Κλήση κινητής συσκευής"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Συζήτηση μέσω ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Συζήτηση μέσω Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Συζήτηση"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Διεύθυνση"</string>
     <string name="postal_street" msgid="8133143961580058972">"Οδός"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Ταχυδρομική θυρίδα"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Γειτονιά"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Πολιτεία"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Ταχυδρομικός κώδικας"</string>
     <string name="postal_country" msgid="7638264508416368690">"Χώρα"</string>
+    <string name="full_name" msgid="6602579550613988977">"Όνομα"</string>
     <string name="name_given" msgid="1687286314106019813">"Όνομα"</string>
     <string name="name_family" msgid="3416695586119999058">"Επίθετο"</string>
     <string name="name_prefix" msgid="59756378548779822">"Πρόθεμα ονόματος"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Φωνητική γραφή επιθέτου"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> επαφή"</string>
     <string name="from_account_format" msgid="687567483928582084">"από <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Επαφή <xliff:g id="SOURCE_0">%1$s</xliff:g> από <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Χρήση αυτής της φωτογραφίας"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Τα στοιχεία επικοινωνίας της επαφής <xliff:g id="SOURCE">%1$s</xliff:g> δεν μπορούν να υποβληθούν σε επεξεργασία σε αυτήν τη συσκευή."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Δεν υπάρχουν πρόσθετες πληροφορίες για αυτήν την επαφή"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Επιλογή φωτογραφίας από τη συλλογή"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Η λίστα επαφών ενημερώνεται ώστε να αντικατοπτρίζει την αλλαγή γλώσσας."\n\n"Περιμένετε..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Γίνεται ενημέρωση της λίστας επαφών."\n\n"Περιμένετε..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Γίνεται αναβάθμιση των επαφών. "\n\n"Η διαδικασία αναβάθμισης απαιτεί περίπου <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>Mb από τον εσωτερικό χώρο αποθήκευσης του τηλεφώνου."\n\n"Ορίστε μία από τις παρακάτω επιλογές:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Γίνεται αναβάθμιση των επαφών. "\n\n"Η διαδικασία αναβάθμισης απαιτεί περίπου <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>Mb από τον εσωτερικό χώρο αποθήκευσης του τηλεφώνου."\n\n"Ορίστε μία από τις παρακάτω επιλογές:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Καταργήστε την εγκατάσταση ορισμένων εφαρμογών"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Επανάληψη αναβάθμισης"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Αποτελέσματα αναζήτησης για: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Αναζήτηση..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Φόρτωση …"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Εμφάνιση επιλεγμένων"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Εμφάνιση όλων\n"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Επιλογή όλων"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Αποεπιλογή όλων"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"επιλέχθηκε 1 παραλήπτης"</item>
+    <item quantity="other" msgid="4608837420986126229">"επιλέχθηκαν <xliff:g id="COUNT">%d</xliff:g> παραλήπτες"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Άγνωστες επαφές"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Δεν έχουν επιλεγεί επαφές."</string>
+    <string name="add_field" msgid="5257149039253569615">"Προσθήκη πληροφοριών"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"μέσω <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> μέσω <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"επεξεργασία"</string>
+    <string name="description_star" msgid="2605854427360036550">"αγαπημένο"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Επεξεργασία επαφής"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"δεν συγχωνεύθηκαν"</item>
+    <item quantity="other" msgid="425683718017380845">"συγχώνευση από <xliff:g id="COUNT">%0$d</xliff:g> προελεύσεις"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Διαγραφή"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Σφάλμα κατά την αποθήκευση"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Άλλο"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"Α;Β;Γ;Δ;Ε;Ζ;Η;Θ;Ι;Κ;Λ;Μ;Ν;Ξ;Ο;Π;Ρ;Σ;Τ;Υ;Φ;Χ;Ψ;Ω"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index e897fff..23d7884 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Detalles de contacto"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Ver contacto"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Editar contacto"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Dirección de correo electrónico:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Tipo:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Crear contacto"</string>
     <string name="searchHint" msgid="8482945356247760701">"Buscar contactos"</string>
     <string name="menu_search" msgid="9147752853603483719">"Buscar"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Nuevo contacto"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonético"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notas"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Llamada de Internet"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Tono de llamada"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Primero y último"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Nombre fonético"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"No hay contactos visibles"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Se encontró 1 contacto"</item>
-    <item quantity="other" msgid="7752927996850263152">"Se encontraron <xliff:g id="COUNT">%d</xliff:g> contactos"</item>
+    <item quantity="one" msgid="5517063038754171134">"Se encontró uno (1)"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g>Se encontró un "</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"No se ha encontrado este contacto."</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"No se ha encontrado"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contacto"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contactos"</item>
+    <item quantity="one" msgid="4826918429708286628">"Se encontró uno (1)"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g>Se encontró un "</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contactos"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoritos"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contactos de tarjeta SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"No tienes ningún contacto para mostrar. (Si has agregado una cuenta recientemente, la sincronización de los contactos puede demorar algunos minutos)."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"No tienes ningún contacto para mostrar."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"No tienes ningún contacto para mostrar."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar o configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"No tienes ningún contacto para mostrar. (Si has agregado una cuenta, la sincronización de contactos puede demorar pocos minutos)."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar y configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Mostrar opciones"</b></font>" para cambiar los contactos que sean visibles"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"No tienes ningún contacto para mostrar."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar o configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"No tienes ningún contacto para mostrar. (Si has agregado una cuenta, la sincronización de contactos puede demorar pocos minutos)."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar y configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Mostrar opciones"</b></font>" para cambiar los contactos que sean visibles"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"No tienes ningún contacto para mostrar."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar o configurar una cuenta con contacto que puedas sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un contacto desde cero"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos desde tu tarjeta SIM o SD"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"No tienes ningún contacto para mostrar. (Si has agregado una cuenta, la sincronización de contactos puede demorar algunos minutos)."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar y configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Mostrar opciones"</b></font>" para cambiar los contactos que sean visibles"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos de tu tarjeta SIM o SD"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"No tienes ningún contacto para mostrar."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar o configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos desde tu tarjeta SD"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"No tienes ningún contacto para mostrar. (Si has agregado una cuenta, la sincronización de contactos puede demorar algunos minutos)."\n\n"Para agregar contactos, presiona "<font fgcolor="#ffffffff"><b>"Menú"</b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para agregar y configurar una cuenta con contactos que puedes sincronizar en el teléfono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Mostrar opciones"</b></font>" para cambiar los contactos que sean visibles"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear tú mismo un contacto nuevo"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos desde tu tarjeta SD"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"No tienes ningún favorito."\n\n"Para agregar un contacto a tu lista de favoritos:"\n\n<li>"toca la pestaña "<b>"Contactos"</b>" "\n</li>" "\n<li>"toca el contacto que deseas agregar a tus favoritos"\n</li>" "\n<li>"toca el asterisco situado junto al nombre del contacto"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Todos los contactos"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Marcado con asterisco"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Volver a llamar"</string>
     <string name="callAgain" msgid="3197312117049874778">"Llamar nuevamente"</string>
     <string name="returnCall" msgid="8171961914203617813">"Regresar llamada"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> mins <xliff:g id="SECONDS">%2$s</xliff:g> s"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> mins <xliff:g id="SECONDS">%s</xliff:g> s"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Contactado con frecuencia"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Agregar contacto"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"¿Deseas agregar \"<xliff:g id="EMAIL">%s</xliff:g>\" a los contactos?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"foto de contacto"</string>
     <string name="description_minus_button" msgid="387136707700230172">"negativo"</string>
     <string name="description_plus_button" msgid="515164827856229880">"más"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Alm. comp. no disp."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"No hay tarjeta SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"No se detectó el alm. comp."</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"No se ha detectado ninguna tarjeta SD"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"No hay tarjeta SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"No se ha detectado ninguna tarjeta SD"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Buscando vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importar de la tarjeta SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importar desde alm. comp."</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importar de la tarjeta SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exportar a alm. compartido"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exportar a la tarjeta SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importar de la tarjeta SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportar a la tarjeta SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Compartir contactos visibles"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importar un archivo de vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importar múltiples archivos de vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importar todos los archivos de vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Buscando datos de vCard en el almacenamiento compartido"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Buscando datos de vCard en la tarjeta SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Explorando falla en el almacenamiento compartido"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"No se ha podido explorar la tarjeta SD"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Explorando falla en el almacenamiento compartido (Razón: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"No se ha podido explorar la tarjeta SD. (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Buscando datos de vCard en la tarjeta SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"No se ha podido explorar la tarjeta SD"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"No se ha podido explorar la tarjeta SD. (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Error de E/S"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Memoria insuficiente (es probable que el archivo sea muy grande)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"No se ha podido analizar vCard debido a un motivo inesperado"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"No se ha podido analizar vCard aunque el formato parece válido, ya que la implementación actual no lo admite"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"No se encontró un archivo vCard en el almacenamiento compartido."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"No se ha encontrado un archivo de vCard en la Tarjeta SD."</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"No se ha encontrado un archivo de vCard en la Tarjeta SD."</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Error al recopilar metadatos de un archivo específico de la vCard."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"No se pudieron importar uno o más archivos (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Error desconocido"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Seleccionar archivo de vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"Segmento <xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Leyendo vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Leyendo archivo(s) de vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"No se han podido leer los datos de vCard"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contactos"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> archivos"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Almacenando vCard(s) en caché local temporal"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"El importador está almacenando la(s) vCard(s) en un caché local temporal. La importación comenzará pronto."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Error al leer los datos de la vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Se canceló la lectura de datos de la vCard"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Finalizó la importación de la vCard"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Importador de vCard iniciado."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"El Importador de vCard importará la vCard en un momento."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Confirmar exportación"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"¿Estás seguro de que deseas exportar tu lista de contactos a \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"No se han podido exportar los datos de contacto"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"No se han podido exportar los datos de contacto."\n"Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"No hay ningún contacto exportable"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Demasiados archivos de vCard en el almacenamiento compartido"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Demasiados archivos de vCard en la tarjeta SD"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Demasiados archivos de vCard en la tarjeta SD"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"El nombre de archivo requerido es demasiado largo (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Exportador de vCard iniciado."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Finalizó la importación de vCard"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Exportando datos de contacto"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exportando datos de contacto a \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"No se ha podido inicializar el exportador: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"No se ha podido obtener información de la base de datos"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"No hay ningún contacto exportable. Si en realidad tienes contactos en tu teléfono, es posible que algún proveedor de datos prohíba la exportación de todos los contactos."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"El redactor de vCard no se ha inicializado correctamente"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"No se pudo abrir \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contactos"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"No se pudo abrir \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contactos"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Nombres de tus contactos"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Agregar pausa de 2 segundos"</string>
     <string name="add_wait" msgid="3360818652790319634">"Agregar espera"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"No se encontró una aplicación para manejar esta acción."</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Recuerda esta opción."</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Desconocido"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Sin datos"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Cuentas"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importar/Exportar"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importar/Exportar contactos"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Todos los otros contactos"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Todos los contactos"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Al suprimir \"<xliff:g id="GROUP">%s</xliff:g>\" de sincronización también se suprimirá cualquier contacto no agrupado de la sincronización."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Sólo telefónicamente (no sincronizado)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Sólo telefónicamente (no sincronizado)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Llamar a <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Llamar al hogar"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Llamar al celular"</string>
@@ -301,7 +312,7 @@
     <string name="call_other" msgid="8563753966926932052">"Llamar"</string>
     <string name="call_callback" msgid="1910165691349426858">"Llamar a devolución de llamada"</string>
     <string name="call_car" msgid="3280537320306436445">"Llamar al auto"</string>
-    <string name="call_company_main" msgid="6105120947138711257">"Llamar empresa principal"</string>
+    <string name="call_company_main" msgid="6105120947138711257">"Llamar empresa principal "</string>
     <string name="call_isdn" msgid="1541590690193403411">"Llamar a ISDN"</string>
     <string name="call_main" msgid="6082900571803441339">"Llamada principal"</string>
     <string name="call_other_fax" msgid="5745314124619636674">"Llamar a fax"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chat mediante ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chat mediante Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Dirección"</string>
     <string name="postal_street" msgid="8133143961580058972">"Dirección postal"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Apartado postal"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Barrio"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Estado"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Código POSTAL"</string>
     <string name="postal_country" msgid="7638264508416368690">"País"</string>
+    <string name="full_name" msgid="6602579550613988977">"Nombre"</string>
     <string name="name_given" msgid="1687286314106019813">"Nombre de pila"</string>
     <string name="name_family" msgid="3416695586119999058">"Nombre familiar"</string>
     <string name="name_prefix" msgid="59756378548779822">"Prefijo del nombre"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Nombre familiar fonético"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> contacto"</string>
     <string name="from_account_format" msgid="687567483928582084">"de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Contacto <xliff:g id="SOURCE_0">%1$s</xliff:g> de <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Usar esta foto"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"La información de <xliff:g id="SOURCE">%1$s</xliff:g> contactos no se puede editar en este dispositivo."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"No hay información adicional para este contacto."</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Seleccionar foto de la galería"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"La lista de contactos se está actualizando para reflejar el cambio de idioma."\n\n" Espera."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"La lista de contactos se está actualizando."\n\n" Espera..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"La actualización de los contactos está en proceso. "\n\n"El proceso de actualización requiere aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> Mb de almacenamiento interno en el teléfono."\n\n" Elije una de las siguientes opciones:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"La actualización de los contactos está en proceso. "\n\n"El proceso de actualización requiere aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> Mb de almacenamiento interno en el teléfono."\n\n" Elije una de las siguientes opciones:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Desinstalar algunas aplicaciones"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Intentar actualizar nuevamente"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Resultados de búsqueda para: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Buscando..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Cargando …"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Mostrar los seleccionados"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Mostrar todos"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Seleccionar todo"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Desmarcar todos"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 destinatario seleccionado"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> destinatarios seleccionados"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Contactos desconocidos"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"No hay contactos seleccionados."</string>
+    <string name="add_field" msgid="5257149039253569615">"Agregar información"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"a través de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> a través de <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"editar"</string>
+    <string name="description_star" msgid="2605854427360036550">"favorito"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Editar contacto"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"no se combinó"</item>
+    <item quantity="other" msgid="425683718017380845">"combinado a partir de fuentes <xliff:g id="COUNT">%0$d</xliff:g> "</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Eliminar"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Error al guardar"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Otro"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 192d45a..48ed391 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Detalles del contacto"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Ver contacto"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Editar contacto"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Correo electrónico:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Tipo:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Crear contacto"</string>
     <string name="searchHint" msgid="8482945356247760701">"Buscar contactos"</string>
     <string name="menu_search" msgid="9147752853603483719">"Buscar"</string>
@@ -65,13 +67,14 @@
     <string name="readOnlyContactDeleteConfirmation" msgid="2137170726670196909">"Este contacto contiene información de varias cuentas. La información de las cuentas de solo lectura se ocultará en las listas de contactos, pero no se eliminará."</string>
     <string name="multipleContactDeleteConfirmation" msgid="938900978442960800">"Si se elimina este contacto, se eliminará la información de varias cuentas."</string>
     <string name="deleteConfirmation" msgid="811706994761610640">"El contacto se eliminará."</string>
-    <string name="menu_done" msgid="796017761764190697">"OK"</string>
+    <string name="menu_done" msgid="796017761764190697">"Listo"</string>
     <string name="menu_doNotSave" msgid="2174577548513895144">"Volver"</string>
     <string name="editContact_title_edit" msgid="7678695190666836093">"Editar contacto"</string>
     <string name="editContact_title_insert" msgid="9125600232291405757">"Contacto nuevo"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Pronunciación"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notas"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Llamada de Internet"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Tono"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Nombre y apellido"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Transcripción fonética del nombre"</string>
@@ -124,18 +127,18 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"No hay contactos visibles."</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Se ha encontrado un contacto."</item>
-    <item quantity="other" msgid="7752927996850263152">"Se han encontrado <xliff:g id="COUNT">%d</xliff:g> contactos."</item>
+    <item quantity="one" msgid="5517063038754171134">"1 encontrado"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> encontrados"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"No se ha encontrado el contacto."</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"No se ha encontrado."</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contacto"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contactos"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 encontrado"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> encontrados"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contactos"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoritos"</string>
     <string name="dialerIconLabel" msgid="6500826552823403796">"Teléfono"</string>
-    <string name="recentCallsIconLabel" msgid="1419116422359067949">"Llamadas"</string>
+    <string name="recentCallsIconLabel" msgid="1419116422359067949">"Registro"</string>
     <string name="liveFolderAll" msgid="4789010460767506206">"Todos los contactos"</string>
     <string name="liveFolderFavorites" msgid="3100957542927222282">"Contactos destacados"</string>
     <string name="liveFolderPhone" msgid="3739376066610926780">"Contactos con números de teléfono"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contactos de tarjeta SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"No tienes ningún contacto que mostrar. (Si acabas de añadir una cuenta, es posible que la sincronización de contactos tarde algunos minutos)."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"No tienes ningún contacto que mostrar."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"No tienes ningún contacto que mostrar."\n\n"Para añadir contactos, pulsa la tecla de "<font fgcolor="#ffffffff"><b>"menú"</b></font>" y toca en:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con los contactos que puedes sincronizar en el teléfono,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar."</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"No tienes ningún contacto que mostrar. (Si acabas de añadir una cuenta, es posible que la sincronización de contactos tarde algunos minutos)."\n\n"Para añadir contactos, pulsa la tecla de "<font fgcolor="#ffffffff"><b>"menú"</b></font>" y toca en:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con contactos que puedes sincronizar en el teléfono,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opciones de visualización"</b></font>" para modificar los contactos visibles,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar."</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"No tienes ningún contacto que mostrar."\n\n"Para añadir contactos, pulsa la tecla de "<font fgcolor="#ffffffff"><b>"menú"</b></font>" y toca en:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con los contactos que puedes sincronizar en el teléfono,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar."</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"No tienes ningún contacto que mostrar. (Si acabas de añadir una cuenta, es posible que la sincronización de contactos tarde algunos minutos)."\n\n"Para añadir contactos, pulsa la tecla de "<font fgcolor="#ffffffff"><b>"menú"</b></font>" y toca en:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con contactos que puedes sincronizar en el teléfono,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opciones de visualización"</b></font>" para modificar los contactos visibles,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar."</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"No tienes contactos."\n\n"Para añadir uno, pulsa la tecla de menú"<font fgcolor="#ffffffff"><b></b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con los contactos que puedes sincronizar,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar"</b></font>" para importar contactos desde la tarjeta SIM o SD"\n</li>"."</string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"No tienes contactos. Si acabas de añadir una cuenta, la sincronización puede tardar."\n\n"Para añadir contactos, pulsa la tecla de menú"<font fgcolor="#ffffffff"><b></b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con contactos que puedes sincronizar,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opciones de visualización"</b></font>" para modificar los contactos visibles,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar"</b></font>" para importar contactos desde la tarjeta SIM o SD"\n</li>"."</string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"No tienes contactos."\n\n"Para añadir uno, pulsa la tecla de menú"<font fgcolor="#ffffffff"><b></b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con los contactos que puedes sincronizar,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar"</b></font>" para importar contactos desde la tarjeta SD"\n</li>"."</string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"No tienes contactos. Si acabas de añadir una cuenta, la sincronización puede tardar."\n\n"Para añadir contactos, pulsa la tecla de menú"<font fgcolor="#ffffffff"><b></b></font>" y toca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Cuentas"</b></font>" para añadir o configurar una cuenta con contactos que puedes sincronizar,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opciones de visualización"</b></font>" para modificar los contactos visibles,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Contacto nuevo"</b></font>" para crear un nuevo contacto,"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/exportar"</b></font>" para importar contactos desde la tarjeta SD"\n</li>"."</string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"No tienes favoritos."\n\n"Para añadir un contacto a tu lista de favoritos, sigue estos pasos:"\n\n"        "<li>"Toca en la pestaña "<b>"Contactos"</b>"."\n</li>" "\n<li>"Selecciona el contacto que quieras añadir a tus favoritos."\n</li>" "\n<li>"Toca la estrella situada junto al nombre del contacto."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Todos los contactos"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Destacados"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Volver a llamar"</string>
     <string name="callAgain" msgid="3197312117049874778">"Volver a llamar"</string>
     <string name="returnCall" msgid="8171961914203617813">"Devolver llamada"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min. y <xliff:g id="SECONDS">%2$s</xliff:g> seg."</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min. y <xliff:g id="SECONDS">%s</xliff:g> seg."</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Contactos frecuentes"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Añadir contacto"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"¿Deseas añadir \"<xliff:g id="EMAIL">%s</xliff:g>\" a Contactos?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"foto de contacto"</string>
     <string name="description_minus_button" msgid="387136707700230172">"menos"</string>
     <string name="description_plus_button" msgid="515164827856229880">"más"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Almac comp no disponible"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Falta la tarjeta SD."</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Almacenam comp no detectado"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"No se ha detectado ninguna tarjeta SD."</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Falta la tarjeta SD."</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"No se ha detectado ninguna tarjeta SD."</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Buscando vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importar contactos desde la tarjeta SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importar de almacenam comp"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importar contactos desde la tarjeta SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exportar a almacenam comp"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exportar contactos a la tarjeta SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importar contactos desde la tarjeta SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportar contactos a la tarjeta SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Compartir contactos visibles"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importar un archivo de vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importar varios archivos de vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importar todos los archivos de vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Buscando datos de vCard en almacenamiento compartido"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Buscando datos de vCard en la tarjeta SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Error al analizar almacenamiento compartido"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Error al buscar en la tarjeta SD"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Error al analizar almacenamiento compartido (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Error al buscar en la tarjeta SD (motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Buscando datos de vCard en la tarjeta SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Error al buscar en la tarjeta SD"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Error al buscar en la tarjeta SD (motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Error de E/S"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Memoria insuficiente (el archivo puede ser demasiado grande)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"No se ha podido analizar el archivo de vCard debido a un error inesperado."</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"No se ha podido analizar el archivo de vCard (a pesar de que su formato parece ser válido) porque no es compatible con la implementación actual."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"No se ha encontrado el archivo de vCard en el almacenamiento compartido."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"No se ha encontrado ningún archivo de vCard en la tarjeta SD."</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"No se ha encontrado ningún archivo de vCard en la tarjeta SD."</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Error al recopilar metainformación de los archivos vCard"</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"No ha sido posible importar uno o varios archivos (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Error desconocido"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Seleccionar archivo de vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Leyendo vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Leyendo archivos de vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Error al leer datos de vCard"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contactos"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> archivos"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Almacenamiento temporal local de vCard(s) en caché"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"El importador está almacenando de forma temporal local vCard(s). La importación empezará pronto."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Error al leer los datos de vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Lectura de vCard cancelada"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Importación de vCard terminada"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Importador de vCard iniciado"</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"El importador de vCard importará vCard transcurrido un tiempo."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Confirmar la exportación"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"¿Estás seguro de que quieres exportar tu lista de contactos a \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Error al exportar los datos del contacto"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Se ha producido un error al exportar los datos del contacto."\n"Motivo del error: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"No hay contactos que exportar."</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Hay demasiados archivos de vCard en el almacenamiento compartido."</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Hay demasiados archivos de vCard en la tarjeta SD."</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Hay demasiados archivos de vCard en la tarjeta SD."</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"El nombre de archivo necesario es demasiado largo (\"<xliff:g id="FILENAME">%s</xliff:g>\")."</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Exportador de vCard iniciado"</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Exportación de vCard finalizada"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Exportando datos de contacto"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exportando datos de contacto a \"<xliff:g id="FILE_NAME">%s</xliff:g>\"..."</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"No se ha podido inicializar el exportador: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Error al obtener información de la base de datos"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"No hay contactos que exportar. Si ya tienes contactos en el teléfono, es posible que algunos proveedores de datos no permitan que se exporten todos los contactos a otros dispositivos."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"El redactor de vCard no se ha inicializado correctamente."</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"No se ha podido abrir el archivo \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contactos"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"No se ha podido abrir el archivo \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contactos"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Nombres de tus contactos"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Añadir pausa de dos segundos"</string>
     <string name="add_wait" msgid="3360818652790319634">"Añadir espera"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"No se ha encontrado ninguna aplicación que pueda realizar esta acción."</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Recordar esta opción"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Desconocido"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Ningún dato"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Cuentas"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importar/exportar"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importar/exportar contactos"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Todos los demás contactos"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Todos los contactos"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Si eliminas \"<xliff:g id="GROUP">%s</xliff:g>\" de la sincronización, también se eliminarán todos los contactos no agrupados."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Solo en el teléfono (no sincronizado)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Solo en el teléfono (no sincronizado)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Llamar a <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Llamar a casa"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Llamar al móvil"</string>
@@ -336,7 +347,7 @@
     <string name="email_home" msgid="8573740658148184279">"Enviar email a casa"</string>
     <string name="email_mobile" msgid="2042889209787989814">"Enviar email al móvil"</string>
     <string name="email_work" msgid="2807430017302722689">"Enviar email a trabajo"</string>
-    <string name="email_other" msgid="3454004077967657109">"Enviar email"</string>
+    <string name="email_other" msgid="3454004077967657109">"Enviar correo electrónico"</string>
     <string name="email_custom" msgid="7548003991586214105">"Correo electrónico <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="email" msgid="5668400997660065897">"Correo electrónico"</string>
     <string name="map_home" msgid="1243547733423343982">"Ver dirección de casa"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chatear con ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chatear con Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Dirección"</string>
     <string name="postal_street" msgid="8133143961580058972">"Calle"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Apartado postal"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Vecindario"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Provincia/Estado"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Código postal"</string>
     <string name="postal_country" msgid="7638264508416368690">"País"</string>
+    <string name="full_name" msgid="6602579550613988977">"Nombre"</string>
     <string name="name_given" msgid="1687286314106019813">"Nombre"</string>
     <string name="name_family" msgid="3416695586119999058">"Apellidos"</string>
     <string name="name_prefix" msgid="59756378548779822">"Prefijo del nombre"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Apellido fonético"</string>
     <string name="account_type_format" msgid="718948015590343010">"Contacto de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Contacto de <xliff:g id="SOURCE_0">%1$s</xliff:g> de <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Utilizar esta foto"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"No se puede editar la información del contacto de <xliff:g id="SOURCE">%1$s</xliff:g> en este dispositivo."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"No hay información adicional para este contacto."</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Seleccionar foto de la galería"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"La lista de contactos se está actualizando para reflejar el cambio de idioma."\n\n"Por favor, espera..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"La lista de contactos se está actualizando."\n\n"Por favor, espera..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Los contactos se están actualizando. "\n\n"El proceso de actualización necesita aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB de almacenamiento interno del teléfono."\n\n"Selecciona una de las siguientes opciones:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Los contactos se están actualizando. "\n\n"El proceso de actualización necesita aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB de almacenamiento interno."\n\n"Selecciona una de las siguientes opciones:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Desinstalar algunas aplicaciones"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Reintentar actualización"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Resultados de la búsqueda de: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Buscando..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Cargando..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Mostrar seleccionados"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Mostrar todos"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Seleccionar todo"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Desmarcar todo"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"Un destinatario seleccionado"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> destinatarios seleccionados"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Contactos desconocidos"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"No hay ningún contacto seleccionado."</string>
+    <string name="add_field" msgid="5257149039253569615">"Añadir información"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"con <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> con <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"editar"</string>
+    <string name="description_star" msgid="2605854427360036550">"favoritos"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Editar contacto"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"sin fusionar"</item>
+    <item quantity="other" msgid="425683718017380845">"fusionados desde <xliff:g id="COUNT">%0$d</xliff:g> fuentes"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Eliminar"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Error al guardar"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Otro"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;Ñ;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index d908cf7..8791455 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Détails du contact"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Afficher le contact"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Modifier le contact"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Adresse e-mail :"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Type :"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Créer un contact"</string>
     <string name="searchHint" msgid="8482945356247760701">"Rech. des contacts"</string>
     <string name="menu_search" msgid="9147752853603483719">"Rechercher"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Nouveau contact"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Prononciation phonétique"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notes"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Appel VoIP"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Sonnerie"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Nom et prénom"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Nom phonétique"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Aucun contact visible"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"1 contact trouvé"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> contacts trouvés"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 contact trouvé"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> contact(s) trouvé(s)"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Contact introuvable"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Introuvable"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contact"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contacts"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 contact trouvé"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> contact(s) trouvé(s)"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contacts"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoris"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contacts de carte SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Vous n\'avez aucun contact à afficher. Si vous venez d\'ajouter un compte, la synchronisation des contacts peut prendre quelques minutes."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Vous n\'avez aucun contact à afficher."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Vous n\'avez aucun contact à afficher."\n\n"Pour ajouter des contacts, appuyez sur "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" et sélectionnez :"\n" "\n<li><font fgcolor="#ffffffff"><b>"Comptes"</b></font>" pour ajouter ou configurer un compte dont vous pourrez synchroniser les contacts sur le téléphone ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nouveau contact"</b></font>" pour créer un contact ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/Exporter."</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Vous n\'avez aucun contact à afficher (si vous venez d\'ajouter un compte, la synchronisation des contacts peut prendre quelques minutes)."\n\n"Pour ajouter des contacts, appuyez sur "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" et sélectionnez :"\n" "\n<li><font fgcolor="#ffffffff"><b>"Comptes"</b></font>" pour ajouter ou configurer un compte comportant des contacts que vous pourrez synchroniser sur le téléphone ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Options d\'affichage"</b></font>" pour modifier le paramètre de visibilité des contacts ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nouveau contact"</b></font>" pour créer une entrée ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/Exporter."</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Vous n\'avez aucun contact à afficher."\n\n"Pour ajouter des contacts, appuyez sur "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" et sélectionnez :"\n" "\n<li><font fgcolor="#ffffffff"><b>"Comptes"</b></font>" pour ajouter ou configurer un compte dont vous pourrez synchroniser les contacts sur le téléphone ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nouveau contact"</b></font>" pour créer un contact ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/Exporter."</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Vous n\'avez aucun contact à afficher (si vous venez d\'ajouter un compte, la synchronisation des contacts peut prendre quelques minutes)."\n\n"Pour ajouter des contacts, appuyez sur "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" et sélectionnez :"\n" "\n<li><font fgcolor="#ffffffff"><b>"Comptes"</b></font>" pour ajouter ou configurer un compte comportant des contacts que vous pourrez synchroniser sur le téléphone ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Options d\'affichage"</b></font>" pour modifier le paramètre de visibilité des contacts ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nouveau contact"</b></font>" pour créer une entrée ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/Exporter."</b></font>\n</li></string>
+    <!-- syntax error in translation for noContactsHelpText (7633826236417884130) org.xmlpull.v1.XmlPullParserException: expected: /b read: font (position:END_TAG </font>@1:549 in java.io.StringReader@4506411)  -->
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Vous n\'avez aucun contact à afficher (si vous venez d\'ajouter un compte, la synchronisation des contacts peut prendre quelques minutes)."\n\n"Pour ajouter des contacts, appuyez sur "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" et sélectionnez :"\n" "\n<li><font fgcolor="#ffffffff"><b>"Comptes"</b></font>" pour ajouter ou configurer un compte dont vous pourrez synchroniser les contacts sur le téléphone ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Options d\'affichage"</b></font>" pour modifier le paramètre de visibilité des contacts ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nouveau contact"</b></font>" pour créer un contact ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/Exporter"</b></font>" pour importer des contacts depuis votre carte SIM ou SD."\n</li></string>
+    <!-- syntax error in translation for noContactsNoSimHelpText (467658807711582876) org.xmlpull.v1.XmlPullParserException: expected: /b read: font (position:END_TAG </font>@1:553 in java.io.StringReader@39d99a4d)  -->
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Vous n\'avez aucun contact à afficher (si vous venez d\'ajouter un compte, la synchronisation des contacts peut prendre quelques minutes)."\n\n"Pour ajouter des contacts, appuyez sur "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" et sélectionnez :"\n" "\n<li><font fgcolor="#ffffffff"><b>"Comptes"</b></font>" pour ajouter ou configurer un compte dont vous pourrez synchroniser les contacts sur le téléphone ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Options d\'affichage"</b></font>" pour modifier le paramètre de visibilité des contacts ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nouveau contact"</b></font>" pour créer un contact ;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importer/Exporter"</b></font>" pour importer des contacts depuis votre carte SD."\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Vous ne disposez d\'aucun favoris."\n\n"Pour ajouter un contact à la liste de favoris :"\n\n"        "<li>"Appuyez sur l\'onglet "<b>"Contacts"</b>"."\n</li>" "\n<li>"Appuyez sur le contact à ajouter à vos favoris."\n</li>" "\n<li>"Appuyez sur l\'étoile en regard du nom du contact."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Tous les contacts"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Suivis"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Rappeler"</string>
     <string name="callAgain" msgid="3197312117049874778">"Renouveler l\'appel"</string>
     <string name="returnCall" msgid="8171961914203617813">"Rappeler"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> mn <xliff:g id="SECONDS">%2$s</xliff:g> s"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> mn <xliff:g id="SECONDS">%s</xliff:g> s"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Contactés fréquemment"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Ajouter un contact"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Ajouter \"<xliff:g id="EMAIL">%s</xliff:g>\" aux contacts ?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"photo du contact"</string>
     <string name="description_minus_button" msgid="387136707700230172">"moins"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Stockage partagé non disponible"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Aucune carte SD trouvée"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Aucun stockage partagé n\'a été détecté."</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Aucune carte SD n\'a été détectée."</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Aucune carte SD trouvée"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Aucune carte SD n\'a été détectée."</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Recherche des données VCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importer à partir de la carte SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importer depuis le stockage partagé"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importer à partir de la carte SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exporter vers le stockage partagé"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exporter vers la carte SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importer à partir de la carte SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exporter vers la carte SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Partager les contacts visibles"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importer un fichier vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importer plusieurs fichiers vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importer tous les fichiers vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Recherche de données VCard sur le stockage partagé"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Recherche de données VCard sur la carte SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Échec de l\'analyse du stockage partagé"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Échec de l\'analyse de la carte SD"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Échec de l\'analyse du stockage partagé (Raison : \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Échec de l\'analyse de la carte SD (Raison : \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Recherche de données VCard sur la carte SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Échec de l\'analyse de la carte SD"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Échec de l\'analyse de la carte SD (Raison : \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Erreur d\'E/S"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Mémoire insuffisante (fichier probablement trop volumineux)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Échec de l\'analyse des données VCard pour une raison inattendue"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Échec de l\'analyse des données VCard. Le format semble valide, mais l\'implémentation actuelle ne le prend pas en charge."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Aucun fichier VCard n\'a été trouvé sur le stockage partagé."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Aucun fichier VCard n\'a été trouvé sur la carte SD."</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Aucun fichier VCard n\'a été trouvé sur la carte SD."</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Échec de la collecte des métadonnées contenues dans le(s) fichier(s) vCard"</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Échec de l\'importation d\'un ou de plusieurs fichiers (%s)"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Erreur inconnue"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Sélectionner un fichier VCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Lecture des données VCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Lecture des fichiers VCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Échec de la lecture des données VCard"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> sur <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contacts"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> sur <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> fichiers"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Mise en cache de fichier(s) vCard dans l\'espace de stockage temporaire local"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Le programme d\'importation met en cache le(s) fichier(s) vCard dans l\'espace de stockage temporaire local. L\'importation effective va bientôt commencer."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Échec de la lecture des données vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Lecture des données vCard annulée"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Importation du fichier vCard annulée"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Programme d\'importation de fichiers vCard démarré"</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Le fichier vCard sera importé dans quelques instants."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Confirmer l\'exportation"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Voulez-vous vraiment exporter la liste de contacts vers \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\" ?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Échec lors de l\'exportation des données du contact"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Échec lors de l\'exportation des données du contact."\n"Motif : \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Aucun contact exportable"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Le stockage partagé contient trop de fichiers VCard."</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"La carte SD contient trop de fichiers VCard."</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"La carte SD contient trop de fichiers VCard."</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Le nom de fichier requis est trop long (\"<xliff:g id="FILENAME">%s</xliff:g>\")."</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Programme d\'exportation de fichiers vCard démarré"</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Exportation du fichier vCard interrompue"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Exportation des données des contacts"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exportation des données des contacts vers \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Échec de l\'initialisation du module d\'exportation : \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Impossible d\'obtenir les informations concernant la base de données"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Aucun contact n\'est exportable. Si votre téléphone comporte actuellement des contacts, il se peut qu\'un fournisseur de données empêche leur exportation hors de votre téléphone."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Le système de composition vCard n\'est pas correctement initialisé."</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Impossible d\'ouvrir \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\" : <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> sur <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contacts"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Impossible d\'ouvrir \"<xliff:g id="FILE_NAME">%s</xliff:g>\" : <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> sur <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contacts"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Noms de vos contacts"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Ajouter une pause de 2 s"</string>
     <string name="add_wait" msgid="3360818652790319634">"Ajouter Attendre"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Aucune application pour gérer cette action"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Mémoriser ce choix"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Inconnu"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Aucune donnée"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Comptes"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importer/Exporter"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importer/Exporter les contacts"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Tous les autres contacts"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Tous les contacts"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Le retrait du groupe \"<xliff:g id="GROUP">%s</xliff:g>\" de la synchronisation entraîne également la suppression de tous les contacts non groupés de la synchronisation."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Téléphone uniquement (sans synchronisation)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Téléphone uniquement (sans synchronisation)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Appeler <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Appeler domicile"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Appeler mobile"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chatter via ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chatter via Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chatter"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adresse"</string>
     <string name="postal_street" msgid="8133143961580058972">"Rue"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Boîte postale"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Voisinage"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"État"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Code postal"</string>
     <string name="postal_country" msgid="7638264508416368690">"Pays"</string>
+    <string name="full_name" msgid="6602579550613988977">"Nom"</string>
     <string name="name_given" msgid="1687286314106019813">"Prénom"</string>
     <string name="name_family" msgid="3416695586119999058">"Nom de famille"</string>
     <string name="name_prefix" msgid="59756378548779822">"Préfixe du nom"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Phonétique du nom de famille"</string>
     <string name="account_type_format" msgid="718948015590343010">"Contact <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Contact <xliff:g id="SOURCE_0">%1$s</xliff:g> de <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Utiliser cette photo"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Vous ne pouvez pas modifier les informations du contact <xliff:g id="SOURCE">%1$s</xliff:g> sur cet appareil."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Aucune autre information pour ce contact"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Sélectionner une photo dans la galerie"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Mise à jour de la liste des contacts en cours suite au changement de langue."\n\n"Veuillez patienter..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Mise à jour de la liste des contacts en cours."\n\n"Veuillez patienter..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Les contacts sont en cours de mise à niveau. "\n\n"La mise à niveau requiert environ <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> Mo de mémoire interne du téléphone."\n\n"Choisissez l\'une des options suivantes :"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Les contacts sont en cours de mise à niveau. "\n\n"La mise à niveau requiert environ <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> Mo de mémoire interne du téléphone."\n\n"Choisissez l\'une des options suivantes :"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Désinstaller certaines applications"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Réessayer la mise à niveau"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Résultats de recherche pour : <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Recherche en cours..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Chargement en cours…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Afficher la sélection"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Tout afficher"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Tout sélectionner"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Tout désélectionner"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 destinataire sélectionné"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> destinataires sélectionnés"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Contacts inconnus"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Aucun contact sélectionné"</string>
+    <string name="add_field" msgid="5257149039253569615">"Ajouter des informations"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"modifier"</string>
+    <string name="description_star" msgid="2605854427360036550">"favori"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Modifier le contact"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"1 contact non fusionné"</item>
+    <item quantity="other" msgid="425683718017380845">"1 contact fusionné à partir de <xliff:g id="COUNT">%0$d</xliff:g> sources"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Supprimer"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Erreur d\'enregistrement"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Autre"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 22757ab..c55bfe4 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Dettagli contatto"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Visualizza contatto"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Modifica contatto"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Indirizzo email:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Tipo:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Crea contatto"</string>
     <string name="searchHint" msgid="8482945356247760701">"Cerca contatti"</string>
     <string name="menu_search" msgid="9147752853603483719">"Cerca"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Nuovo contatto"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetica"</string>
     <string name="label_notes" msgid="8337354953278341042">"Note"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Chiamata Internet"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Suoneria"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Nome e cognome"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Nome fonetico"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Nessun contatto visibile"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"1 contatto trovato"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> contatti trovati"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 trovato"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> trovati"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Contatto non trovato"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Non trovati"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contatto"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contatti"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 trovato"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> trovati"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contatti"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Preferiti"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contatti SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Non ci sono contatti da visualizzare (se hai appena aggiunto un account, la sincronizzazione dei contatti potrebbe richiedere alcuni minuti)."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Non ci sono contatti da visualizzare."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Non sono presenti contatti da visualizzare."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Non sono presenti contatti da visualizzare (se hai appena aggiunto un account, la sincronizzazione dei contatti potrebbe richiedere alcuni minuti)."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opzioni di visualizzazione"</b></font>" per modificare i contatti visibili"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Non sono presenti contatti da visualizzare."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Non sono presenti contatti da visualizzare (se hai appena aggiunto un account, la sincronizzazione dei contatti potrebbe richiedere alcuni minuti)."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opzioni di visualizzazione"</b></font>" per modificare i contatti visibili"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Non sono presenti contatti da visualizzare."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>" per importare contatti dalla SIM o dalla scheda SD"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Non sono presenti contatti da visualizzare (se hai appena aggiunto un account, la sincronizzazione dei contatti potrebbe richiedere alcuni minuti)."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opzioni di visualizzazione"</b></font>" per modificare i contatti visibili"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>" per importare contatti dalla SIM o dalla scheda SD"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Non sono presenti contatti da visualizzare."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>" per importare contatti dalla scheda SD"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Non sono presenti contatti da visualizzare (se hai appena aggiunto un account, la sincronizzazione dei contatti potrebbe richiedere alcuni minuti)."\n\n"Per aggiungere contatti, premi "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e tocca:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Account"</b></font>" per aggiungere o configurare un account con contatti sincronizzabili con il telefono"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opzioni di visualizzazione"</b></font>" per modificare i contatti visibili"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nuovo contatto"</b></font>" per creare da zero un nuovo contatto"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importa/esporta"</b></font>" per importare contatti dalla scheda SD"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Non sono presenti preferiti."\n\n"Per aggiungere un contatto al tuo elenco di preferiti:"\n\n<li>"Tocca la scheda "<b>"Contatti."</b>\n</li>" "\n<li>"Tocca il contatto da aggiungere ai preferiti."\n</li>" "\n<li>"Tocca la stella accanto al nome del contatto."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Tutti i contatti"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Speciali"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Richiama"</string>
     <string name="callAgain" msgid="3197312117049874778">"Richiama"</string>
     <string name="returnCall" msgid="8171961914203617813">"Chiama numero"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min. <xliff:g id="SECONDS">%2$s</xliff:g> sec."</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min. <xliff:g id="SECONDS">%s</xliff:g> sec."</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Contattati spesso"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Aggiungi contatto"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Aggiungi \"<xliff:g id="EMAIL">%s</xliff:g>\" ai contatti?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"foto contatto"</string>
     <string name="description_minus_button" msgid="387136707700230172">"meno"</string>
     <string name="description_plus_button" msgid="515164827856229880">"più"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Archivio condiviso non disp."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Nessuna scheda SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Nessun archivio condiviso rilev."</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Nessuna scheda SD rilevata"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Nessuna scheda SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Nessuna scheda SD rilevata"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Ricerca vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importa da scheda SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importa da archivio cond."</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importa da scheda SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Esporta in archivio cond."</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Esporta su scheda SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importa da scheda SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Esporta su scheda SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Condividi contatti visibili"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importa un file vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importa più file vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importa tutti i file vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Ricerca di dati vCard nell\'archivio condiviso"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Ricerca dati vCard su scheda SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Scansione dell\'archivio condiviso non riuscita"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Analisi scheda SD non riuscita"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Scansione dell\'archivio condiviso non riuscita (motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Analisi scheda SD non riuscita (motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Ricerca dati vCard su scheda SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Analisi scheda SD non riuscita"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Analisi scheda SD non riuscita (motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Errore I/O"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Memoria insufficiente (il file potrebbe essere di dimensioni eccessive)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Impossibile analizzare la vCard per motivi imprevisti"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Impossibile analizzare la vCard nonostante sembri avere un formato valido perché l\'implementazione corrente non la supporta"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Nessun file vCard trovato nell\'archivio condiviso."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Nessun file vCard trovato sulla scheda SD"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Nessun file vCard trovato sulla scheda SD"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Raccolta dei metadati dei file vCard forniti non riuscita."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Impossibile importare uno o più file (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Errore sconosciuto"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Seleziona file vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Lettura vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Lettura file vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Lettura dati vCard non riuscita"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> contatti su <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> file su <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Memorizzazione delle vCard nella cache di archiviazione temporanea locale"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"L\'importazione memorizzerà le vCard nella cache di archiviazione temporanea locale. L\'importazione reale inizierà a breve."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Lettura dati vCard non riuscita"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Lettura dati vCard annullata"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Importazione vCard terminata"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Importazione vCard avviata."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"La vCard verrà importata successivamente."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Conferma esportazione"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Esportare l\'elenco di contatti in \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Esportazione dati contatti non riuscita"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Esportazione dati contatti non riuscita."\n"Motivo dell\'errore: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Nessun contatto esportabile"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Troppi file vCard nell\'archivio condiviso"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Troppi dati vCard sulla scheda SD"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Troppi dati vCard sulla scheda SD"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Il nome file richiesto è troppo lungo (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Esportazione vCard avviata."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Esportazione vCard terminata"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Esportazione dati di contatto"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Esportazione dati di contatto in \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Impossibile inizializzare l\'utilità di esportazione: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Recupero informazioni database non riuscito"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Nessun contatto esportabile. Se nel tuo telefono sono presenti dei contatti, qualche provider di dati potrebbe impedire l\'esportazione di tutti i contatti all\'esterno del telefono."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Il compositore di vCard non è correttamente inizializzato"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Impossibile aprire \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> contatti su <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Impossibile aprire \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> contatti su <xliff:g id="TOTAL_NUMBER">%s</xliff:g>"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"I nomi dei tuoi contatti"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Aggiungi pausa 2 sec"</string>
     <string name="add_wait" msgid="3360818652790319634">"Aggiungi attesa"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Nessuna applicazione trovata in grado di gestire questa azione"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Memorizza questa scelta"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Sconosciuto"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Nessun dato"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Account"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importa/esporta"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importa/esporta contatti"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Tutti gli altri contatti"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Tutti i contatti"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Se rimuovi \"<xliff:g id="GROUP">%s</xliff:g>\" dalla sincronizzazione, verranno rimossi anche tutti i contatti separati."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Solo su telefono (non sincronizzato)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Solo su telefono (non sincronizzato)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Chiama n. <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Chiama casa"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Chiama cellulare"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chatta su ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chatta su Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chatta"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Indirizzo"</string>
     <string name="postal_street" msgid="8133143961580058972">"Indirizzo postale"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Casella postale"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Zona"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Provincia"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Codice postale"</string>
     <string name="postal_country" msgid="7638264508416368690">"Paese"</string>
+    <string name="full_name" msgid="6602579550613988977">"Nome"</string>
     <string name="name_given" msgid="1687286314106019813">"Nome fornito"</string>
     <string name="name_family" msgid="3416695586119999058">"Cognome"</string>
     <string name="name_prefix" msgid="59756378548779822">"Prefisso nome"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Cognome fonetico"</string>
     <string name="account_type_format" msgid="718948015590343010">"Contatto da <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"da <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Contatto <xliff:g id="SOURCE_0">%1$s</xliff:g> da <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Utilizza questa foto"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Informazioni del contatto da <xliff:g id="SOURCE">%1$s</xliff:g> non modificabili su questo dispositivo."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Nessuna informazione aggiuntiva per questo contatto"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Seleziona foto da galleria"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"L\'elenco contatti verrà aggiornato per rispecchiare il cambio di lingua."\n\n"Attendi..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Elenco contatti in fase di aggiornamento."\n\n"Attendi..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Contatti in fase di aggiornamento. "\n\n"Il processo di aggiornamento richiede circa <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB di memoria interna del telefono."\n\n"Scegli una delle seguenti opzioni:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Contatti in fase di aggiornamento. "\n\n"Il processo di aggiornamento richiede circa <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB di memoria interna del telefono."\n\n"Scegli una delle seguenti opzioni:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Disinstalla alcune applicazioni"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Riprova l\'aggiornamento"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Risultati di ricerca per: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Ricerca in corso..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Caricamento in corso…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Mostra selezionati"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Mostra tutto"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Seleziona tutto"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Deseleziona tutto"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 destinatario selezionato"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> destinatari selezionati"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Contatti sconosciuti"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Nessun contatto selezionato."</string>
+    <string name="add_field" msgid="5257149039253569615">"Aggiungi informazioni"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"tramite <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> tramite <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"modifica"</string>
+    <string name="description_star" msgid="2605854427360036550">"preferiti"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Modifica contatto"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"non uniti"</item>
+    <item quantity="other" msgid="425683718017380845">"uniti da <xliff:g id="COUNT">%0$d</xliff:g> origini"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Elimina"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Errore di salvataggio"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Altro"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;L;M;N;O;P;Q;R;S;T;U;V;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 5ff9bb9..597fb19 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"連絡先情報"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"連絡先を表示"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"連絡先を編集"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"メールアドレス:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"種類:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"連絡先を新規登録"</string>
     <string name="searchHint" msgid="8482945356247760701">"連絡先を検索"</string>
     <string name="menu_search" msgid="9147752853603483719">"検索"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"連絡先を新規登録"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"読み"</string>
     <string name="label_notes" msgid="8337354953278341042">"メモ"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"インターネット通話"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"着信音"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"名前"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"よみがな"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"表示可能な連絡先はありません"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"連絡先が1件あります"</item>
-    <item quantity="other" msgid="7752927996850263152">"連絡先が<xliff:g id="COUNT">%d</xliff:g>件あります"</item>
+    <item quantity="one" msgid="5517063038754171134">"1件見つかりました"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g>件見つかりました"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"連絡先が見つかりません"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"見つかりませんでした"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"連絡先1件"</item>
-    <item quantity="other" msgid="5660384247071761844">"連絡先<xliff:g id="COUNT">%d</xliff:g>件"</item>
+    <item quantity="one" msgid="4826918429708286628">"1件見つかりました"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g>件見つかりました"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"連絡先"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"お気入り"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"SIMカードの連絡先"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"表示する連絡先がありません（アカウントを追加した直後の場合は、連絡先の同期に数分かかることがあります）。"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"表示する連絡先がありません。"</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"表示できる連絡先がありません。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し: "\n" "\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>" "\n<li>"新しい連絡先を一から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]"\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"表示できる連絡先がありません（アカウントを追加した場合は、連絡先が同期されるまでに数分かかることがあります）。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し: "\n" "\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>" "\n<li>"表示される連絡先を変更するには["<font fgcolor="#ffffffff"><b>"表示オプション"</b></font>"]をタップします"\n</li>" "\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]"\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"表示できる連絡先がありません。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し: "\n" "\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>" "\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]"\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"表示できる連絡先がありません（アカウントを追加した場合は、連絡先が同期されるまでに数分かかることがあります）。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し: "\n" "\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>" "\n<li>"表示される連絡先を変更するには["<font fgcolor="#ffffffff"><b>"表示オプション"</b></font>"]をタップします"\n</li>" "\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]"\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"表示できる連絡先がありません。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し:"\n\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"SIMまたはSDカードから連絡先をインポートする場合は["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]をタップします"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"表示できる連絡先がありません（アカウントを追加した場合は、連絡先が同期されるまでに数分かかることがあります）。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し:"\n\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>\n<li>"表示される連絡先を変更するには["<font fgcolor="#ffffffff"><b>"表示オプション"</b></font>"]をタップします"\n</li>" "\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"SIMまたはSDカードから連絡先をインポートする場合は["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]をタップします"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"表示できる連絡先がありません。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し:"\n\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"SDカードから連絡先をインポートする場合は["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]をタップします"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"表示できる連絡先がありません（アカウントを追加した場合は、連絡先が同期されるまでに数分かかることがあります）。"\n\n"連絡先を追加するには、まず"<font fgcolor="#ffffffff"><b>"MENU"</b></font>"キーを押し:"\n\n<li>"電話との同期が可能な連絡先のアカウントを追加または設定する場合は["<font fgcolor="#ffffffff"><b>"アカウント"</b></font>"]をタップします"\n</li>\n<li>"表示される連絡先を変更するには["<font fgcolor="#ffffffff"><b>"表示オプション"</b></font>"]をタップします"\n</li>" "\n<li>"新しい連絡先を最初から作成する場合は["<font fgcolor="#ffffffff"><b>"連絡先を新規登録"</b></font>"]をタップします"\n</li>" "\n<li>"SDカードから連絡先をインポートする場合は["<font fgcolor="#ffffffff"><b>"インポート/エクスポート"</b></font>"]をタップします"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"お気に入りはありません。"\n\n"お気に入りのリストに連絡先を追加するには: "\n\n"        "<li>"["<b>"連絡先"</b>"]タブをタップします"\n</li>" "\n<li>"お気に入りに追加する連絡先をタップします"\n</li>" "\n<li>"連絡先名の横にあるスターをタップします"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"すべての連絡先"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"スター付き"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"コールバック"</string>
     <string name="callAgain" msgid="3197312117049874778">"再発信"</string>
     <string name="returnCall" msgid="8171961914203617813">"発信"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g>分<xliff:g id="SECONDS">%2$s</xliff:g>秒"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g>分<xliff:g id="SECONDS">%s</xliff:g>秒"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"よく使う連絡先"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"連絡先を追加"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"<xliff:g id="EMAIL">%s</xliff:g> を連絡先に追加しますか？"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"連絡先の写真"</string>
     <string name="description_minus_button" msgid="387136707700230172">"マイナス"</string>
     <string name="description_plus_button" msgid="515164827856229880">"プラス"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"共有ストレージ使用不可"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"SDカードがありません"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"共有ストレージがありません"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"SDカードを検出できませんでした"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"SDカードがありません"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"SDカードを検出できませんでした"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"vCardを検索中"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"SIMカードからインポート"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"共有ストレージからインポート"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"SDカードからインポート"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"共有ストレージにエクスポート"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"SDカードにエクスポート"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"SDカードからインポート"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"SDカードにエクスポート"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"表示可能な連絡先を共有"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"vCardファイルを1つインポート"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"複数のvCardファイルをインポート"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"すべてのvCardファイルをインポート"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"共有ストレージ内でvCardデータを検索中"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"SDカードのvCardデータを検索しています"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"共有ストレージのスキャンエラー"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"SDカードのスキャンに失敗しました"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"共有ストレージをスキャンできませんでした（理由: 「<xliff:g id="FAIL_REASON">%s</xliff:g>」）"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"SDカードのスキャンに失敗しました（理由: <xliff:g id="FAIL_REASON">%s</xliff:g>）"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"SDカードのvCardデータを検索しています"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"SDカードのスキャンに失敗しました"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"SDカードのスキャンに失敗しました（理由: <xliff:g id="FAIL_REASON">%s</xliff:g>）"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"送受信エラー"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"メモリが不足しています（ファイルが大きすぎる可能性があります）"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"予期しない理由によりvCardの解析に失敗しました"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"vCardの解析に失敗しました。正しいフォーマットですが、現在サポートされていません。"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"共有ストレージ内にvCardファイルが見つかりません"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"SDカードでvCardファイルが見つかりません"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"SDカードでvCardファイルが見つかりません"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"指定されたvCardファイルのメタ情報を取得できませんでした。"</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"1つ以上のファイルをインポートできませんでした（%s）。"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"不明なエラー"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"vCardファイルの選択"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"vCardを読み取り中"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"vCardファイルを読み取り中"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"vCardデータの読み取りに失敗しました"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>/<xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>件の連絡先"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>/<xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>件のファイル"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"vCardをローカル一時ストレージにキャッシュしています"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"vCardをローカル一時ストレージにキャッシュしています。間もなくインポート処理を開始します。"</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"vCardデータを読み取れませんでした"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"vCardの読み取りがキャンセルされました"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"vCardのインポートを停止しました"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCardインポータが起動しました。"</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"vCardは後ほどvCardインポータによってインポートされます。"</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"エクスポートの確認"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"連絡先リストを「<xliff:g id="VCARD_FILENAME">%s</xliff:g>」にエクスポートしますか？"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"連絡先データのエクスポートに失敗しました"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"連絡先データのエクスポートに失敗しました。"\n"理由: 「<xliff:g id="FAIL_REASON">%s</xliff:g>」"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"エクスポートできる連絡先がありません"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"共有ストレージ内のvCardファイルが多すぎます"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"SDカードのvCardファイルが多すぎます"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"SDカードのvCardファイルが多すぎます"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"指定したファイル名が長すぎます（「<xliff:g id="FILENAME">%s</xliff:g>」）"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCardエクスポータが起動しました。"</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"vCardのエクスポートを停止しました"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"連絡先データのエクスポート"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"連絡先データを\"<xliff:g id="FILE_NAME">%s</xliff:g>\"にエクスポートしています"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"エクスポータを初期化できませんでした: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"データベース情報の取得に失敗しました"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"エクスポートできる連絡先がありません。携帯電話に連絡先を登録している場合、データプロバイダが外部への連絡先のエクスポートをすべて禁止している可能性があります。"</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"vCardコンポーザーが正しく初期化されていません"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%1$s</xliff:g>\"を開けませんでした: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>/<xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>件のファイル"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%s</xliff:g>\"を開けませんでした: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g>/<xliff:g id="TOTAL_NUMBER">%s</xliff:g>件のファイル"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"連絡先の名前"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"2秒間の停止を追加"</string>
     <string name="add_wait" msgid="3360818652790319634">"着信を追加"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"この操作を行うアプリケーションが見つかりません"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"この選択を保存"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"不明"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"データがありません"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"アカウント"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"インポート/エクスポート"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"連絡先のインポート/エクスポート"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"その他の連絡先"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"すべての連絡先"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"「<xliff:g id="GROUP">%s</xliff:g>」を同期から除外すると、グループに含まれない連絡先もすべて同期から除外されます。"</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"電話のみ（非同期）"</string>
+    <string name="account_phone" msgid="4025734638492419713">"電話のみ（非同期）"</string>
     <string name="call_custom" msgid="7756571794763171802">"<xliff:g id="CUSTOM">%s</xliff:g>に発信"</string>
     <string name="call_home" msgid="1990519474420545392">"自宅に発信"</string>
     <string name="call_mobile" msgid="7502236805487609178">"携帯電話に発信"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"ICQでチャット"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Jabberでチャット"</string>
     <string name="chat" msgid="9025361898797412245">"チャット"</string>
+    <string name="postal_address" msgid="8765560217149624536">"住所"</string>
     <string name="postal_street" msgid="8133143961580058972">"番地"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"私書箱"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"街区 (中国等で使用)"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"都道府県"</string>
     <string name="postal_postcode" msgid="572136414136673751">"郵便番号"</string>
     <string name="postal_country" msgid="7638264508416368690">"国"</string>
+    <string name="full_name" msgid="6602579550613988977">"名前"</string>
     <string name="name_given" msgid="1687286314106019813">"名"</string>
     <string name="name_family" msgid="3416695586119999058">"姓"</string>
     <string name="name_prefix" msgid="59756378548779822">"敬称（名前の前）"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"姓のよみがな"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g>からの連絡先"</string>
     <string name="from_account_format" msgid="687567483928582084">"<xliff:g id="SOURCE">%1$s</xliff:g>からの連絡先"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_1">%2$s</xliff:g>からの<xliff:g id="SOURCE_0">%1$s</xliff:g>連絡先"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"この写真を使用"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g>からの連絡先情報はこの携帯端末では編集できません。"</string>
     <string name="no_contact_details" msgid="6754415338321837001">"この連絡先の詳細情報はありません"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"ギャラリーから写真を選ぶ"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"言語の変更に伴い連絡先リストを更新しています。"\n\n"しばらくお待ちください..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"連絡先リストを更新しています。"\n\n"お待ちください..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"連絡先をアップグレードしています。"\n\n"アップグレード処理には約<xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>MBの内部ストレージが必要です。"\n\n"次のいずれかのオプションを選択してください:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"連絡先をアップグレードしています。"\n\n"アップグレード処理には約<xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>MBの内部ストレージが必要です。"\n\n"次のいずれかのオプションを選択してください:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"一部のアプリケーションをアンインストール"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"アップグレードを再試行"</string>
     <string name="search_results_for" msgid="8705490885073188513">"検索結果: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"検索中..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"読み込み中..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"選択した連絡先を表示"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"すべて表示"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"すべて選択"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"選択をすべて解除"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1件の宛先を選択済み"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g>件の宛先を選択済み"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"不明な連絡先"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"連絡先が選択されていません。"</string>
+    <string name="add_field" msgid="5257149039253569615">"情報を追加"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"<xliff:g id="SOURCE">%1$s</xliff:g>経由"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g>、<xliff:g id="SOURCE">%2$s</xliff:g>経由"</string>
+    <string name="description_edit" msgid="1601490950771217014">"編集"</string>
+    <string name="description_star" msgid="2605854427360036550">"お気に入り"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"連絡先の編集"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"結合する連絡先はありません"</item>
+    <item quantity="other" msgid="425683718017380845">"<xliff:g id="COUNT">%0$d</xliff:g>件の連絡先が結合されました"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"削除"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"保存エラー"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"その他"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767"></string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 54724eb..3c10538 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"연락처 세부정보"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"연락처 보기"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"연락처 수정"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"이메일 주소:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"유형:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"연락처 만들기"</string>
     <string name="searchHint" msgid="8482945356247760701">"주소록 검색"</string>
     <string name="menu_search" msgid="9147752853603483719">"검색"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"새 연락처"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"소리나는 대로"</string>
     <string name="label_notes" msgid="8337354953278341042">"메모"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"인터넷 통화"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"벨소리"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"이름"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"이름(소리나는 대로)"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"표시할 수 있는 주소록이 없습니다."</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"연락처 1개를 찾았습니다."</item>
-    <item quantity="other" msgid="7752927996850263152">"연락처 <xliff:g id="COUNT">%d</xliff:g>개를 찾았습니다."</item>
+    <item quantity="one" msgid="5517063038754171134">"1개를 찾았습니다."</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g>개를 찾았습니다."</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"연락처를 찾을 수 없습니다."</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"찾을 수 없음"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1개의 연락처"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g>개의 연락처"</item>
+    <item quantity="one" msgid="4826918429708286628">"1개를 찾았습니다."</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g>개를 찾았습니다."</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"주소록"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"즐겨찾기"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"SIM 카드 주소록"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"표시할 연락처가 없습니다. 방금 계정을 추가한 경우 연락처를 동기화하는 데 몇 분 정도 걸릴 수 있습니다."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"표시할 연락처가 없습니다."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"표시할 연락처가 없습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다. "\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려면 터치합니다. "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"표시할 연락처가 없습니다. 방금 계정을 추가한 경우 연락처를 동기화하는 데 몇 분 정도 걸릴 수 있습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다. "\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려면 터치합니다. "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"표시 옵션"</b></font>": 표시되는 연락처를 변경하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다. "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"표시할 연락처가 없습니다"\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다. "\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려는 경우 터치합니다. "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"표시할 연락처가 없습니다. 방금 계정을 추가한 경우 연락처를 동기화하는 데 몇 분 정도 걸릴 수 있습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다. "\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려면 터치합니다. "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"표시 옵션"</b></font>": 표시되는 연락처를 변경하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다. "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"표시할 연락처가 없습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다."\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려는 경우 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>": SIM 또는 SD 카드에서 연락처를 가져오려면 터치합니다."\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"표시할 연락처가 없습니다. 방금 계정을 추가한 경우 연락처를 동기화하는 데 몇 분 정도 걸릴 수 있습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다."\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"표시 옵션"</b></font>": 표시할 연락처를 변경하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>": SIM 또는 SD 카드에서 연락처를 가져오려면 터치합니다."\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"표시할 연락처가 없습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다."\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>": SD 카드에서 연락처를 가져오려면 터치합니다."\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"표시할 연락처가 없습니다. 방금 계정을 추가한 경우 연락처를 동기화하는 데 몇 분 정도 걸릴 수 있습니다."\n\n"연락처를 추가하려면 "<font fgcolor="#ffffffff"><b>"메뉴"</b></font>"를 누르고 다음을 터치합니다."\n" "\n<li><font fgcolor="#ffffffff"><b>"계정"</b></font>": 휴대전화에 동기화할 수 있는 연락처가 있는 계정을 구성하거나 추가하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"표시 옵션"</b></font>": 표시되는 연락처를 변경하려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"새 연락처"</b></font>": 연락처를 새로 만들려면 터치합니다."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"가져오기/내보내기"</b></font>": SD 카드에서 연락처를 가져오려면 터치합니다."\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"즐겨찾기가 없습니다. "\n\n"즐겨찾기 목록에 연락처를 추가하려면 "\n\n<li><b>"주소록"</b>" 탭을 터치하고"\n</li>" "\n<li>"즐겨찾기에 추가할 연락처를 터치하고"\n</li>" "\n<li>"연락처 이름 옆의 별표를 터치합니다."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"모든 연락처"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"중요 주소록"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"전화 걸기"</string>
     <string name="callAgain" msgid="3197312117049874778">"다시 걸기"</string>
     <string name="returnCall" msgid="8171961914203617813">"전화 걸기"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g>분 <xliff:g id="SECONDS">%2$s</xliff:g>초"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g>분 <xliff:g id="SECONDS">%s</xliff:g>초"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"자주 연락하는 사람들의 연락처"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"연락처 추가"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"\'<xliff:g id="EMAIL">%s</xliff:g>\'을(를) 주소록에 추가하겠습니까?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"주소록 사진"</string>
     <string name="description_minus_button" msgid="387136707700230172">"빼기"</string>
     <string name="description_plus_button" msgid="515164827856229880">"더하기"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"공유 저장용량을 사용할 수 없음"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"SD 카드 없음"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"공유 저장용량이 없습니다."</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"SD 카드가 발견되지 않았습니다."</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"SD 카드 없음"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"SD 카드가 발견되지 않았습니다."</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"vCard 검색"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"SIM 카드에서 가져오기"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"공유 저장용량에서 가져오기"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"SD 카드에서 가져오기"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"공유 저장용량으로 내보내기"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"SD 카드로 내보내기"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"SD 카드에서 가져오기"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"SD 카드로 내보내기"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"표시되는 연락처 공유"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"vCard 파일 한 개 가져오기"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"vCard 파일 여러 개 가져오기"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"모든 vCard 파일 가져오기"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"공유 저장용량에서 vCard 데이터 검색"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"SD 카드의 vCard 데이터 검색"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"공유 저장용량 스캔 실패"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"SD 카드 스캔 실패"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"공유 저장용량 스캔 실패(이유: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\')"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"SD 카드 스캔 실패(이유: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\')"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"SD 카드의 vCard 데이터 검색"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"SD 카드 스캔 실패"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"SD 카드 스캔 실패(이유: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\')"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"I/O 오류"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"메모리가 부족합니다. 파일이 너무 크기 때문일 수 있습니다."</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"예기치 못한 이유로 인해 vCard를 구문분석하지 못했습니다."</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"올바른 형식처럼 보이지만 현재 구현 환경에서는 VCard를 지원하지 않기 때문에 VCard 구문 분석에 실패했습니다."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"vCard 파일이 공유 저장용량에 없습니다."</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"SD 카드에 VCard 파일이 없습니다."</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"SD 카드에 VCard 파일이 없습니다."</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"지정한 vCard 파일에 대한 메타 정보를 수집하지 못했습니다."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"하나 이상의 파일을 가져오지 못했습니다(%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"알 수 없는 오류"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"vCard 파일 선택"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"vCard 읽는 중"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"vCard 파일 읽는 중"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"vCard 데이터를 읽어오지 못했습니다."</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"연락처 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>개(총 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>개) 내보내는 중"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"파일 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>개 중 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>개"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"vCard를 로컬 임시 저장공간에 캐시하는 중"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"가져오기 도구가 vCard를 로컬 임시 저장공간에 캐시하는 중입니다. 곧 실제 가져오기가 시작됩니다."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"vCard 데이터를 읽지 못했습니다."</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"vCard 데이터 읽기가 취소되었습니다."</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"vCard 가져오기 완료됨"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard 가져오기 도구가 시작되었습니다."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"잠시 후에 vCard 가져오기 도구가 vCard를 가져옵니다."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"내보내기 확인"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"\'<xliff:g id="VCARD_FILENAME">%s</xliff:g>\'(으)로 연락처 목록을 내보내시겠습니까?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"연락처 데이터를 내보내지 못했습니다."</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"연락처 데이터를 내보내지 못했습니다."\n"실패 이유: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\'"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"내보낼 수 있는 연락처가 없습니다."</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"공유 저장용량에 vCard 파일이 너무 많습니다."</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"SD 카드에 vCard 파일이 너무 많습니다."</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"SD 카드에 vCard 파일이 너무 많습니다."</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"필수 파일 이름이 너무 깁니다(\'<xliff:g id="FILENAME">%s</xliff:g>\')."</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard 내보내기 도구가 시작되었습니다."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"vCard 내보내기 완료됨"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"연락처 데이터 내보내기"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"연락처 데이터를 \'<xliff:g id="FILE_NAME">%s</xliff:g>\'(으)로 내보내는 중"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"내보내기를 초기화하지 못했습니다. \'<xliff:g id="EXACT_REASON">%s</xliff:g>\'"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"데이터베이스 정보를 가져오지 못했습니다."</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"내보낼 수 있는 연락처가 없습니다. 휴대전화에 실제로 연락처가 있다면 일부 데이터 제공업체에서 모든 연락처를 휴대전화 외부로 내보내지 못하도록 금지했을 수 있습니다."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"vCard 작성기가 바르게 초기화되지 않았습니다."</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\'<xliff:g id="FILE_NAME">%1$s</xliff:g>\'을(를) 열 수 없습니다. <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"연락처 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>개(총 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>개) 내보내는 중"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\'<xliff:g id="FILE_NAME">%s</xliff:g>\'을(를) 열 수 없습니다. <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"연락처 <xliff:g id="CURRENT_NUMBER">%s</xliff:g>개(총 <xliff:g id="TOTAL_NUMBER">%s</xliff:g>개) 내보내는 중"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"연락처 명단"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"2초 간 일시 정지 추가"</string>
     <string name="add_wait" msgid="3360818652790319634">"대기 시간 추가"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"이 작업을 처리하는 애플리케이션을 찾을 수 없습니다."</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"이 선택사항 저장"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"알 수 없음"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"데이터가 없습니다."</string>
     <string name="menu_accounts" msgid="8499114602017077970">"계정"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"가져오기/내보내기"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"연락처 가져오기/내보내기"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"다른 모든 연락처"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"모든 연락처"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"\'<xliff:g id="GROUP">%s</xliff:g>\'을(를) 동기화에서 제거하면 그룹화되지 않은 연락처도 동기화에서 제거됩니다."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"전화기 전용(동기화되지 않음)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"전화기 전용(동기화되지 않음)"</string>
     <string name="call_custom" msgid="7756571794763171802">"<xliff:g id="CUSTOM">%s</xliff:g>(으)로 전화걸기"</string>
     <string name="call_home" msgid="1990519474420545392">"집으로 전화걸기"</string>
     <string name="call_mobile" msgid="7502236805487609178">"휴대전화로 전화걸기"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"ICQ로 채팅"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Jabber로 채팅"</string>
     <string name="chat" msgid="9025361898797412245">"채팅"</string>
+    <string name="postal_address" msgid="8765560217149624536">"주소"</string>
     <string name="postal_street" msgid="8133143961580058972">"번지"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"사서함"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"인근 지역"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"시/도"</string>
     <string name="postal_postcode" msgid="572136414136673751">"우편번호"</string>
     <string name="postal_country" msgid="7638264508416368690">"국가"</string>
+    <string name="full_name" msgid="6602579550613988977">"이름"</string>
     <string name="name_given" msgid="1687286314106019813">"이름"</string>
     <string name="name_family" msgid="3416695586119999058">"성"</string>
     <string name="name_prefix" msgid="59756378548779822">"경칭"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"성(소리나는 대로)"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> 연락처"</string>
     <string name="from_account_format" msgid="687567483928582084">"출처: <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_1">%2$s</xliff:g>에서 가져온 <xliff:g id="SOURCE_0">%1$s</xliff:g> 연락처"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"사진 사용"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g> 연락처 정보는 이 기기에서 수정할 수 없습니다."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"연락처에 대한 추가 정보가 없습니다."</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"갤러리에서 사진 선택"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"변경된 언어를 반영하도록 연락처 목록을 업데이트하는 중입니다."\n\n"잠시 기다려 주세요."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"연락처 목록을 업데이트하고 있습니다."\n\n"잠시 기다려 주세요..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"연락처를 업그레이드하는 중입니다. "\n\n"업그레이드 프로세스에는 약 <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>Mb의 휴대전화 내부 저장공간이 필요합니다."\n\n"다음 옵션 중 하나를 선택하세요."</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"주소록을 업그레이드하는 중입니다. "\n\n"업그레이드 프로세스에는 약 <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>MB의 휴대전화 내부 저장공간이 필요합니다."\n\n"다음 옵션 중 하나를 선택하세요."</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"일부 애플리케이션 제거"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"업그레이드 다시 시도"</string>
     <string name="search_results_for" msgid="8705490885073188513">"<xliff:g id="QUERY">%s</xliff:g>에 대한 검색결과"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"검색 중..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"로드 중..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"선택한 항목 표시"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"모두 표시"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"모두 선택"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"모두 선택취소"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"수신자 1명이 선택됨"</item>
+    <item quantity="other" msgid="4608837420986126229">"수신자 <xliff:g id="COUNT">%d</xliff:g>명이 선택됨"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"알 수 없는 연락처"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"선택한 연락처가 없습니다."</string>
+    <string name="add_field" msgid="5257149039253569615">"정보 추가"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"출처: <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g>(출처: <xliff:g id="SOURCE">%2$s</xliff:g>)"</string>
+    <string name="description_edit" msgid="1601490950771217014">"수정"</string>
+    <string name="description_star" msgid="2605854427360036550">"즐겨찾기"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"연락처 수정"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"병합되지 않았습니다."</item>
+    <item quantity="other" msgid="425683718017380845">"<xliff:g id="COUNT">%0$d</xliff:g>개 출처에서 병합했습니다."</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"삭제"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"저장하는 중에 오류가 발생했습니다."</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"기타"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 0c20319..8285b5a 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Egenskaper for kontakt"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Se på kontakt"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Rediger kontakt"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-postadresse:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Type: "</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Opprett kontakt"</string>
     <string name="searchHint" msgid="8482945356247760701">"Søk i kontakter"</string>
     <string name="menu_search" msgid="9147752853603483719">"Søk"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Ny kontakt"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetisk"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notater"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Internett-anrop"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Ringetone"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"For- og etternavn"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Fonetisk navn"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Ingen synlige kontakter"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Fant 1 kontakt"</item>
-    <item quantity="other" msgid="7752927996850263152">"Fant <xliff:g id="COUNT">%d</xliff:g> kontakter"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 funnet"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> funnet"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Fant ingen kontakter"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Ikke funnet"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 kontakt"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> kontakter"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 funnet"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> funnet"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kontakter"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoritter"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Kontakter på SIM-kort"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Du har ingen kontakter å vise. (Hvis du nettopp har lagt til en konto, kan det ta noen minutter å synkronisere kontaktene.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Du har ingen kontakter å vise."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Du har ingen kontakter å vise. "\n\n"Slik legger du til en kontakt: Trykk på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" og trykk deretter på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Kontoer"</b></font>" for å legge til eller konfigurere en konto med kontakter som kan synkroniseres til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" for å opprette en ny kontakt"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importér/eksportér"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Du har ingen kontakter å vise. (Hvis du nylig la til en konto, kan det ta noen minutter å synkronisere kontaktene.)"\n\n"Slik legger du til kontakter: Trykk på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" og trykk deretter på: "\n" "\n<li><font fgcolor="#ffffffff"><b>"Kontoer "</b></font>" for å legge til eller konfigurere en konto med kontakter som kan synkroniseres til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativer"</b></font>" for å endre hvilke kontakter som vises"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" for å opprette en ny kontakt"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importér/Eksportér"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Du har ingen kontakter å vise. "\n\n"Slik legger du til en kontakt: Trykk på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" og trykk deretter på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Kontoer"</b></font>" for å legge til eller konfigurere en konto med kontakter som kan synkroniseres til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" for å opprette en ny kontakt"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importér/eksportér"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Du har ingen kontakter å vise. (Hvis du nylig la til en konto, kan det ta noen minutter å synkronisere kontaktene.)"\n\n"Slik legger du til kontakter: Trykk på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" og trykk deretter på: "\n" "\n<li><font fgcolor="#ffffffff"><b>"Kontoer "</b></font>" for å legge til eller konfigurere en konto med kontakter som kan synkroniseres til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativer"</b></font>" for å endre hvilke kontakter som vises"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" for å opprette en ny kontakt"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importér/Eksportér"</b></font>\n</li></string>
+    <!-- syntax error in translation for noContactsHelpText (7633826236417884130) org.xmlpull.v1.XmlPullParserException: expected: /li read: font (position:END_TAG </font>@1:275 in java.io.StringReader@4506411)  -->
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Du har ingen kontakter å vise. (Hvis du nylig la til en konto, kan det ta noen minutter å synkronisere kontaktene.)"\n\n"Slik legger du til kontakter: Trykk på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" og trykk deretter på: "\n" "\n<li><font fgcolor="#ffffffff"><b>"Kontoer "</b></font>" for å legge til eller konfigurere en konto med kontakter som kan synkroniseres til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativer"</b></font>" for å endre hvilke kontakter som vises"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" for å opprette en ny kontakt"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importér/Eksportér"</b></font>" for å importere kontakter fra SIM- eller SD-kort"\n</li></string>
+    <!-- syntax error in translation for noContactsNoSimHelpText (467658807711582876) org.xmlpull.v1.XmlPullParserException: expected: /li read: font (position:END_TAG </font>@1:279 in java.io.StringReader@39d99a4d)  -->
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Du har ingen kontakter å vise. (Hvis du nylig la til en konto, kan det ta noen minutter å synkronisere kontaktene.)"\n\n"Slik legger du til kontakter: Trykk på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" og trykk deretter på: "\n" "\n<li><font fgcolor="#ffffffff"><b>"Kontoer "</b></font>" for å legge til eller konfigurere en konto med kontakter som kan synkroniseres til telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativer"</b></font>" for å endre hvilke kontakter som vises"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" for å opprette en ny kontakt"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importér/eksportér"</b></font>" for å importere kontakter fra SD-kortet"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Du har ingen favoritter."\n\n"Slik legger du til en kontakt i favorittlisten:"\n\n" "<li>"Trykk på fanen "<b>"Kontakter"</b>" "\n</li>" "\n<li>"Trykk på kontakten du vil legge til i favoritter"\n</li>" "\n<li>"Trykk på stjernen ved siden av kontaktnavnet"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Alle kontakter"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Med stjerne"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Ring tilbake"</string>
     <string name="callAgain" msgid="3197312117049874778">"Ring på nytt"</string>
     <string name="returnCall" msgid="8171961914203617813">"Ring tilbake"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min <xliff:g id="SECONDS">%2$s</xliff:g> sek"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> sek"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Ofte kontaktet"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Legg til kontakt"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Legg til «<xliff:g id="EMAIL">%s</xliff:g>» som kontakt?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"kontaktens bilde"</string>
     <string name="description_minus_button" msgid="387136707700230172">"minusknapp"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plussknapp"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Delt lagring utilgj."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Mangler minnekort"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Finner ikke delt lagring"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Fant ikke noe minnekort"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Mangler minnekort"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Fant ikke noe minnekort"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Leter etter VCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importér fra SIM-kort"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importér fra delt lagr."</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importér fra minnekort"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Eksportér til delt lagr."</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Eksportér til minnekort"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importér fra minnekort"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Eksportér til minnekort"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Del synlige kontakter"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importer én VCard-fil"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importer flere vCard-filer"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importer alle vCard-filer"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Søker etter vCard-data i delt lagring"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Leter etter VCard-data på minnekort"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Skanning av delt lagring mislyktes"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Kunne ikke scanne minnekort"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Skanning av delt lagring mislyktes (årsak: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Kunne ikke skanne minnekort (grunn: «<xliff:g id="FAIL_REASON">%s</xliff:g>»)"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Leter etter VCard-data på minnekort"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Kunne ikke scanne minnekort"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Kunne ikke skanne minnekort (grunn: «<xliff:g id="FAIL_REASON">%s</xliff:g>»)"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Inn/ut-feil (årsak: «FAIL_REASON»)"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Ikke tilstrekkelig minne (filen kan være for stor)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Kan ikke analysere VCard av uventet årsak"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Kan ikke analysere VCard selv om det ser ut til å være i riktig format, fordi den aktuelle implementeringen ikke støtter det."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Finner ingen vCard-filer i delt lagring"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Fant ingen VCard-filer på minnekortet"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Fant ingen VCard-filer på minnekortet"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Kan ikke hente inn metainformasjon for de(n) aktuelle vCard-filen(e)."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Importeringen av én eller flere filer mislyktes (%s)"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Ukjent feil"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Velg VCard-fil"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Leser VCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Leser VCard-fil(er)"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Kunne ikke lese VCard-data"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontakter"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> filer"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Bufrer vCard-fil(er) til lokal midlertidig lagring"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Importprogrammet bufrer vCard-filen(e) til lokal midlertidig lagring. Importen av selve filen starter snart."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Kan ikke lese vCard-data"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Lesing av vCard-data ble avbrutt"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Import av vCard-fil fullført"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Importprogrammet for vCard er startet."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Importprogrammet for vCard importerer vCard-filen etter kort tid."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Eksportbekreftelse"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Vil du eksportere kontaktlisten din til «<xliff:g id="VCARD_FILENAME">%s</xliff:g>»?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Kunne ikke eksportere kontaktlisten"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Eksport av kontaktdata mislyktes"\n"Årsak til feil: «<xliff:g id="FAIL_REASON">%s</xliff:g>»"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Det finnes ingen eksporterbar kontakt."</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"For mange VCard-filer på delt lagring"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"For mange VCard-datafiler på minnekortet"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"For mange VCard-datafiler på minnekortet"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"For langt filnavn kreves («<xliff:g id="FILENAME">%s</xliff:g>»)"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Eksportprogrammet for vCard er startet."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Eksport av vCard-fil fullført"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Eksporterer kontaktdata"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Eksporterer kontaktdata til «<xliff:g id="FILE_NAME">%s</xliff:g>»"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Kunne ikke starte eksporteringen: «<xliff:g id="EXACT_REASON">%s</xliff:g>»"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Klarte ikke å hente databaseinformasjon"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Det finnes ingen eksporterbare kontakter. Hvis du har kontakter på telefonen, kan disse i enkelte tilfeller ikke eksporteres. Dette skyldes i så fall at dataleverandøren ikke tillater det."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Objektet for vCard-redigering er ikke riktig initialisert"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Kunne ikke åpne «<xliff:g id="FILE_NAME">%1$s</xliff:g>»: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontakter"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Kunne ikke åpne «<xliff:g id="FILE_NAME">%s</xliff:g>»: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%s</xliff:g> kontakter"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Navn på kontakter"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Legg til pause på 2 sek."</string>
     <string name="add_wait" msgid="3360818652790319634">"Legg til Vent"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Ingen programmer som kan utføre denne handlingen ble funnet"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Husk dette valget"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Ukjent"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Ingen data"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Kontoer"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Import/eksport"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importér/eksportér kontakter"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"(Ugrupperte kontakter)"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Alle kontakter"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Hvis «<xliff:g id="GROUP">%s</xliff:g>» fjernes·fra synkroniseringen, vil også alle ugrupperte kontakter fjernes fra synkroniseringen."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Kun telefon (usynkronisert)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Kun telefon (usynkronisert)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Ring <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Ring (privat)"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Ring mobil"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Nettprat med ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Nettprat med Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Nettprat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adresse"</string>
     <string name="postal_street" msgid="8133143961580058972">"Gate"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Postboks"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Nabolag"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Poststed"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Postnummer"</string>
     <string name="postal_country" msgid="7638264508416368690">"Land"</string>
+    <string name="full_name" msgid="6602579550613988977">"Navn"</string>
     <string name="name_given" msgid="1687286314106019813">"Fornavn"</string>
     <string name="name_family" msgid="3416695586119999058">"Etternavn"</string>
     <string name="name_prefix" msgid="59756378548779822">"Første del av navn"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Fonetisk etternavn"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g>-kontakt"</string>
     <string name="from_account_format" msgid="687567483928582084">"fra <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_0">%1$s</xliff:g> kontakt fra <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Bruk dette bildet"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g>-kontaktinformasjon kan ikke redigeres på denne enheten."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Ingen utfyllende informasjon for denne kontakten"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Velg bilde fra galleriet"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Kontaktlisten er oppdatert med nytt språk."\n\n"Vent litt ..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Kontaktlisten oppdateres."\n\n"Vent litt ..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Oppgradering av kontakter pågår. "\n\n"Oppgraderingsprosessen krever cirka <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB internt minne på telefonen."\n\n"Velg ett av følgende alternativer:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Oppgradering av kontakter pågår. "\n\n"Oppgraderingsprosessen krever cirka <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB internt minne på telefonen."\n\n"Velg ett av følgende alternativer:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Avinstaller noen programmer"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Prøv å oppgradere på nytt"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Søkeresultater for <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Søker ..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Laster inn ..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Vis valgte"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Vis alle"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Marker alle"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Fjern alle markeringer"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"Én mottager valgt"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> mottagere valgt"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Ukjente kontakter"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Ingen kontakter valgt."</string>
+    <string name="add_field" msgid="5257149039253569615">"Legg til informasjon"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"rediger"</string>
+    <string name="description_star" msgid="2605854427360036550">"favoritt"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Rediger kontakt"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"ikke slått sammen"</item>
+    <item quantity="other" msgid="425683718017380845">"sammenslått fra <xliff:g id="COUNT">%0$d</xliff:g> kilder"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Slett"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Feil ved lagring"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Andre"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;Æ;Ø;Å"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index e9f31db..7a48313 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Details van contact"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Contact weergeven"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Contact bewerken"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-mailadres:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Type:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Contact maken"</string>
     <string name="searchHint" msgid="8482945356247760701">"Contacten zoeken"</string>
     <string name="menu_search" msgid="9147752853603483719">"Zoeken"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Nieuw contact"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetisch"</string>
     <string name="label_notes" msgid="8337354953278341042">"Opmerkingen"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Internetoproep"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Beltoon"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Voor- en achternaam"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Fonetisch gespelde naam"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Geen zichtbare contacten"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"1 contact gevonden"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> contacten gevonden"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 gevonden"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> gevonden"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Contact niet gevonden"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Niet gevonden"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contact"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contacten"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 gevonden"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> gevonden"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contact"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoriet"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contacten op SIM-kaart"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"U heeft geen contacten om weer te geven. Als u zojuist een account heeft toegevoegd, kan het enkele minuten duren voordat de contacten zijn gesynchroniseerd."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"U heeft geen contacten om weer te geven."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"U heeft geen contacten om weer te geven."\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of een account te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"U heeft geen contacten om weer te geven. (Als u net een account heeft toegevoegd, kan het enkele minuten duren voordat de contacten zijn gesynchroniseerd.)"\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of een account te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Weergaveopties\'"</b></font>" om de zichtbaarheid van contacten te wijzigen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"U heeft geen contacten om weer te geven."\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Account "</b></font>" om een account toe te voegen of een account te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"U heeft geen contacten om weer te geven. (Als u net een account heeft toegevoegd, kan het enkele minuten duren voordat de contacten zijn gesynchroniseerd.)"\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of een account te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Weergaveopties\'"</b></font>" om de zichtbaarheid van contacten te wijzigen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"U heeft geen contacten om weer te geven."\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>" om contacten te importeren van uw SIM- of SD-kaart"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"U heeft geen contacten om weer te geven. (Als u net een account heeft toegevoegd, kan het enkele minuten duren voordat de contacten zijn gesynchroniseerd.)"\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Weergaveopties\'"</b></font>" om de zichtbaarheid van contacten te wijzigen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact toe te voegen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>" om contacten van uw SIM- of SD-kaart te importeren"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"U heeft geen contacten om weer te geven."\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>" om contacten van uw SD-kaart te importeren"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"U heeft geen contacten om weer te geven. (Als u net een account heeft toegevoegd, kan het enkele minuten duren voordat de contacten zijn gesynchroniseerd.)"\n\n"Als u contacten wilt toevoegen, drukt u op "<font fgcolor="#ffffffff"><b>"\'Menu\'"</b></font>" en raakt u de volgende opties aan:"\n" "\n<li><font fgcolor="#ffffffff"><b>"\'Accounts\'"</b></font>" om een account toe te voegen of te configureren met contacten die u kunt synchroniseren met de telefoon"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Weergaveopties\'"</b></font>" om de zichtbaarheid van contacten te wijzigen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Nieuw contact\'"</b></font>" om een geheel nieuw contact te maken"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"\'Importeren/exporteren\'"</b></font>" om contacten van uw SD-kaart te importeren"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"U heeft geen favorieten."\n\n"U kunt als volgt een contact toevoegen aan uw lijst met favorieten:"\n\n"        "<li>"Raak het tabblad \'"<b>"Contacten"</b>"\' aan."\n</li>" "\n<li>"Raak het contact aan dat u wilt toevoegen aan uw favorieten."\n</li>" "\n<li>"Raak de ster aan die wordt weergegeven naast de naam van het contact."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Alle contacten"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Met ster"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Terugbellen"</string>
     <string name="callAgain" msgid="3197312117049874778">"Opnieuw bellen"</string>
     <string name="returnCall" msgid="8171961914203617813">"Terugbellen"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min. <xliff:g id="SECONDS">%2$s</xliff:g> sec."</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min. <xliff:g id="SECONDS">%s</xliff:g> sec."</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Regelmatig contact"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Contact toevoegen"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Voeg \"<xliff:g id="EMAIL">%s</xliff:g>\" toe aan contactpersonen?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"contactfoto"</string>
     <string name="description_minus_button" msgid="387136707700230172">"min"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Gedeelde opslag niet besch."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Geen SD-kaart"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Geen gedeelde opslag gevonden"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Geen SD-kaart gedetecteerd"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Geen SD-kaart"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Geen SD-kaart gedetecteerd"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Zoeken naar vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importeren van SIM-kaart"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importeren uit gedeelde opslag"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importeren van SD-kaart"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exporteren naar gedeelde opslag"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exporteren naar SD-kaart"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importeren van SD-kaart"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exporteren naar SD-kaart"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Zichtbare contacten delen"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Eén vCard-bestand importeren"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Meerdere vCard-bestanden importeren"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Alle vCard-bestanden importeren"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Zoeken naar vCard-gegevens in gedeelde opslag"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Zoeken naar vCard-gegevens op SD-kaart"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Scannen van gedeelde opslag is mislukt"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Scannen van SD-kaart is mislukt"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Scannen van gedeelde opslag is mislukt (reden: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\')"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Scannen van SD-kaart is mislukt: (Reden: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\')"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Zoeken naar vCard-gegevens op SD-kaart"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Scannen van SD-kaart is mislukt"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Scannen van SD-kaart is mislukt: (Reden: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\')"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"I/O-fout"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Onvoldoende geheugen (het bestand is mogelijk te groot)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Parseren van vCard is mislukt om onbekende reden"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Kan vCard niet parseren, ook al lijkt de indeling geldig. vCard wordt niet ondersteund door de huidige implementatie"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Geen vCard-bestand gevonden in gedeelde opslag"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Geen vCard-bestand gevonden op SD-kaart"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Geen vCard-bestand gevonden op SD-kaart"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Verzamelen van metagegevens van betreffende vCard-bestanden is mislukt."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Een of meer bestanden kunnen niet worden geïmporteerd (%s)"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Onbekende fout"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"vCard-bestand selecteren"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"vCard lezen"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"vCard-bestand(en) lezen"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Lezen van vCard-gegevens is mislukt"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> van <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contacten"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> van <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> bestanden"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"vCard(s) cachen in lokale tijdelijke opslag"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"De importer cacht vCard(s) in de lokale tijdelijke opslag. Daadwerkelijk importeren begint gauw."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Lezen van vCard-gegevens is mislukt"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Lezen van vCard-gegevens is geannuleerd"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Importeren van vCard voltooid"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard-importer gestart."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Na enige tijd wordt de vCard geïmporteerd door de vCard-importer."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Exporteren bevestigen"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Weet u zeker dat u uw lijst met contacten wilt exporteren naar \'<xliff:g id="VCARD_FILENAME">%s</xliff:g>\'?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Exporteren van contactgegevens mislukt"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Exporteren van contactgegevens mislukt."\n"Reden voor de fout: \'<xliff:g id="FAIL_REASON">%s</xliff:g>\'"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Er is geen contact dat geëxporteerd kan worden"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Te veel vCard-bestanden in de gedeelde opslag"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Te veel vCard-gegevens op de SD-kaart"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Te veel vCard-gegevens op de SD-kaart"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Vereiste bestandsnaam is te lang (\'<xliff:g id="FILENAME">%s</xliff:g>\')"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard-exporter gestart."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Exporteren van vCard voltooid"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Contactgegevens exporteren"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Contactgegevens exporteren naar \'<xliff:g id="FILE_NAME">%s</xliff:g>\'"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Kan het exportprogramma niet initialiseren: \'<xliff:g id="EXACT_REASON">%s</xliff:g>\'"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Databasegegevens ophalen mislukt"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Er is geen contact dat kan worden geëxporteerd. Als er contacten op uw telefoon staan, kan het exporteren van alle contacten vanaf uw telefoon mogelijk worden geblokkeerd door een gegevensprovider."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"De vCard-editor is niet juist geïnitialiseerd"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Kan \'<xliff:g id="FILE_NAME">%1$s</xliff:g>\' niet openen: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> van <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contacten"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Kan \'<xliff:g id="FILE_NAME">%s</xliff:g>\' niet openen: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> van <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contacten"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Namen van uw contacten"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Pauze van 2 seconden toevoegen"</string>
     <string name="add_wait" msgid="3360818652790319634">"Wachten toevoegen"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Er is geen toepassing gevonden om deze actie uit te voeren"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Deze keuze onthouden"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Onbekend"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Geen gegevens"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Accounts"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importeren/exporteren"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Contacten importeren/exporteren"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Alle andere contacten"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Alle contacten"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Als u \'<xliff:g id="GROUP">%s</xliff:g>\' verwijdert uit de synchronisatie, worden ook contacten die niet bij een groep horen uit de synchronisatie verwijderd."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Alleen voor telefoon (niet gesynchroniseerd)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Alleen voor telefoon (niet gesynchroniseerd)"</string>
     <string name="call_custom" msgid="7756571794763171802">"<xliff:g id="CUSTOM">%s</xliff:g> bellen"</string>
     <string name="call_home" msgid="1990519474420545392">"Bellen naar huis"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Bellen naar mobiel"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chatten via ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chatten via Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adres"</string>
     <string name="postal_street" msgid="8133143961580058972">"Straat"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Postbus"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Wijk"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Staat"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Postcode"</string>
     <string name="postal_country" msgid="7638264508416368690">"Land"</string>
+    <string name="full_name" msgid="6602579550613988977">"Naam"</string>
     <string name="name_given" msgid="1687286314106019813">"Roepnaam"</string>
     <string name="name_family" msgid="3416695586119999058">"Achternaam"</string>
     <string name="name_prefix" msgid="59756378548779822">"Voorvoegsel"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Fonetische achternaam"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> contact"</string>
     <string name="from_account_format" msgid="687567483928582084">"van <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_0">%1$s</xliff:g> contact uit <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Deze foto gebruiken"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Contactgegevens van <xliff:g id="SOURCE">%1$s</xliff:g> kunnen niet worden bewerkt op dit apparaat."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Geen extra gegevens voor dit contact"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Foto selecteren in Galerij"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Lijst met contacten wordt bijgewerkt om de gewijzigde taal te weerspiegelen."\n\n"Een ogenblik geduld..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Lijst met contacten wordt bijgewerkt."\n\n"Een ogenblik geduld..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Contacten worden bijgewerkt. "\n\n"Voor het upgradeproces is ongeveer <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB interne telefoonopslag vereist."\n\n"Kies een van de volgende opties:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Contacten worden bijgewerkt. "\n\n"Voor het upgradeproces is ongeveer <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB interne telefoonopslag vereist."\n\n"Kies een van de volgende opties:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Verwijder enkele toepassingen"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Upgrade opnieuw proberen"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Zoekresultaten voor: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Zoeken..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Laden…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Selectie weergeven"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Alles weergeven"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Alles selecteren"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Selectie ongedaan maken"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 ontvanger geselecteerd"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> ontvangers geselecteerd"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Onbekende contacten"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Geen contacten geselecteerd."</string>
+    <string name="add_field" msgid="5257149039253569615">"Informatie toevoegen"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"bewerken"</string>
+    <string name="description_star" msgid="2605854427360036550">"favoriet"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Contact bewerken"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"niet samengevoegd"</item>
+    <item quantity="other" msgid="425683718017380845">"samengevoegd uit <xliff:g id="COUNT">%0$d</xliff:g> bronnen"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Verwijderen"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Fout bij opslaan"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Overig"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 7116fca..83524fb 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Szczegóły kontaktu"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Wyświetl kontakt"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Edytuj kontakt"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Adres e-mail:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Typ:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Utwórz kontakt"</string>
     <string name="searchHint" msgid="8482945356247760701">"Przeszukuj kontakty"</string>
     <string name="menu_search" msgid="9147752853603483719">"Szukaj"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Nowy kontakt"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetycznie"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notatki"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Rozmowa internetowa"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Dzwonek"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Imię i nazwisko"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Nazwisko (fonetycznie)"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Brak widocznych kontaktów"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Znaleziono 1 kontakt"</item>
-    <item quantity="other" msgid="7752927996850263152">"Znalezionych kontaktów: <xliff:g id="COUNT">%d</xliff:g>"</item>
+    <item quantity="one" msgid="5517063038754171134">"Znaleziono: 1"</item>
+    <item quantity="other" msgid="3852668542926965042">"Znaleziono: <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Nie znaleziono kontaktu"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Nie znaleziono"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"Liczba kontaktów: 1"</item>
-    <item quantity="other" msgid="5660384247071761844">"Liczba kontaktów: <xliff:g id="COUNT">%d</xliff:g>"</item>
+    <item quantity="one" msgid="4826918429708286628">"Znaleziono: 1"</item>
+    <item quantity="other" msgid="7988132539476575389">"Znaleziono: <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kontakty"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Ulubione"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Kontakty z karty SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Nie masz żadnych kontaktów do wyświetlenia (jeśli konto zostało dopiero dodane, synchronizacja kontaktów może potrwać kilka minut)."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Nie masz żadnych kontaktów do wyświetlenia."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Nie masz żadnych kontaktów do wyświetlenia."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Nie masz żadnych kontaktów do wyświetlenia. (Jeśli przed chwilą dodano konto, synchronizacja kontaktów może potrwać kilka minut)."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opcje wyświetlania"</b></font>", aby zmienić widoczne typy kontaktów."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Nie masz żadnych kontaktów do wyświetlenia."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Nie masz żadnych kontaktów do wyświetlenia. (Jeśli przed chwilą dodano konto, synchronizacja kontaktów może potrwać kilka minut)."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opcje wyświetlania"</b></font>", aby zmienić widoczne typy kontaktów."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku."\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Nie masz żadnych kontaktów do wyświetlenia."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>", aby zaimportować kontakty z karty SIM lub SD."\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Nie masz żadnych kontaktów do wyświetlenia. (Jeśli przed chwilą dodano konto, synchronizacja kontaktów może potrwać kilka minut)."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opcje wyświetlania"</b></font>", aby zmienić widoczne typy kontaktów;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>", aby zaimportować kontakty z karty SIM lub SD."\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Nie masz żadnych kontaktów do wyświetlenia."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>", aby zaimportować kontakty z karty SD."\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Nie masz żadnych kontaktów do wyświetlenia. (Jeśli przed chwilą dodano konto, synchronizacja kontaktów może potrwać kilka minut)."\n\n"Aby dodać kontakty, naciśnij przycisk "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" i dotknij opcji: "\n" "\n<li><font fgcolor="#ffffffff"><b>"Konta"</b></font>", aby dodać lub skonfigurować konto zawierające kontakty, które można synchronizować z telefonem;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opcje wyświetlania"</b></font>", aby zmienić widoczne typy kontaktów;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Nowy kontakt"</b></font>", aby utworzyć nowy kontakt od początku;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importuj/eksportuj"</b></font>", aby zaimportować kontakty z karty SD."\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Nie masz żadnych ulubionych kontaktów."\n\n"Aby dodać kontakt do listy ulubionych:"\n\n"        "<li>"Dotknij karty "<b>"Kontakty"</b>"."\n</li>" "\n<li>"Dotknij kontaktu, który chcesz dodać do ulubionych."\n</li>" "\n<li>"Dotknij ikony gwiazdki obok nazwy kontaktu."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Wszystkie kontakty"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Oznaczone gwiazdką"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Oddzwoń"</string>
     <string name="callAgain" msgid="3197312117049874778">"Zadzwoń ponownie"</string>
     <string name="returnCall" msgid="8171961914203617813">"Połączenie zwrotne"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min <xliff:g id="SECONDS">%2$s</xliff:g> s"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> s"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Częste kontakty"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Dodaj kontakt"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Czy dodać adres „<xliff:g id="EMAIL">%s</xliff:g>” do kontaktów?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"zdjęcie kontaktu"</string>
     <string name="description_minus_button" msgid="387136707700230172">"minus"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Pamięć udostępniona niedostępna"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Brak karty SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Nie wykryto pamięci udostępnionej"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Nie wykryto karty SD"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Brak karty SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Nie wykryto karty SD"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Wyszukiwanie danych vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importuj z karty SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importuj z pamięci udostępnionej"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importuj z karty SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Eksportuj do pamięci udostępnionej"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Eksportuj na kartę SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importuj z karty SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Eksportuj na kartę SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Udostępnij widoczne kontakty"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importuj jeden plik vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importuj wiele plików vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importuj wszystkie pliki vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Wyszukiwanie danych vCard w pamięci udostępnionej"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Wyszukiwanie danych vCard na karcie SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Skanowanie pamięci udostępnionej nie powiodło się"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Skanowanie karty SD nie powiodło się"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Skanowanie pamięci udostępnionej nie powiodło się (przyczyna: „<xliff:g id="FAIL_REASON">%s</xliff:g>”)"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Skanowanie karty SD nie powiodło się (przyczyna: „<xliff:g id="FAIL_REASON">%s</xliff:g>”)"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Wyszukiwanie danych vCard na karcie SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Skanowanie karty SD nie powiodło się"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Skanowanie karty SD nie powiodło się (przyczyna: „<xliff:g id="FAIL_REASON">%s</xliff:g>”)"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Błąd wejścia/wyjścia"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Niewystarczająca ilość pamięci (plik może być zbyt duży)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Nie można zanalizować pliku vCard z nieoczekiwanego powodu"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Nie można zanalizować pliku vCard, mimo że prawdopodobnie ma on prawidłowy format. Bieżąca wersja go nie obsługuje."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"W pamięci udostępnionej nie znaleziono pliku vCard"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Na karcie SD nie znaleziono żadnego pliku vCard"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Na karcie SD nie znaleziono żadnego pliku vCard"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Nie można zebrać metainformacji z podanych plików vCard."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Nie można zaimportować co najmniej jednego pliku (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Nieznany błąd"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Wybierz plik vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Odczytywanie danych vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Odczytywanie plików vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Odczytywanie danych vCard nie powiodło się"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"Kontakt <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"plik <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Buforowanie kart vCard w lokalnym obszarze tymczasowym"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Program importujący buforuje karty vCard w lokalnym obszarze tymczasowym. Rzeczywisty proces importowania rozpocznie się za chwilę."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Nie można odczytać danych karty vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Odczytywanie danych kart vCard zostało anulowane"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Zakończono importowanie kart vCard"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Uruchomiono program importujący karty vCard."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Program importujący karty vCard zaimportuje za chwilę karty vCard."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Potwierdź eksport"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Czy na pewno chcesz wyeksportować listę kontaktów do pliku „<xliff:g id="VCARD_FILENAME">%s</xliff:g>”?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Nie można wyeksportować danych kontaktu"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Nie można wyeksportować danych kontaktu."\n"Przyczyna niepowodzenia: „<xliff:g id="FAIL_REASON">%s</xliff:g>”."</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Brak kontaktów, które można wyeksportować"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Zbyt wiele plików vCard w pamięci udostępnionej"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Zbyt dużo plików vCard na karcie SD"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Zbyt dużo plików vCard na karcie SD"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Wymagana nazwa pliku jest zbyt długa („<xliff:g id="FILENAME">%s</xliff:g>”)"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Uruchomiono program eksportujący karty vCard."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Zakończono eksportowanie kart vCard"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Eksportowanie danych kontaktowych"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Eksportowanie danych kontaktowych do pliku „<xliff:g id="FILE_NAME">%s</xliff:g>”"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Nie można zainicjować programu eksportującego: „<xliff:g id="EXACT_REASON">%s</xliff:g>”"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Nie można pobrać informacji o bazie danych"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Brak kontaktów, które można wyeksportować. Jeśli faktycznie masz kontakty w telefonie, wyeksportowanie któregokolwiek z nich poza telefon może być zabronione przez dostawcę danych."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Obiekt tworzenia danych vCard nie został poprawnie zainicjowany"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Nie można otworzyć pliku „<xliff:g id="FILE_NAME">%1$s</xliff:g>”: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"Kontakt <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Nie można otworzyć pliku „<xliff:g id="FILE_NAME">%s</xliff:g>”: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"Kontakt <xliff:g id="CURRENT_NUMBER">%s</xliff:g> z <xliff:g id="TOTAL_NUMBER">%s</xliff:g>"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Imiona i nazwiska oraz nazwy w Twoich kontaktach"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Dodaj 2-sekundową pauzę"</string>
     <string name="add_wait" msgid="3360818652790319634">"Dodaj oczekiwanie"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Nie znaleziono aplikacji do obsługi tej akcji"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Zapamiętaj ten wybór"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Nieznane"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Brak danych"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Konta"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importuj/eksportuj"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importuj/eksportuj kontakty"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Wszystkie inne kontakty"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Wszystkie kontakty"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Usunięcie grupy „<xliff:g id="GROUP">%s</xliff:g>” z ustawień synchronizacji spowoduje również usunięcie wszelkich rozgrupowanych kontaktów z tych ustawień."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Tylko telefon (brak synchronizacji)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Tylko telefon (brak synchronizacji)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Połącz – <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Połącz – domowy"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Połącz – komórka"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Czat w ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Czat w Jabberze"</string>
     <string name="chat" msgid="9025361898797412245">"Czat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adres"</string>
     <string name="postal_street" msgid="8133143961580058972">"Ulica"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Skrytka pocztowa"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Dzielnica"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Województwo"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Kod pocztowy"</string>
     <string name="postal_country" msgid="7638264508416368690">"Kraj"</string>
+    <string name="full_name" msgid="6602579550613988977">"Imię i nazwisko"</string>
     <string name="name_given" msgid="1687286314106019813">"Imię"</string>
     <string name="name_family" msgid="3416695586119999058">"Nazwisko"</string>
     <string name="name_prefix" msgid="59756378548779822">"Przedrostek nazwiska"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Nazwisko (fonetycznie)"</string>
     <string name="account_type_format" msgid="718948015590343010">"Kontakt <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"z <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Kontakt <xliff:g id="SOURCE_0">%1$s</xliff:g> z <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Użyj tego zdjęcia"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"W tym urządzeniu nie można edytować informacji kontaktowych <xliff:g id="SOURCE">%1$s</xliff:g>."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Brak dodatkowych informacji dla tego kontaktu"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Wybierz zdjęcie z galerii"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Lista kontaktów jest aktualizowana, aby odzwierciedlić zmianę języka."\n\n"Czekaj..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Lista kontaktów jest aktualizowana."\n\n"Czekaj..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Trwa proces uaktualniania kontaktów. "\n\n"Proces uaktualniania wymaga w przybliżeniu <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB wewnętrznej pamięci telefonu."\n\n"Wybierz jedną z następujących opcji:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Trwa proces uaktualniania kontaktów. "\n\n"Proces uaktualniania wymaga w przybliżeniu <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB wewnętrznej pamięci telefonu."\n\n"Wybierz jedną z następujących opcji:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Odinstaluj część aplikacji"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Ponów próbę uaktualnienia"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Wyniki wyszukiwania dla: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Trwa wyszukiwanie..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Wczytywanie…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Pokaż wybrane"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Pokaż wszystkie"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Wybierz wszystko"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Anuluj wybór wszystkich\n"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"Wybrano 1 odbiorcę"</item>
+    <item quantity="other" msgid="4608837420986126229">"Liczba wybranych odbiorców: <xliff:g id="COUNT">%d</xliff:g>"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Nieznane kontakty"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Nie wybrano kontaktów."</string>
+    <string name="add_field" msgid="5257149039253569615">"Dodaj informacje"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"za pośrednictwem: <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g>, za pośrednictwem: <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"edytuj"</string>
+    <string name="description_star" msgid="2605854427360036550">"ulubione"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Edytuj kontakt"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"nie scalono"</item>
+    <item quantity="other" msgid="425683718017380845">"scalono z <xliff:g id="COUNT">%0$d</xliff:g> źródeł"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Usuń"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Błąd podczas zapisywania"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Inne"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;Ą;B;C;Ć;D;E;Ę;F;G;H;I;J;K;L;Ł;M;N;Ń;O;Ó;P;Q;R;S;Ś;T;U;V;W;X;Y;Z;Ź;Ż"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 645b13b..408c4b2 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Detalhes de contacto"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Visualizar contacto"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Editar contacto"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Endereço de e-mail:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Tipo: "</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Criar contacto"</string>
     <string name="searchHint" msgid="8482945356247760701">"Pesquisar contactos"</string>
     <string name="menu_search" msgid="9147752853603483719">"Pesquisar"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Novo contacto"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonético"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notas"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Chamada por internet"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Toque"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Primeiro e último"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Nome fonético"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Sem contactos visíveis"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Foi encontrado 1 contacto"</item>
-    <item quantity="other" msgid="7752927996850263152">"Foram encontrados <xliff:g id="COUNT">%d</xliff:g> contactos"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 encontrado"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> encontrado(s)"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Contacto não encontrado"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Não encontrado"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contacto"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contactos"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 encontrado"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> encontrado(s)"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contactos"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoritos"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contactos no cartão SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Não existem contactos a apresentar. (Se acabou de adicionar uma conta, pode demorar alguns minutos a sincronizar os contactos.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Não existem contactos a apresentar."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Não tem contactos para apresentar."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contactos que pode sincronizar no telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar um novo contacto de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Não tem contactos para apresentar (se acabou de adicionar uma conta, pode demorar alguns minutos a sincronizar os contactos)."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com os contactos que pode sincronizar no telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de visualização"</b></font>" para alterar os contactos visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar uma nova conta de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Não tem contactos para apresentar."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contactos que pode sincronizar no telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar um novo contacto de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Não tem contactos para apresentar (se acabou de adicionar uma conta, pode demorar alguns minutos a sincronizar os contactos)."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com os contactos que pode sincronizar no telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de visualização"</b></font>" para alterar os contactos visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar uma nova conta de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Não tem contactos para apresentar."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contactos que pode sincronizar com o telemóvel"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar um novo contacto de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos do SIM ou do cartão SD"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Não tem contactos para apresentar (se acabou de adicionar uma conta, a sincronização dos contactos pode demorar alguns minutos)."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contactos que pode sincronizar com o telemóvel"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de visualização"</b></font>" para alterar os contactos visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar um novo contacto de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos do SIM ou do cartão SD"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Não tem contactos para apresentar."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contactos que pode sincronizar com o telemóvel"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar um novo contacto de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos do cartão SD"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Não tem contactos para apresentar (se acabou de adicionar uma conta, a sincronização dos contactos pode demorar alguns minutos)."\n\n"Para adicionar contactos, prima "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contactos que pode sincronizar com o telemóvel"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de visualização"</b></font>" para alterar os contactos visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contacto"</b></font>" para criar um novo contacto de raiz"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contactos do cartão SD"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Não tem favoritos."\n\n"Para adicionar um contacto à sua lista de favoritos:"\n\n"        "<li>"Toque no separador "<b>"Contactos"</b>" "\n</li>" "\n<li>"Toque no contacto que pretende adicionar aos favoritos"\n</li>" "\n<li>"Toque na estrela junto ao nome do contacto"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Todos os contactos"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Marcado com estrela"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Chamada de retorno"</string>
     <string name="callAgain" msgid="3197312117049874778">"Ligar novamente"</string>
     <string name="returnCall" msgid="8171961914203617813">"Devolver chamada"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min <xliff:g id="SECONDS">%2$s</xliff:g> seg"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> seg"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Contactos frequentes"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Adicionar contacto"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Adicionar \"<xliff:g id="EMAIL">%s</xliff:g>\" aos contactos?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"fotografia do contacto"</string>
     <string name="description_minus_button" msgid="387136707700230172">"menos"</string>
     <string name="description_plus_button" msgid="515164827856229880">"mais"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Armaz. partilhado indisp."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Nenhum cartão SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Armaz. partilhado não detectado"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Não foi detectado nenhum cartão SD"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Nenhum cartão SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Não foi detectado nenhum cartão SD"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"A procurar vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importar do cartão SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Imp. do armaz. partilhado"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importar do cartão SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exp. p/ armaz. partilhado"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exportar para cartão SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importar do cartão SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportar para cartão SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Partilhar contactos visíveis"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importar um ficheiro VCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importar vários ficheiros vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importar todos os ficheiros VCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"A pesquisar dados do vCard no armazenamento partilhado"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Procurar dados do vCard no cartão SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Falha ao procurar armazenamento partilhado"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Falha na análise do cartão SD"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Falha ao procurar armazenamento partilhado (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Falha na análise do cartão SD (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Procurar dados do vCard no cartão SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Falha na análise do cartão SD"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Falha na análise do cartão SD (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Erro de E/S"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"A memória não é suficiente (o ficheiro pode ser demasiado grande)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Falha na análise do vCard por motivo inesperado"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Falha na análise do vCard embora o formato pareça válido, uma vez que não é suportado pela implementação actual"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Não foi encontrado nenhum ficheiro vCard no armazenamento partilhado"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Não foi encontrado nenhum ficheiro vCard no cartão SD"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Não foi encontrado nenhum ficheiro vCard no cartão SD"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"A recolha de meta informações de ficheiro(s) vCard específicado(s) falhou."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"A importação de um ou vários ficheiros falhou (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Erro desconhecido"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Seleccionar ficheiro vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"A ler vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"A ler ficheiro(s) vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Falha na leitura de dados do vCard"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contactos"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> ficheiros"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"A colocar vCard(s) em cache no armazenamento temporário local"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"O importador está a colocar vCard(s) em cache no armazenamento temporário local. A importação efectiva começará brevemente."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"A leitura dos dados vCard falhou"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"A leitura de dados vCard foi cancelada"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"A importação do vCard terminou"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Importador vCard iniciado."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"O importador vCard importará o vCard dentro de algum tempo."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Confirmar exportação"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Tem a certeza de que pretende exportar a lista de contactos para \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Falha ao exportar dados de contacto"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Falha na exportação de dados de contacto."\n"Motivo da falha: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Não existe um contacto exportável"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Existem demasiados ficheiros vCard no armazenamento partilhado"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Demasiados ficheiros vCard no cartão SD"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Demasiados ficheiros vCard no cartão SD"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Nome de ficheiro demasiado longo (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Exportador vCard iniciado."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"A exportação do vCard terminou"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Exportar dados do contacto"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exportar dados do contacto para \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Não foi possível iniciar o exportador: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Falha na obtenção de informações da base de dados"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Não existe nenhum contacto exportável. Se tiver realmente contactos no telefone, a sua exportação para fora do telefone por parte de alguns fornecedores de dados pode não ser autorizada."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"O compositor vCard não foi inicializado correctamente"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Não foi possível abrir \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contactos"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Não foi possível abrir \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contactos"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Nomes dos contactos"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Adicionar pausa de 2 seg."</string>
     <string name="add_wait" msgid="3360818652790319634">"Adicionar espera"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Não foram encontradas aplicações para executar esta acção"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Memorizar esta escolha"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Desconhecido"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Sem dados"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Contas"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importar/Exportar"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importar/Exportar contactos"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Todos os outros contactos"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Todos os contactos"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Ao remover \"<xliff:g id="GROUP">%s</xliff:g>\" da sincronização, removerá também quaisquer contactos não agrupados."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Apenas telefone (não sincronizado)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Apenas telefone (não sincronizado)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Ligar para <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Ligar para residência"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Ligar para telemóvel"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chat utilizando ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chat utilizando Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Endereço"</string>
     <string name="postal_street" msgid="8133143961580058972">"Rua"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Apartado"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Vizinhança"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Região"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Código postal"</string>
     <string name="postal_country" msgid="7638264508416368690">"País"</string>
+    <string name="full_name" msgid="6602579550613988977">"Nome"</string>
     <string name="name_given" msgid="1687286314106019813">"Segundo nome"</string>
     <string name="name_family" msgid="3416695586119999058">"Segundo apelido"</string>
     <string name="name_prefix" msgid="59756378548779822">"Título académico ou profissional"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Fonética do segundo apelido"</string>
     <string name="account_type_format" msgid="718948015590343010">"Contacto de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"contacto <xliff:g id="SOURCE_0">%1$s</xliff:g> de <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Utilizar esta fotografia"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Não é possível editar as informações de contacto do <xliff:g id="SOURCE">%1$s</xliff:g> neste dispositivo."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Não há informações adicionais para este contacto"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Seleccionar fotografia da Galeria"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"A lista de contactos está a ser actualizada para reflectir a alteração do idioma."\n\n"Aguarde..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"A lista de contactos está a ser actualizada."\n\n"Aguarde..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Os contactos estão no processo de serem actualizados. "\n\n"O processo de actualização requer aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB de armazenamento de telefone interno."\n\n"Escolha uma das seguintes opções:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Os contactos estão em processo de actualização. "\n\n"O processo de actualização requer aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB de armazenamento interno no telemóvel."\n\n"Escolha uma das seguintes opções:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Desinstalar algumas aplicações"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Repetir actualização"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Resultados de pesquisa para: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"A pesquisar..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"A carregar …"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Mostrar seleccionados"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Mostrar tudo"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Seleccionar tudo"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Desmarcar tudo"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 destinatário seleccionado"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> destinatários seleccionados"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Contactos desconhecidos"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Nenhum contacto seleccionado."</string>
+    <string name="add_field" msgid="5257149039253569615">"Adicionar informações"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"através do <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> através do <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"editar"</string>
+    <string name="description_star" msgid="2605854427360036550">"favorito"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Editar contacto"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"não intercalado(s)"</item>
+    <item quantity="other" msgid="425683718017380845">"intercalado a partir de <xliff:g id="COUNT">%0$d</xliff:g> origens"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Eliminar"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Erro ao guardar"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Outro"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index d30621a..29e88a5 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Detalhes do contato"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Ver contato"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Editar contato"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Endereço de e-mail:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Tipo: "</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Criar contato"</string>
     <string name="searchHint" msgid="8482945356247760701">"Pesquisar contatos"</string>
     <string name="menu_search" msgid="9147752853603483719">"Pesquisa"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Novo contato"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonética"</string>
     <string name="label_notes" msgid="8337354953278341042">"Observações"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Chamada da internet"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Toque"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Nome e sobrenome"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Nome fonético"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Não há contatos visíveis"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"1 contato encontrado"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> contatos encontrados"</item>
+    <item quantity="one" msgid="5517063038754171134">"Um encontrado"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> encontrados"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Contato não encontrado"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Não encontrado"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 contato"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> contatos"</item>
+    <item quantity="one" msgid="4826918429708286628">"Um encontrado"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> encontrados"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Contatos"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoritos"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Contatos do cartão SIM"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Você não tem contatos para exibir. Se você acabou de adicionar uma conta, pode levar alguns minutos para sincronizar os contatos."</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Você não tem contatos para exibir."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Você não tem nenhum contato para exibir."\n\n"Para adicionar contatos, pressione "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Você não tem contatos para exibir (se acabou de adicionar uma conta, pode levar alguns minutos para sincronizar os contatos.)"\n\n"Para adicionar contatos, pressione"<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de exibição"</b></font>" para alterar quais contatos ficam visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Você não tem nenhum contato para exibir."\n\n"Para adicionar contatos, pressione "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Você não tem contatos para exibir (se acabou de adicionar uma conta, pode levar alguns minutos para sincronizar os contatos.)"\n\n"Para adicionar contatos, pressione"<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de exibição"</b></font>" para alterar quais contatos ficam visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Você não tem contatos para exibir."\n\n"Para adicionar contatos, pressione "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contatos do chip ou cartão SD"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Você não tem contatos para exibir (caso tenha acabado de adicionar uma conta, pode levar alguns minutos para sincronizar os contatos)."\n\n"Para adicionar contatos, pressione "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de exibição"</b></font>" para alterar quais contatos ficam visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contatos do chip ou cartão SD"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Você não tem contatos para exibir."\n\n"Para adicionar contatos, pressione "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contatos do chip ou cartão SD"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Você não tem contatos para exibir (se acabou de adicionar uma conta, pode levar alguns minutos para sincronizar os contatos)."\n\n"Para adicionar contatos, pressione "<font fgcolor="#ffffffff"><b>"Menu"</b></font>" e toque em:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Contas"</b></font>" para adicionar ou configurar uma conta com contatos que possam ser sincronizados com o telefone"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Opções de exibição"</b></font>" para alterar quais contatos ficam visíveis"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Novo contato"</b></font>" para criar um novo contato do início"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importar/Exportar"</b></font>" para importar contatos do chip ou cartão SD"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Você não tem nenhum favorito."\n\n"Para adicionar um contato à sua lista de favoritos:"\n\n"        "<li>"Toque na guia "<b>"Contatos"</b>\n</li>" "\n<li>"Toque no contato que deseja adicionar aos seus favoritos"\n</li>" "\n<li>"Toque na estrela ao lado do nome do contato"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Todos os contatos"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Com estrela"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Retornar chamada"</string>
     <string name="callAgain" msgid="3197312117049874778">"Chamar novamente"</string>
     <string name="returnCall" msgid="8171961914203617813">"Retornar chamada"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> min. <xliff:g id="SECONDS">%2$s</xliff:g> s"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min. <xliff:g id="SECONDS">%s</xliff:g> s"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Chamados frequentemente"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Adicionar contato"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Adicionar \"<xliff:g id="EMAIL">%s</xliff:g>\" aos contatos?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"foto do contato"</string>
     <string name="description_minus_button" msgid="387136707700230172">"menos"</string>
     <string name="description_plus_button" msgid="515164827856229880">"mais"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Armaz. compart. não disp."</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Nenhum cartão SD"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Nenhum armaz. compart. detect."</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Nenhum cartão SD detectado"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Nenhum cartão SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Nenhum cartão SD detectado"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Pesquisando vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importar do cartão SIM"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importar do armaz. comp."</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importar do cartão SD"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exportar p/ armaz. comp."</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exportar para cartão SD"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importar do cartão SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportar para cartão SD"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Compartilhar contatos visíveis"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importar um arquivo do vCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importar vários arquivos do vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importar todos os arquivos do vCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Procurando dados do vCard no armazenamento compartilhado"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Procurando dados do vCard no cartão SD"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Falha na verificação do armazenamento compartilhado"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Falha na verificação do cartão SD"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Falha na verificação do armazenamento compartilhado (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Falha na verificação do cartão SD (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Procurando dados do vCard no cartão SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Falha na verificação do cartão SD"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Falha na verificação do cartão SD (Motivo: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Erro E/S"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Memória insuficiente (o arquivo talvez seja muito grande)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Falha ao analisar o vCard por razão inesperada"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Falha ao analisar o vCard. Embora o formato pareça ser válido, a implementação atual não oferece suporte a ele."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Nenhum arquivo de vCard encontrado no armazenamento compartilhado"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Nenhum arquivo de vCard encontrado no cartão SD"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Nenhum arquivo de vCard encontrado no cartão SD"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Falha ao coletar metainformações dos arquivos de vCard fornecidos."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Falha na importação de um ou mais arquivos (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Erro desconhecido"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Selecionar arquivo do vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Lendo vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Lendo os arquivos do vCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"A leitura dos dados do vCard falhou"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contatos"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> arquivos"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Armazenando vCard(s) em cache no armazenamento temporário local"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"O importador está armazenando vCard(s) em cache no armazenamento temporário local. A importação real começará em breve."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Falha ao ler dados de vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"A leitura dos dados do vCard foi cancelada"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Importação de vCard concluída"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Importador de vCard iniciado."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"O importador de vCard importará o vCard depois de alguns instantes."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Confirmar exportação"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Tem certeza de que deseja exportar a sua lista de contatos para \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Falha ao exportar dados do contato"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Falha ao exportar dados dos contatos."\n"Motivo da falha: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Não há contatos exportáveis"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Muitos arquivos do vCard no armazenamento compartilhado"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Muitos arquivos do vCard no cartão SD"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Muitos arquivos do vCard no cartão SD"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"O nome de arquivo exigido é muito longo (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Exportador de vCard iniciado."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Exportação de vCard concluída"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Exportando dados do contato"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exportando dados do contato para \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Não foi possível iniciar o exportador: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Falha ao acessar informações do banco de dados"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Não há contatos exportáveis. Se você realmente tiver contatos no seu telefone, talvez a exportação não seja permitida por algum provedor de dados."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"O vCard não foi iniciado corretamente"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Não foi possível abrir \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> contatos"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Não foi possível abrir \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> de <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contatos"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Nomes dos seus contatos"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Adicionar pausa de 2 segundos"</string>
     <string name="add_wait" msgid="3360818652790319634">"Adicionar espera"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Nenhum aplicativo foi encontrado para executar esta ação."</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Lembrar desta escolha"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Desconhecido"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Nenhum dado"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Contas"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importar/Exportar"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importar/Exportar contatos"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Todos os outros contatos"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Todos os contatos"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"A remoção de \'<xliff:g id="GROUP">%s</xliff:g>\' da sincronização também removerá todos os contatos não agrupados da sincronização."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Somente telefone (não sincronizado)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Somente telefone (não sincronizado)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Chamar <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Chamar residência"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Chamar celular"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Bater papo usando o ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Bater papo usando o Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Bate-papo"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Endereço"</string>
     <string name="postal_street" msgid="8133143961580058972">"Rua"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Caixa postal"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Vizinhança"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Estado"</string>
     <string name="postal_postcode" msgid="572136414136673751">"CEP"</string>
     <string name="postal_country" msgid="7638264508416368690">"País"</string>
+    <string name="full_name" msgid="6602579550613988977">"Nome"</string>
     <string name="name_given" msgid="1687286314106019813">"Nome"</string>
     <string name="name_family" msgid="3416695586119999058">"Sobrenome"</string>
     <string name="name_prefix" msgid="59756378548779822">"Prefixo do nome"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Sobrenome fonético"</string>
     <string name="account_type_format" msgid="718948015590343010">"Contato de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"contato do <xliff:g id="SOURCE_0">%1$s</xliff:g> de <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Usar esta foto"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"As informações de contato de <xliff:g id="SOURCE">%1$s</xliff:g> não podem ser editadas neste aparelho."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Não há informações adicionais para este contato"</string>
@@ -378,15 +392,57 @@
     <string name="display_options_view_names_as" msgid="18022868169627979">"Visualizar nomes de contato como"</string>
     <string name="display_options_view_given_name_first" msgid="6968288511197363292">"Nome primeiro"</string>
     <string name="display_options_view_family_name_first" msgid="1447288164951453714">"Sobrenome primeiro"</string>
-    <string name="search_bar_hint" msgid="1012756309632856553">"Pesquisar contatos"</string>
+    <string name="search_bar_hint" msgid="1012756309632856553">"Pesquisar contatos "</string>
     <string name="search_for_all_contacts" msgid="6644963335787294131">"Pesquisar em todos os contatos"</string>
     <string name="take_photo" msgid="7496128293167402354">"Tirar foto"</string>
     <string name="pick_photo" msgid="448886509158039462">"Selecionar foto da Galeria"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"A lista de contatos está sendo atualizada para refletir a alteração do idioma."\n\n"Aguarde..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"A lista de contatos está sendo atualizada."\n\n"Aguarde..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Os contatos estão sendo atualizados no momento. "\n\n"O processo de atualização requer aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB de armazenamento interno do telefone."\n\n"Escolha uma das seguintes opções:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Os contatos estão sendo atualizados no momento. "\n\n"O processo de atualização requer aproximadamente <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB de armazenamento interno do telefone."\n\n"Escolha uma das seguintes opções:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Desinstalar alguns aplicativos"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Tentar atualizar novamente"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Resultados da pesquisa para: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Pesquisando..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Carregando…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Mostrar selecionados"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Mostrar todos"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Selecionar todos"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Desmarcar todos"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 destinatário selecionado"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> destinatários selecionados"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Contatos selecionados"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Nenhum contato selecionado."</string>
+    <string name="add_field" msgid="5257149039253569615">"Adicionar informações"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"por meio de <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"editar"</string>
+    <string name="description_star" msgid="2605854427360036550">"favorito"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Editar contato "</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"não mesclado"</item>
+    <item quantity="other" msgid="425683718017380845">"mesclado a partir de <xliff:g id="COUNT">%0$d</xliff:g> origens"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Excluir"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Erro ao salvar"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Outros"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-rm/strings.xml b/res/values-rm/strings.xml
new file mode 100644
index 0000000..15abeeb
--- /dev/null
+++ b/res/values-rm/strings.xml
@@ -0,0 +1,483 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--  Copyright (C) 2006 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.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- no translation found for sharedUserLabel (7965035505237135241) -->
+    <skip />
+    <string name="contactsList" msgid="8661624236494819731">"Contacts"</string>
+    <string name="launcherDialer" msgid="8636288196618486553">"Telefon"</string>
+    <string name="shortcutContact" msgid="749243779392912958">"Contact"</string>
+    <string name="shortcutDialContact" msgid="746622101599186779">"Cumposiziun directa"</string>
+    <string name="shortcutMessageContact" msgid="2460337253595976198">"Messadi direct"</string>
+    <string name="shortcutActivityTitle" msgid="6642877210643565436">"Tscherner in contact per la scursanida"</string>
+    <string name="callShortcutActivityTitle" msgid="6065749861423648991">"Tscherner il numer per telefonar"</string>
+    <string name="messageShortcutActivityTitle" msgid="3084542316620335911">"Tscherner il numer per il messadi"</string>
+    <string name="starredList" msgid="4817256136413959463">"Cun staila"</string>
+    <string name="frequentList" msgid="7154768136473953056">"Contacts frequents"</string>
+    <string name="strequentList" msgid="5640192862059373511">"Favurits"</string>
+    <string name="viewContactTitle" msgid="7989394521836644384">"Detagls dal contact"</string>
+    <string name="viewContactDesription" msgid="214186610887547860">"Mussar il contact"</string>
+    <string name="editContactDescription" msgid="2947202828256214947">"Modifitgar il contact"</string>
+    <!-- no translation found for edit_email_caption (2401084399676154272) -->
+    <skip />
+    <!-- no translation found for edit_email_type_caption (66331218163770698) -->
+    <skip />
+    <string name="insertContactDescription" msgid="4709878105452681987">"Crear in contact"</string>
+    <string name="searchHint" msgid="8482945356247760701">"Retschertgar ils contacts"</string>
+    <string name="menu_search" msgid="9147752853603483719">"Tschertgar"</string>
+    <string name="menu_newContact" msgid="1209922412763274638">"Nov contact"</string>
+    <string name="menu_viewContact" msgid="2795575601596468581">"Mussar il contact"</string>
+    <string name="menu_callNumber" msgid="5142851348489387516">"Telefonar a(d) <xliff:g id="NAME">%s</xliff:g>"</string>
+    <string name="menu_addStar" msgid="2908478235715404876">"Agiuntar als favurits"</string>
+    <string name="menu_removeStar" msgid="5844227078364227030">"Allontanar dals favurits"</string>
+    <string name="menu_editContact" msgid="3452858480713561396">"Modifitgar il contact"</string>
+    <string name="menu_deleteContact" msgid="1916555454274101750">"Stizzar il contact"</string>
+    <string name="menu_call" msgid="3992595586042260618">"Telefonar al contact"</string>
+    <string name="menu_sendSMS" msgid="5535886767547006515">"Trametter in SMS al contact"</string>
+    <string name="menu_sendEmail" msgid="7293508859242926187">"Trametter in e-mail"</string>
+    <string name="menu_viewAddress" msgid="1814744325763202024">"Adressa sin la charta"</string>
+    <string name="menu_makeDefaultNumber" msgid="4838759253316649534">"Numer da telefon da standard"</string>
+    <string name="menu_makeDefaultEmail" msgid="2599044610375789994">"E-mail predefinì"</string>
+    <string name="menu_splitAggregate" msgid="8368636463748691868">"Divider"</string>
+    <string name="contactsSplitMessage" msgid="5253490235863170269">"Contacts dividids"</string>
+    <string name="splitConfirmation_title" msgid="6716467920283502570">"Divider il contact"</string>
+    <string name="splitConfirmation" msgid="1150797297503944823">"Vulais Vus propi divider quest contact en plirs contacts (in per mintga detagl da contact)?"</string>
+    <string name="menu_joinAggregate" msgid="5027981918265667970">"Unir"</string>
+    <string name="titleJoinContactDataWith" msgid="7684875775798635354">"Unir contacts"</string>
+    <string name="blurbJoinContactDataWith" msgid="995870557595050304">"Tschernì il contact che Vus vulais associar cun <xliff:g id="NAME">%s</xliff:g>."</string>
+    <string name="showAllContactsJoinItem" msgid="2189695051430392383">"Mussar tut ils contacts"</string>
+    <string name="separatorJoinAggregateSuggestions" msgid="2831414448851313345">"Contacts proponids"</string>
+    <string name="separatorJoinAggregateAll" msgid="7939932265026181043">"Tut ils contacts"</string>
+    <string name="contactsJoinedMessage" msgid="7208148163607047389">"Contacts unids"</string>
+    <string name="menu_contactOptions" msgid="1957061455705020617">"Opziuns"</string>
+    <string name="contactOptionsTitle" msgid="8259347644090700915">"Opziuns"</string>
+    <string name="deleteConfirmation_title" msgid="6394309508930335204">"Stizzar"</string>
+    <string name="readOnlyContactWarning" msgid="1390849295342594265">"\"Impussibel da stizzar contacts da contos mo per lectura, ma Vus als pudais zuppentar en la glista da contacts.\""</string>
+    <string name="readOnlyContactDeleteConfirmation" msgid="2137170726670196909">"\"Quest contact cuntegna infurmaziuns da plirs contos. Infurmaziuns da contos mo per lectura vegnan betg stizzadas, mabain zuppentadas en Vossas glistas da contacts.\""</string>
+    <string name="multipleContactDeleteConfirmation" msgid="938900978442960800">"\"Sche Vus stizzais quest contact, vegnan infurmaziuns en plirs contos stizzads.\""</string>
+    <string name="deleteConfirmation" msgid="811706994761610640">"Quest contact vegn stizzà."</string>
+    <string name="menu_done" msgid="796017761764190697">"Finì"</string>
+    <string name="menu_doNotSave" msgid="2174577548513895144">"Annullar"</string>
+    <string name="editContact_title_edit" msgid="7678695190666836093">"Modifitgar il contact"</string>
+    <string name="editContact_title_insert" msgid="9125600232291405757">"Nov contact"</string>
+    <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetic"</string>
+    <string name="label_notes" msgid="8337354953278341042">"Notizias"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
+    <string name="label_ringtone" msgid="8833166825330686244">"Tun da scalin"</string>
+    <string name="ghostData_name" msgid="6490954238641157585">"Prenum e num"</string>
+    <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Num fonetic"</string>
+    <string name="ghostData_company" msgid="5414421120553765775">"Interpresa"</string>
+    <string name="ghostData_title" msgid="7496735200318496110">"Titel"</string>
+    <string name="invalidContactMessage" msgid="5816991830260044593">"Quest contact n\'exista betg."</string>
+    <string name="pickerNewContactHeader" msgid="7750705279843568147">"Crear in nov contact"</string>
+    <string name="selectLabel" msgid="4255424123394910733">"Tscherni ina etichetta"</string>
+    <string name="phoneLabelsGroup" msgid="6468091477851199285">"Telefon"</string>
+    <string name="emailLabelsGroup" msgid="8389931313045344406">"E-mail"</string>
+    <string name="imLabelsGroup" msgid="3898238486262614027">"Chat"</string>
+    <string name="postalLabelsGroup" msgid="1618078212734693682">"Adressa postala"</string>
+  <string-array name="otherLabels">
+    <item msgid="8287841928119937597">"Firma/Organisaziun"</item>
+    <item msgid="7196592230748086755">"Notizia"</item>
+  </string-array>
+    <string name="photoPickerNotFoundText" msgid="431331662154342581">"Nagin maletg disponibel sin il telefon."</string>
+    <string name="attachToContact" msgid="8820530304406066714">"Simbol da contact"</string>
+    <string name="customLabelPickerTitle" msgid="1081475101983255212">"Num da l\'etichetta persunalisada"</string>
+    <string name="menu_displayGroup" msgid="5655505437727616553">"Opziuns da vista"</string>
+    <string name="displayGroups" msgid="2278964020773993336">"Opziuns da vista"</string>
+    <string name="send_to_voicemail_checkbox" msgid="9001686764070676353">"Renviar ils cloms directamain sin la mailbox"</string>
+    <string name="default_ringtone" msgid="9099988849649827972">"Standard"</string>
+    <string name="changePicture" msgid="2943329047610967714">"Midar il simbol"</string>
+    <string name="removePicture" msgid="3041230993155966350">"Allontanar il simbol"</string>
+    <string name="noContacts" msgid="8579310973261953559">"Nagins contacts"</string>
+    <string name="noMatchingContacts" msgid="4266283206853990471">"Betg chattà in contact correspundent."</string>
+    <string name="noContactsWithPhoneNumbers" msgid="1605457050218824269">"Nagin contact dispona d\'in numer da telefon."</string>
+    <string name="showFilterPhones" msgid="4184858075465653970">"Mo contacts cun telefon"</string>
+    <string name="showFilterPhonesDescrip" msgid="6644443248815191067">"Mo mussar contacts cun numer da telefon"</string>
+    <string name="headerContactGroups" msgid="2426134991932503843">"Tscherner ils contacts che duain vegnir mussads"</string>
+  <plurals name="groupDescrip">
+    <item quantity="other" msgid="3507881585720628389">"<xliff:g id="COUNT">%0$d</xliff:g> contacts"</item>
+  </plurals>
+  <plurals name="groupDescripPhones">
+    <item quantity="other" msgid="3816047547470490208">"\"<xliff:g id="COUNT_0">%1$d</xliff:g> contacts, <xliff:g id="COUNTWITHPHONES">%2$d</xliff:g> cun numer da telefon\""</item>
+  </plurals>
+    <string name="savingContact" msgid="4075751076741924939">"Il contact vegn memorisà…"</string>
+    <string name="savingDisplayGroups" msgid="2133152192716475939">"Las opziuns da vista vegnan memorisadas…"</string>
+    <string name="contactSavedToast" msgid="7152589189385441091">"Contact memorisà."</string>
+    <string name="contactSavedErrorToast" msgid="9189098776225004666">"Errur: impussibel da memorisar las modificaziuns dal contact"</string>
+  <plurals name="listTotalPhoneContacts">
+    <item quantity="one" msgid="8721111084815668845">"1 contact cun numer da telefon vegn mussà"</item>
+    <item quantity="other" msgid="6133262880804110289">"<xliff:g id="COUNT">%d</xliff:g> contacts cun numer da telefon vegnan mussads"</item>
+  </plurals>
+    <string name="listTotalPhoneContactsZero" msgid="2756295259674938869">"Nagins contacts visibels cun numer da telefon"</string>
+  <plurals name="listTotalAllContacts">
+    <item quantity="one" msgid="1096068709488455155">"1 contact vegn mussà"</item>
+    <item quantity="other" msgid="2865867557378939630">"<xliff:g id="COUNT">%d</xliff:g> contacts vegnan mussads."</item>
+  </plurals>
+    <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Nagins contacts visibels"</string>
+    <!-- no translation found for listFoundAllContacts:one (5517063038754171134) -->
+    <!-- no translation found for listFoundAllContacts:other (3852668542926965042) -->
+    <!-- no translation found for listFoundAllContactsZero (777952841930508289) -->
+    <skip />
+    <!-- no translation found for searchFoundContacts:one (4826918429708286628) -->
+    <!-- no translation found for searchFoundContacts:other (7988132539476575389) -->
+    <string name="contactsIconLabel" msgid="7666609097606552806">"Contacts"</string>
+    <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favurits"</string>
+    <string name="dialerIconLabel" msgid="6500826552823403796">"Telefon"</string>
+    <string name="recentCallsIconLabel" msgid="1419116422359067949">"Cloms"</string>
+    <string name="liveFolderAll" msgid="4789010460767506206">"Tut ils contacts"</string>
+    <string name="liveFolderFavorites" msgid="3100957542927222282">"Contacts marcads"</string>
+    <string name="liveFolderPhone" msgid="3739376066610926780">"Contacts cun numers da telefon"</string>
+    <string name="menu_sendTextMessage" msgid="6937343460284499306">"Trametter in SMS"</string>
+    <string name="recentCalls_callNumber" msgid="1756372533999226126">"Telefonar a(d) <xliff:g id="NAME">%s</xliff:g>"</string>
+    <string name="recentCalls_editNumberBeforeCall" msgid="7756171675833267857">"Modifitgar il numer avant che telefonar"</string>
+    <string name="recentCalls_addToContact" msgid="1429899535546487008">"Agiuntar als contacts"</string>
+    <string name="recentCalls_removeFromRecentList" msgid="401662244636511330">"Allontanar da la glista da cloms"</string>
+    <string name="recentCalls_deleteAll" msgid="6352364392762163704">"Stizzar la glista da cloms"</string>
+    <string name="recentCalls_empty" msgid="247053222448663107">"La glista da cloms e vida"</string>
+    <string name="clearCallLogConfirmation_title" msgid="718072843006222703">"Stizzar il protocol da cloms"</string>
+    <string name="clearCallLogConfirmation" msgid="7625927669136267636">"Vulais Vus propi stizzar il protocol da cloms?"</string>
+    <string name="imei" msgid="3045126336951684285">"IMEI"</string>
+    <string name="meid" msgid="6210568493746275750">"MEID"</string>
+    <string name="voicemail" msgid="3851469869202611441">"Mailbox"</string>
+    <string name="unknown" msgid="740067747858270469">"Nunenconuschent"</string>
+    <string name="private_num" msgid="6374339738119166953">"Numer privat"</string>
+    <string name="payphone" msgid="4864313342828942922">"Cabina da telefon"</string>
+    <string name="dialerKeyboardHintText" msgid="5401660096579787344">"Utilisai la tastatura per cumponer il numer"</string>
+    <string name="dialerDialpadHintText" msgid="5824490365898349041">"Cumponer il numer"</string>
+    <string name="simContacts_emptyLoading" msgid="6700035985448642408">"Chargiar da la carta SIM…"</string>
+    <string name="simContacts_title" msgid="27341688347689769">"Contacts sin la carta SIM"</string>
+    <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Vus n\'avais nagins contacts per mussar. (I po cuzzar in pèr minutas per sincronisar ils contacts en cas che Vus avais gist agiuntà in conto.)"</string>
+    <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Vus n\'avais nagins contacts per mussar."</string>
+    <!-- no translation found for noContactsHelpText (7633826236417884130) -->
+    <skip />
+    <!-- no translation found for noContactsHelpTextWithSync (3017521127042216243) -->
+    <skip />
+    <!-- no translation found for noContactsNoSimHelpText (467658807711582876) -->
+    <skip />
+    <!-- no translation found for noContactsNoSimHelpTextWithSync (9040060730467973050) -->
+    <skip />
+    <string name="noFavoritesHelpText" msgid="3744655776704833277">"Vus n\'avais nagins favurits."\n\n"Per agiuntar in contact a la glista da favurits:"\n\n" "<li>"Smatgai sin il register "<b>"Contacts"</b>"."\n</li>" "\n<li>"Smatgai sin il contact che duai vegnir agiuntà a Voss favurits."\n</li>" "\n<li>"Smatgai sin la staila dal contact correspundent."\n</li></string>
+    <string name="liveFolder_all_label" msgid="5961411940473276616">"Tut ils contacts"</string>
+    <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Cun staila"</string>
+    <string name="liveFolder_phones_label" msgid="1709786878793436245">"Numers"</string>
+    <string name="dialer_useDtmfDialpad" msgid="1707548397435075040">"Utilisar la tastatura dal telefon"</string>
+    <string name="dialer_returnToInCallScreen" msgid="3719386377550913067">"Enavos al clom actual"</string>
+    <string name="dialer_addAnotherCall" msgid="4205688819890074468">"Agiuntar in clom"</string>
+    <string name="callDetailTitle" msgid="5340227785196217938">"Detagls dal clom"</string>
+    <string name="toast_call_detail_error" msgid="7200975244804730096">"Impussibel da leger ils detagls dal clom dumandà."</string>
+    <string name="type_incoming" msgid="6502076603836088532">"Clom entrant"</string>
+    <string name="type_outgoing" msgid="343108709599392641">"Clom sortint"</string>
+    <string name="type_missed" msgid="2720502601640509542">"Clom manchentà"</string>
+    <string name="actionIncomingCall" msgid="6028930669817038600">"Cloms entrants"</string>
+    <string name="callBack" msgid="5498224409038809224">"Telefonar enavos"</string>
+    <string name="callAgain" msgid="3197312117049874778">"Telefonar anc ina giada"</string>
+    <string name="returnCall" msgid="8171961914203617813">"Telefonar enavos"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> min <xliff:g id="SECONDS">%s</xliff:g> sec"</string>
+    <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Contactà savens"</string>
+    <string name="add_contact_dlg_title" msgid="2896685845822146494">"Agiuntar in contact"</string>
+    <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Agiuntar «<xliff:g id="EMAIL">%s</xliff:g>» als contacts?"</string>
+    <string name="all_tab_label" msgid="4003124364397916826">"Tuts"</string>
+    <string name="description_image_button_one" msgid="1740638037139856139">"in"</string>
+    <string name="description_image_button_two" msgid="5882638439003731308">"dus"</string>
+    <string name="description_image_button_three" msgid="8709731759376015180">"trais"</string>
+    <string name="description_image_button_four" msgid="3530239685642246130">"quatter"</string>
+    <string name="description_image_button_five" msgid="1182465427501188413">"tschintg"</string>
+    <string name="description_image_button_six" msgid="2093656269261415475">"sis"</string>
+    <string name="description_image_button_seven" msgid="2450357020447676481">"set"</string>
+    <string name="description_image_button_eight" msgid="6969435115163287801">"otg"</string>
+    <string name="description_image_button_nine" msgid="7857248695662558323">"nov"</string>
+    <string name="description_image_button_star" msgid="3365919907520767866">"staila"</string>
+    <string name="description_image_button_zero" msgid="4133108949401820710">"nulla"</string>
+    <string name="description_image_button_pound" msgid="3039765597595889230">"glivra"</string>
+    <string name="description_voicemail_button" msgid="3402506823655455591">"Mailbox"</string>
+    <string name="description_dial_button" msgid="1274091017188142646">"cumponer"</string>
+    <string name="description_delete_button" msgid="6263102114033407382">"tasta da return"</string>
+    <string name="description_digits_edittext" msgid="8760207516497016437">"numer da cumponer"</string>
+    <string name="description_contact_photo" msgid="3387458082667894062">"foto dal contact"</string>
+    <string name="description_minus_button" msgid="387136707700230172">"minus"</string>
+    <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Nagina carta SD"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Betg chattà ina carta SD."</string>
+    <string name="searching_vcard_title" msgid="4970508055399376813">"Tschertgar datas vCard"</string>
+    <string name="import_from_sim" msgid="3859272228033941659">"Importar da la carta SIM"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importar da la carta SD"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportar sin la carta SD"</string>
+    <string name="share_visible_contacts" msgid="890150378880783797">"Cundivider ils contacts visibels"</string>
+    <string name="import_one_vcard_string" msgid="9059163467020328433">"Importar ina datoteca vCard"</string>
+    <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importar pliras datotecas vCard"</string>
+    <string name="import_all_vcard_string" msgid="5518136113853448474">"Importar tut las datotecas vCard"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Tschertgar datas vCard sin la carta SD"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Errur cun leger la carta SD"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Errur cun leger la carta SD. Il motiv: «<xliff:g id="FAIL_REASON">%s</xliff:g>»"</string>
+    <string name="fail_reason_io_error" msgid="5922864781066136340">"Errur I/O"</string>
+    <!-- no translation found for fail_reason_low_memory_during_import (7514918659342886381) -->
+    <skip />
+    <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"L\'analisa da las datas vCard n\'è betg reussida per motiv nunenconuschent."</string>
+    <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"\"Durant l\'analisa da las datas vCard è cumparida ina errur. Schebain che la vCard para dad esser d\'in format valid, na la sustegna l\'implementaziun actuala betg.\""</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Chattà nagina datoteca vCard sin la carta SD"</string>
+    <!-- no translation found for fail_reason_failed_to_collect_vcard_meta_info (4154492282316067754) -->
+    <skip />
+    <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Errur cun importar ina u pliras datotecas (%s)."</string>
+    <string name="fail_reason_unknown" msgid="999034019513096768">"Errur nunenconuschenta"</string>
+    <string name="select_vcard_title" msgid="3968948173786172468">"Tscherner ina datoteca vCard"</string>
+    <!-- no translation found for caching_vcard_title (5009556022082659780) -->
+    <skip />
+    <!-- no translation found for caching_vcard_message (2380844718093378900) -->
+    <skip />
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <!-- no translation found for reading_vcard_failed_title (2162610359561887043) -->
+    <skip />
+    <!-- no translation found for reading_vcard_canceled_title (1770608329958463131) -->
+    <skip />
+    <!-- no translation found for importing_vcard_finished_title (3213257229785702182) -->
+    <skip />
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <!-- no translation found for vcard_importer_start_message (5520549352987753320) -->
+    <skip />
+    <!-- no translation found for vcard_importer_will_start_message (2055145402481822160) -->
+    <skip />
+    <!-- no translation found for percentage (34897865327092209) -->
+    <skip />
+    <string name="confirm_export_title" msgid="7648747763127442983">"Confermar l\'export"</string>
+    <string name="confirm_export_message" msgid="3875683519257829750">"Vulais Vus propi exportar la glista da contacts en «<xliff:g id="VCARD_FILENAME">%s</xliff:g>»?"</string>
+    <string name="exporting_contact_failed_title" msgid="585823094820602526">"Errur cun exportar las datas da contact"</string>
+    <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Errur cun exportar las datas da contact. "\n"Il motiv: «<xliff:g id="FAIL_REASON">%s</xliff:g>»"</string>
+    <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Nagin contact exportabel"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"La carta SD cuntegna memia bleras datotecas vCard"</string>
+    <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Il num da datoteca necessari è memia lung («<xliff:g id="FILENAME">%s</xliff:g>»)"</string>
+    <!-- no translation found for vcard_exporter_start_message (6497218576519292369) -->
+    <skip />
+    <!-- no translation found for exporting_vcard_finished_title (1268425436375550862) -->
+    <skip />
+    <string name="exporting_contact_list_title" msgid="9072240631534457415">"Datas da contact vegnan exportadas."</string>
+    <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exportaziun da las datas da contact en «<xliff:g id="FILE_NAME">%s</xliff:g>»"</string>
+    <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Errur cun inizialisar il program d\'export: «<xliff:g id="EXACT_REASON">%s</xliff:g>»"</string>
+    <string name="fail_reason_error_occurred_during_export" msgid="2151165129433831202">"Errur cun exportar: «<xliff:g id="EXACT_REASON">%s</xliff:g>»"</string>
+    <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Impussibel dad obtegnair las infurmaziuns concernent la banca da datas"</string>
+    <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"\"Nagin contact exportabel è avant maun. Sche Vus avais memorisà contacts sin Voss telefonin, ha in purschider da datas eventualmain protegì els cunter l\'export dal telefon.\""</string>
+    <string name="composer_not_initialized" msgid="8041534450748388843">"Il program per crear la vCard n\'è betg inizialisà correctamain."</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Impussibel dad avrir «<xliff:g id="FILE_NAME">%s</xliff:g>»: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> da <xliff:g id="TOTAL_NUMBER">%s</xliff:g> contacts"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
+    <string name="search_settings_description" msgid="2675223022992445813">"Num da Voss contacts"</string>
+    <string name="add_2sec_pause" msgid="9214012315201040129">"Agiuntar ina pausa da 2 secundas"</string>
+    <string name="add_wait" msgid="3360818652790319634">"Agiuntar Spetgar"</string>
+    <string name="call_disambig_title" msgid="1911302597959335178">"Telefonar cun"</string>
+    <string name="sms_disambig_title" msgid="4675399294513152364">"Trametter in SMS sur"</string>
+    <string name="make_primary" msgid="5829291915305113983">"Memorisar questa tscherna"</string>
+    <string name="quickcontact_missing_app" msgid="4600366393134289038">"Betg chattà in\'applicaziun per elavurar questa acziun"</string>
+    <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Memorisar questa tscherna"</string>
+    <string name="quickcontact_missing_name" msgid="5590266114306996632">"Nunenconuschent"</string>
+    <!-- no translation found for quickcontact_no_data (2098000859125253675) -->
+    <skip />
+    <string name="menu_accounts" msgid="8499114602017077970">"Contos"</string>
+    <string name="menu_import_export" msgid="3765725645491577190">"Importar/exportar"</string>
+    <string name="dialog_import_export" msgid="4771877268244096596">"Importar/exportar ils contacts"</string>
+    <string name="menu_share" msgid="943789700636542260">"Cundivider"</string>
+    <string name="share_via" msgid="563121028023030093">"Cundivider in contact sur"</string>
+    <string name="share_error" msgid="4374508848981697170">"Quest contact na po betg vegnir cundividì."</string>
+    <string name="nameLabelsGroup" msgid="2034640839640477827">"Num"</string>
+    <string name="nicknameLabelsGroup" msgid="2891682101053358010">"Alias"</string>
+    <string name="organizationLabelsGroup" msgid="2478611760751832035">"Firma/Organisaziun"</string>
+    <string name="websiteLabelsGroup" msgid="4202998982804009261">"Website"</string>
+    <string name="eventLabelsGroup" msgid="8069912895912714412">"Termin"</string>
+    <string name="type_short_home" msgid="7770424864090605384">"P"</string>
+    <string name="type_short_mobile" msgid="1655473281466676216">"M"</string>
+    <string name="type_short_work" msgid="4925330752504537861">"F"</string>
+    <string name="type_short_pager" msgid="2613818970827594238">"P"</string>
+    <string name="type_short_other" msgid="5669407180177236769">"A"</string>
+    <string name="edit_read_only" msgid="8158629550655830981">"Quest contact è mo per lectura."</string>
+    <string name="edit_secondary_collapse" msgid="5371618426594477103">"Dapli"</string>
+    <string name="dialog_primary_name" msgid="5521591005692614833">"Num principal"</string>
+    <string name="dialog_new_contact_account" msgid="9044704073286262197">"Crear in contact sut il conto"</string>
+    <string name="menu_sync_remove" msgid="3266725887008450161">"Allontanar la gruppa da sincronisaziun"</string>
+    <string name="dialog_sync_add" msgid="8267045393119375803">"Agiuntar ina gruppa da sincronisaziun"</string>
+    <string name="display_more_groups" msgid="2682547080423434170">"Ulteriuras gruppas…"</string>
+    <string name="display_ungrouped" msgid="4602580795576261158">"Tut ils ulteriurs contacts"</string>
+    <string name="display_all_contacts" msgid="6846131371214707956">"Tut ils contacts"</string>
+    <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"\"Sche «<xliff:g id="GROUP">%s</xliff:g>» vegn allontanà da la sincronisaziun, vegnan era tut ils contacts betg gruppads allontanads da la sincronisaziun.\""</string>
+    <string name="account_phone" msgid="4025734638492419713">"Mo telefon (senza sincronisaziun)"</string>
+    <string name="call_custom" msgid="7756571794763171802">"Telefonar a(d) <xliff:g id="CUSTOM">%s</xliff:g>"</string>
+    <string name="call_home" msgid="1990519474420545392">"Telefonar (privat)"</string>
+    <string name="call_mobile" msgid="7502236805487609178">"Clom (telefonin)"</string>
+    <string name="call_work" msgid="5328785911463744028">"Clom (fatschenta)"</string>
+    <string name="call_fax_work" msgid="7467763592359059243">"\"Telefonar (fax, fatschenta)\""</string>
+    <string name="call_fax_home" msgid="8342175628887571876">"Cumponer in fax (privat)"</string>
+    <string name="call_pager" msgid="9003902812293983281">"Telefonar (pager)"</string>
+    <string name="call_other" msgid="8563753966926932052">"Telefonar"</string>
+    <string name="call_callback" msgid="1910165691349426858">"Telefonar al numer da reclom"</string>
+    <string name="call_car" msgid="3280537320306436445">"Telefonar a l\'auto"</string>
+    <string name="call_company_main" msgid="6105120947138711257">"Telefonar ad ina firma (principal)"</string>
+    <string name="call_isdn" msgid="1541590690193403411">"Telefonar ad in numer ISDN"</string>
+    <string name="call_main" msgid="6082900571803441339">"Telefonar sin il numer principal"</string>
+    <string name="call_other_fax" msgid="5745314124619636674">"Telefonar a quest numer da fax"</string>
+    <string name="call_radio" msgid="8296755876398357063">"Telefon (mobil)"</string>
+    <string name="call_telex" msgid="2223170774548648114">"Telefonar ad in numer telex"</string>
+    <string name="call_tty_tdd" msgid="8951266948204379604">"Telefonar TTY/TTD"</string>
+    <string name="call_work_mobile" msgid="8707874281430105394">"Telefonar al numer da telefonin (fatschenta)"</string>
+    <string name="call_work_pager" msgid="3419348514157949008">"Telefonar ad in pager (fatschenta)"</string>
+    <string name="call_assistant" msgid="2141641383068514308">"Telefonar a <xliff:g id="ASSISTANT">%s</xliff:g>"</string>
+    <string name="call_mms" msgid="6274041545876221437">"Clom (MMS)"</string>
+    <string name="sms_custom" msgid="5932736853732191825">"SMS a <xliff:g id="CUSTOM">%s</xliff:g>"</string>
+    <string name="sms_home" msgid="7524332261493162995">"Text (privat)"</string>
+    <string name="sms_mobile" msgid="5200107250451030769">"Trametter in SMS al telefonin"</string>
+    <string name="sms_work" msgid="2269624156655267740">"Trametter in SMS (fatschenta)"</string>
+    <string name="sms_fax_work" msgid="8028189067816907075">"Trametter in SMS al fax (fatschenta)"</string>
+    <string name="sms_fax_home" msgid="9204042076306809634">"SMS al fax (privat)"</string>
+    <string name="sms_pager" msgid="7730404569637015192">"Trametter in SMS ad in pager"</string>
+    <string name="sms_other" msgid="806127844607642331">"Trametter in SMS"</string>
+    <string name="sms_callback" msgid="5004824430094288752">"Trametter in SMS ad in numer da reclom"</string>
+    <string name="sms_car" msgid="7444227058437359641">"Text (auto)"</string>
+    <string name="sms_company_main" msgid="118970873419678087">"Text (numer principal da la firma)"</string>
+    <string name="sms_isdn" msgid="8153785037515047845">"SMS ad in numer ISDN"</string>
+    <string name="sms_main" msgid="8621625784504541679">"SMS al numer principal"</string>
+    <string name="sms_other_fax" msgid="3888842199855843152">"Trametter in SMS ad in fax"</string>
+    <string name="sms_radio" msgid="3329166673433967820">"SMS a mobil"</string>
+    <string name="sms_telex" msgid="9034802430065267848">"SMS a telex"</string>
+    <string name="sms_tty_tdd" msgid="6782284969132531532">"Trametter in SMS ad in numer TTY/TDD"</string>
+    <string name="sms_work_mobile" msgid="2459939960512702560">"SMS al numer da telefonin (fatschenta)"</string>
+    <string name="sms_work_pager" msgid="5566924423316960597">"SMS ad in pager (fatschenta)"</string>
+    <string name="sms_assistant" msgid="2773424339923116234">"Trametter in messadi da text a <xliff:g id="ASSISTANT">%s</xliff:g>"</string>
+    <string name="sms_mms" msgid="4069352461380762677">"Trametter in MMS"</string>
+    <string name="email_home" msgid="8573740658148184279">"E-mail (privat)"</string>
+    <string name="email_mobile" msgid="2042889209787989814">"E-mail (telefonin)"</string>
+    <string name="email_work" msgid="2807430017302722689">"E-mail (fatschenta)"</string>
+    <string name="email_other" msgid="3454004077967657109">"Trametter in e-mail"</string>
+    <string name="email_custom" msgid="7548003991586214105">"E-mail a <xliff:g id="CUSTOM">%s</xliff:g>"</string>
+    <string name="email" msgid="5668400997660065897">"E-mail"</string>
+    <string name="map_home" msgid="1243547733423343982">"Mussar l\'adressa da chasa"</string>
+    <string name="map_work" msgid="1360474076921878088">"Mussar l\'adressa da fatschenta"</string>
+    <string name="map_other" msgid="3817820803587012641">"Mussar l\'adressa"</string>
+    <string name="map_custom" msgid="6184363799976265281">"Mussar adressa <xliff:g id="CUSTOM">%s</xliff:g>"</string>
+    <string name="chat_aim" msgid="2588492205291249142">"Chat sur AIM"</string>
+    <string name="chat_msn" msgid="8041633440091073484">"Chat sur Windows Live"</string>
+    <string name="chat_yahoo" msgid="6629211142719943666">"Chat sur Yahoo"</string>
+    <string name="chat_skype" msgid="1210045020427480566">"Chat sur Skype"</string>
+    <string name="chat_qq" msgid="4294637812847719693">"Chat sur QQ"</string>
+    <string name="chat_gtalk" msgid="981575737258117697">"Chat sur Google Talk"</string>
+    <string name="chat_icq" msgid="8438405386153745775">"Chat sur ICQ"</string>
+    <string name="chat_jabber" msgid="7561444230307829609">"Chat sur Jabber"</string>
+    <string name="chat" msgid="9025361898797412245">"Chat"</string>
+    <!-- no translation found for postal_address (8765560217149624536) -->
+    <skip />
+    <string name="postal_street" msgid="8133143961580058972">"Via"</string>
+    <string name="postal_pobox" msgid="4431938829180269821">"Chascha postala"</string>
+    <string name="postal_neighborhood" msgid="1450783874558956739">"Vischinanza"</string>
+    <string name="postal_city" msgid="6597491300084895548">"Citad"</string>
+    <string name="postal_region" msgid="6045263193478437672">"Chantun"</string>
+    <string name="postal_postcode" msgid="572136414136673751">"Numer postal"</string>
+    <string name="postal_country" msgid="7638264508416368690">"Pajais"</string>
+    <!-- no translation found for full_name (6602579550613988977) -->
+    <skip />
+    <string name="name_given" msgid="1687286314106019813">"Prenum"</string>
+    <string name="name_family" msgid="3416695586119999058">"Num da famiglia"</string>
+    <string name="name_prefix" msgid="59756378548779822">"Prefix dal num"</string>
+    <string name="name_middle" msgid="8467433655992690326">"Segund prenum"</string>
+    <string name="name_suffix" msgid="3855278445375651441">"Suffix dal num"</string>
+    <string name="name_phonetic_given" msgid="6853570431394449191">"Prenum fonetic"</string>
+    <string name="name_phonetic_middle" msgid="8643721493320405200">"Segund prenum fonetic"</string>
+    <string name="name_phonetic_family" msgid="462095502140180305">"Num da famiglia fonetic"</string>
+    <string name="account_type_format" msgid="718948015590343010">"Contact <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="from_account_format" msgid="687567483928582084">"da <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <!-- no translation found for account_type_and_name (2876220035411512934) -->
+    <skip />
+    <string name="use_photo_as_primary" msgid="8807110122951157246">"Utilisar quest foto"</string>
+    <string name="contact_read_only" msgid="1203216914575723978">"Vus na pudais betg modifitgar las infurmaziuns dal contact <xliff:g id="SOURCE">%1$s</xliff:g> sin quest apparat."</string>
+    <string name="no_contact_details" msgid="6754415338321837001">"Naginas infurmaziuns supplementaras per quest contact"</string>
+    <string name="display_options_sort_list_by" msgid="6080091755852211076">"Zavrar la glista tenor"</string>
+    <string name="display_options_sort_by_given_name" msgid="184916793466387067">"Prenum"</string>
+    <string name="display_options_sort_by_family_name" msgid="7857986975275712622">"Num da famiglia"</string>
+    <string name="display_options_view_names_as" msgid="18022868169627979">"Mussar ils nums da contacts sco"</string>
+    <string name="display_options_view_given_name_first" msgid="6968288511197363292">"L\'emprim il prenum"</string>
+    <string name="display_options_view_family_name_first" msgid="1447288164951453714">"L\'emprim il num da famiglia"</string>
+    <string name="search_bar_hint" msgid="1012756309632856553">"Retschertgar ils contacts"</string>
+    <string name="search_for_all_contacts" msgid="6644963335787294131">"Tschertgar en tut ils contacts"</string>
+    <string name="take_photo" msgid="7496128293167402354">"Far ina foto"</string>
+    <string name="pick_photo" msgid="448886509158039462">"Tscherner ina foto ord il catalog"</string>
+    <string name="locale_change_in_progress" msgid="1124266507671178413">"La glista da contacts vegn adattada a la midada da lingua."\n\n"Spetgai per plaschair…"</string>
+    <string name="upgrade_in_progress" msgid="7530893673211750223">"La glista da contacts vegn actualisada. "\n\n"Spetgai per plaschair…"</string>
+    <!-- no translation found for upgrade_out_of_memory (6713914687111678777) -->
+    <skip />
+    <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Deinstallar in pèr applicaziuns"</string>
+    <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Empruvar anc ina giada d\'actualisar"</string>
+    <string name="search_results_for" msgid="8705490885073188513">"Resultats da tschertga da: <xliff:g id="QUERY">%s</xliff:g>"</string>
+    <string name="search_results_searching" msgid="7755623475227227314">"Tschertgar…"</string>
+    <!-- no translation found for adding_recipients (5123647646892106631) -->
+    <skip />
+    <!-- no translation found for menu_display_selected (6470001164297969034) -->
+    <skip />
+    <!-- no translation found for menu_display_all (8887488642609786198) -->
+    <skip />
+    <!-- no translation found for menu_select_all (621719255150713545) -->
+    <skip />
+    <!-- no translation found for menu_select_none (7093222469852132345) -->
+    <skip />
+    <!-- no translation found for multiple_picker_title:one (4761009734586319101) -->
+    <!-- no translation found for multiple_picker_title:other (4608837420986126229) -->
+    <!-- no translation found for unknown_contacts_separator (2490675836664397214) -->
+    <skip />
+    <!-- no translation found for no_contacts_selected (5877803471037324613) -->
+    <skip />
+    <!-- no translation found for add_field (5257149039253569615) -->
+    <skip />
+    <!-- no translation found for contact_status_update_attribution (752179367353018597) -->
+    <skip />
+    <!-- no translation found for contact_status_update_attribution_with_date (7358045508107825068) -->
+    <skip />
+    <!-- no translation found for description_edit (1601490950771217014) -->
+    <skip />
+    <!-- no translation found for description_star (2605854427360036550) -->
+    <skip />
+    <!-- no translation found for edit_contact (7529281274005689512) -->
+    <skip />
+    <!-- no translation found for merge_info:one (148365587896371969) -->
+    <!-- no translation found for merge_info:other (425683718017380845) -->
+    <!-- no translation found for edit_delete_rawcontact (5054644778227879148) -->
+    <skip />
+    <!-- no translation found for edit_error_saving (2153949392245240166) -->
+    <skip />
+    <!-- no translation found for edit_structured_editor_button (3830078388142808106) -->
+    <skip />
+    <!-- no translation found for local_invisible_directory (6046691709127661065) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <!-- no translation found for visualScrollerAlphabet (4697722110414354767) -->
+    <skip />
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
+</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 7979330..131033d 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Сведения о контакте"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Просмотреть контакт"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Изменить контакт"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"Адрес электронной почты:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Тип:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Создать контакт"</string>
     <string name="searchHint" msgid="8482945356247760701">"Поиск контактов"</string>
     <string name="menu_search" msgid="9147752853603483719">"Поиск"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Новый контакт"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Произношение"</string>
     <string name="label_notes" msgid="8337354953278341042">"Примечания"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Интернет-вызов"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Мелодия"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Имя и фамилия"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Произношение имени"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Видимые контакты отсутствуют."</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"Найден 1 контакт"</item>
-    <item quantity="other" msgid="7752927996850263152">"Найдено контактов: <xliff:g id="COUNT">%d</xliff:g>"</item>
+    <item quantity="one" msgid="5517063038754171134">"Найдено: 1"</item>
+    <item quantity="other" msgid="3852668542926965042">"Найдено: <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Контакт не найден."</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Не найдено"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 контакт"</item>
-    <item quantity="other" msgid="5660384247071761844">"Контактов: <xliff:g id="COUNT">%d</xliff:g>"</item>
+    <item quantity="one" msgid="4826918429708286628">"Найдено: 1"</item>
+    <item quantity="other" msgid="7988132539476575389">"Найдено: <xliff:g id="COUNT">%d</xliff:g>"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Контакты"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Избранное"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Контакты на SIM-карте"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Отсутствуют контакты для отображения. (Если аккаунт был только что добавлен, потребуется несколько минут для синхронизации контактов.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Отсутствуют контакты для отображения."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"У вас нет контактов."\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать контакт \"с нуля\";"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт."</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"У вас нет контактов. (Если вы только что добавили аккаунт, синхронизация контактов может занять несколько минут.)"\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Варианты отображения"</b></font>", чтобы выбрать, какие контакты будут видны; "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать контакт \"с нуля\";"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт."</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"У вас нет контактов."\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать контакт \"с нуля\";"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт."</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"У вас нет контактов. (Если вы только что добавили аккаунт, синхронизация контактов может занять несколько минут.)"\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Варианты отображения"</b></font>", чтобы выбрать, какие контакты будут видны; "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать контакт \"с нуля\";"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт."</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"У вас нет контактов."\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты,"</b></font>" чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт,"</b></font>" чтобы создать новый контакт;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт,"</b></font>" чтобы импортировать контакты с SIM-карты или SD-карты."\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"У вас нет контактов (если вы добавили аккаунт только что, подожите несколько минут, пока идет их синхронизация с телефоном). "\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Варианты отображения"</b></font>", чтобы выбрать, какие контакты будут видны; "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать новый контакт;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт"</b></font>", чтобы импортировать контакты с SIM-карты или SD-карты."\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"У вас нет контактов."\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать новый контакт;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт"</b></font>", чтобы импортировать контакты с SD-карты."\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"У вас нет контактов (если вы добавили аккаунт только что, подожите несколько минут, пока идет их синхронизация с телефоном). "\n\n"Чтобы добавить контакты, нажмите "<font fgcolor="#ffffffff"><b>"Меню"</b></font>" и выберите:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Аккаунты"</b></font>", чтобы добавить или настроить аккаунт с контактами, которые можно будет синхронизировать с телефоном;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Варианты отображения"</b></font>", чтобы выбрать, какие контакты будут видны; "\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Новый контакт"</b></font>", чтобы создать новый контакт;"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Импорт/Экспорт"</b></font>", чтобы импортировать контакты с SD-карты."\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"У вас нет избранных контактов."\n\n"Чтобы сделать контакт избранным,"\n\n"        "<li>"нажмите вкладку "<b>"Контакты"</b>";"\n</li>" "\n<li>"нажмите контакт, который нужно сделать избранным;"\n</li>" "\n<li>"нажмите звездочку возле имени контакта."\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Все контакты"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Помеченные"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Перезвонить"</string>
     <string name="callAgain" msgid="3197312117049874778">"Позвонить снова"</string>
     <string name="returnCall" msgid="8171961914203617813">"Перезвонить"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g>:<xliff:g id="SECONDS">%2$s</xliff:g>"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g>:<xliff:g id="SECONDS">%s</xliff:g>"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Часто набираемые"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Добавить контакт"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Добавить в контакты <xliff:g id="EMAIL">%s</xliff:g>?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"фотография контакта"</string>
     <string name="description_minus_button" msgid="387136707700230172">"минус"</string>
     <string name="description_plus_button" msgid="515164827856229880">"плюс"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Общий накопитель недоступен"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Нет SD-карты"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Общий накопитель не найден"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"SD-карта не обнаружена"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Нет SD-карты"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"SD-карта не обнаружена"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Поиск vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Импортировать с SIM-карты"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Импорт с общего накопителя"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Импортировать с SD-карты"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Экспорт на общий накопитель"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Экспортировать на SD-карту"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Импортировать с SD-карты"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Экспортировать на SD-карту"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Передать видимые контакты"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Импорт одного файла VCard"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Импорт нескольких файлов vCard"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Импорт всех файлов VCard"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Поиск данных vCard на общем накопителе"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Поиск данных vCard на SD-карте"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Не удалось просканировать общий накопитель"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Не удалось сканировать SD-карту."</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Не удалось просканировать общий накопитель (<xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Не удалось просканировать SD-карту (причина: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Поиск данных vCard на SD-карте"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Не удалось сканировать SD-карту."</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Не удалось просканировать SD-карту (причина: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"Ошибка ввода-вывода"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Недостаточно памяти (возможно, файл слишком велик)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Не удалось обработать vCard по неизвестной причине."</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Не удалось обработать vCard. Файл правильного формата, но не поддерживается в текущей реализации."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"На общем накопителе отсутствуют файлы vCard"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"На SD-карте не найдены файлы VCard"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"На SD-карте не найдены файлы VCard"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Не удалось собрать метаинформацию файлов VCard."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"Не удалось импортировать один или несколько файлов (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Неизвестная ошибка"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Выберите файл vCard"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Чтение vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Чтение файлов VCard"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Не удается считать данные vCard"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"Контакт <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> из <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"Файл <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> из <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Кэширование файлов vCard в локальное временное хранилище"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Импортер кэширует файлы vCard в локальное временное хранилище. Фактический импорт начнется в ближайшее время."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Не удалось прочитать данные из файла vCard"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Чтение данных vCard отменено"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"Импорт файлов vCard завершен"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"Импорт файлов vCard запущен."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Импортер vCard начнет передачу файлов в ближайшее время."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Подтверждение·экспорта"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Вы действительно хотите экспортировать контакты в файл <xliff:g id="VCARD_FILENAME">%s</xliff:g>?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Не удалось экспортировать данные контакта."</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Не удалось экспортировать данные контакта."\n"Причина: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Нет контактов, которые можно экспортировать."</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Слишком много файлов vCard на общем накопителе"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"Слишком много файлов VCard на SD-карте."</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"Слишком много файлов VCard на SD-карте."</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Название файла слишком длинное (<xliff:g id="FILENAME">%s</xliff:g>)."</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"Экспорт файлов vCard запущен."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"Экспорт файлов vCard завершен"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Экспорт данных контакта"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Экспорт данных контакта в \"<xliff:g id="FILE_NAME">%s</xliff:g>\""</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Не удается запустить функцию экспорта: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Не удалось получить информацию из базы данных."</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Нет контактов для экспорта. Если в вашем телефоне имеются контакты, возможно они защищены от экспорта оператором услуг."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"Редактор vCard запущен некорректно"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Не удается открыть \"<xliff:g id="FILE_NAME">%1$s</xliff:g>\": <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"Контакт <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> из <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g>"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Не удается открыть \"<xliff:g id="FILE_NAME">%s</xliff:g>\": <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"Контакт <xliff:g id="CURRENT_NUMBER">%s</xliff:g> из <xliff:g id="TOTAL_NUMBER">%s</xliff:g>"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Имена контактов"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Добавить двухсекундную паузу"</string>
     <string name="add_wait" msgid="3360818652790319634">"Добавить паузу"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Отсутствует приложение для обработки этого действия"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Запомнить выбранное"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Неизвестно"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Нет данных"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Аккаунты"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Импорт/Экспорт"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Импорт и экспорт контактов"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Остальные контакты"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Все контакты"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Удаление группы \"<xliff:g id="GROUP">%s</xliff:g>\" из синхронизации приведет к удалению любых несгруппированных контактов из синхронизации."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Только телефон (несинхронизирован)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Только телефон (несинхронизирован)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Позвонить (<xliff:g id="CUSTOM">%s</xliff:g>)"</string>
     <string name="call_home" msgid="1990519474420545392">"Домашний тел."</string>
     <string name="call_mobile" msgid="7502236805487609178">"Мобильный тел."</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Чат через ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Чат через Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Чат"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Адрес"</string>
     <string name="postal_street" msgid="8133143961580058972">"Улица"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Почтовый ящик"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Окружение"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Регион"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Почтовый индекс"</string>
     <string name="postal_country" msgid="7638264508416368690">"Страна"</string>
+    <string name="full_name" msgid="6602579550613988977">"Имя"</string>
     <string name="name_given" msgid="1687286314106019813">"Имя"</string>
     <string name="name_family" msgid="3416695586119999058">"Фамилия"</string>
     <string name="name_prefix" msgid="59756378548779822">"Форма обращения"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Фамилия (транскрипция)"</string>
     <string name="account_type_format" msgid="718948015590343010">"Контакт <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
     <string name="from_account_format" msgid="687567483928582084">"из <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"Контакт <xliff:g id="SOURCE_0">%1$s</xliff:g> из источника <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Использовать эту фотографию"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Невозможно изменить контактную информацию <xliff:g id="SOURCE">%1$s</xliff:g> на этом устройстве."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Отсутствует дополнительная информация об этом контакте."</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Выбрать фото из галереи"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Выполняется обновление списка контактов, чтобы изменение языка вступило в силу."\n\n"Подождите..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Обновляется список контактов."\n\n"Подождите..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Контакты обновляются. "\n\n" Для обновления требуется около <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> МБ внутренней памяти телефона."\n\n"Выберите один из следующих вариантов:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Контакты обновляются. "\n\n" Для обновления требуется около <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> МБ внутренней памяти телефона."\n\n"Выберите один из следующих вариантов:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Удалить некоторые приложения"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Повторить попытку обновления"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Результаты поиска для: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Поиск..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Загрузка…"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Показать выбранные"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Показать все"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Выбрать все"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Снять все выделения"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"Выбран 1 получатель"</item>
+    <item quantity="other" msgid="4608837420986126229">"Выбрано получателей: <xliff:g id="COUNT">%d</xliff:g>"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Неизвестные контакты"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Контакты не выбраны."</string>
+    <string name="add_field" msgid="5257149039253569615">"Добавить информацию"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"с помощью <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> с помощью <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"изменить"</string>
+    <string name="description_star" msgid="2605854427360036550">"избранное"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Изменить контакт"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"не объединен"</item>
+    <item quantity="other" msgid="425683718017380845">"объединено из нескольких источников (<xliff:g id="COUNT">%0$d</xliff:g>)"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Удалить"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Ошибка при сохранении"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Другое"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"А;Б;В;Г;Д;Е;Ё;Ж;З;И;Й;К;Л;М;Н;О;П;Р;С;Т;У;Ф;Х;Ц;Ч;Ш;Щ;Э;Ю;Я"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index e8f403b..e9e45e0 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Kontaktuppgifter"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Visa kontakt"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Redigera kontakt"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-postadress:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Typ:"</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Skapa kontakt"</string>
     <string name="searchHint" msgid="8482945356247760701">"Sök efter kontakter"</string>
     <string name="menu_search" msgid="9147752853603483719">"Sök"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Ny kontakt"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetiskt"</string>
     <string name="label_notes" msgid="8337354953278341042">"Anteckningar"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"Internetsamtal"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Ringsignal"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"För- och efternamn"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Fonetiskt namn"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Det finns inga synliga kontakter"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"En kontakt hittades"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> kontakter hittades"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 hittades"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> hittades"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Kontakten hittades inte"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Hittades inte"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 kontakt"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> kontakter"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 hittades"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> hittades"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kontakter"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Favoriter"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"Kontakter från SIM-kort"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Du har inga kontakter att visa. (Om du nyss lade till ett konto kan det ta några minuter innan kontakterna synkroniserats.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Du har inga kontakter att visa."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Det finns inga kontakter att visa."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Det finns inga kontakter att visa (om du nyss har lagt till ett konto kan det ta några minuter att synkronisera kontakter)."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativ"</b></font>" om du vill ändra vilka kontakter som är synliga"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Det finns inga kontakter att visa."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Det finns inga kontakter att visa (om du nyss har lagt till ett konto kan det ta några minuter att synkronisera kontakter)."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativ"</b></font>" om du vill ändra vilka kontakter som är synliga"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Det finns inga kontakter att visa."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>" om du vill importera kontakter från SIM- eller SD-kortet"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Det finns inga kontakter att visa (om du nyss har lagt till ett konto kan det ta några minuter att synkronisera kontakter)."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativ"</b></font>" om du vill ändra vilka kontakter som är synliga"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>" om du vill importera kontakter från SIM-kortet eller SD-kortet"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Det finns inga kontakter att visa."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>" om du vill importera kontakter från SD-kortet"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Det finns inga kontakter att visa (om du nyss har lagt till ett konto kan det ta några minuter att synkronisera kontakter)."\n\n"Om du vill lägga till kontakter trycker du på "<font fgcolor="#ffffffff"><b>"Meny"</b></font>" och sedan på:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Konton"</b></font>" om du vill lägga till eller konfigurera ett konto med kontakter som kan synkroniseras till telefonen"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Visningsalternativ"</b></font>" om du vill ändra vilka kontakter som är synliga"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Ny kontakt"</b></font>" om du vill skapa en ny kontakt från grunden"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Importera/exportera"</b></font>" om du vill importera kontakter från SD-kortet"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Du har inte några favoriter."\n\n"Så här lägger du till kontakter i favoritlistan:"\n\n"        "<li>"Tryck på fliken "<b>"Kontakter"</b>\n</li>" "\n<li>"Tryck på den kontakt du vill lägga till i favoriterna"\n</li>" "\n<li>"Tryck på stjärnan bredvid kontaktens namn"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Alla kontakter"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Stjärnmärkt"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Ring upp"</string>
     <string name="callAgain" msgid="3197312117049874778">"Ring igen"</string>
     <string name="returnCall" msgid="8171961914203617813">"Ring upp"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> minuter <xliff:g id="SECONDS">%2$s</xliff:g> sekunder"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> minuter <xliff:g id="SECONDS">%s</xliff:g> sekunder"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Ofta kontaktade"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Lägg till kontakt"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"Vill du lägga till <xliff:g id="EMAIL">%s</xliff:g> i Kontakter?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"kontaktbild"</string>
     <string name="description_minus_button" msgid="387136707700230172">"minus"</string>
     <string name="description_plus_button" msgid="515164827856229880">"plus"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"SD-kort ej tillgängligt"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"Inget SD-kort"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Inget SD-kort hittades"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Inget SD-kort hittades"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"Inget SD-kort"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Inget SD-kort hittades"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"Söker efter vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"Importera från SIM-kort"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Importera från SD-kort"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"Importera från SD-kort"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Exportera till SD-kort"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"Exportera till SD-kort"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"Importera från SD-kort"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"Exportera till SD-kort"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Dela synliga kontakter"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Importera en vCard-fil"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Importera flera vCard-filer"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Importera alla vCard-filer"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Söker efter vCard-data på SD-kort"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"Söker efter vCard-data på SD-kort"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Det gick inte att skanna SD-kortet"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"Det gick inte att läsa SD-kort"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Det gick inte att skanna SD-kortet (orsak: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"Det gick inte att skanna SD-kortet (orsak: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"Söker efter vCard-data på SD-kort"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"Det gick inte att läsa SD-kort"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"Det gick inte att skanna SD-kortet (orsak: <xliff:g id="FAIL_REASON">%s</xliff:g>)"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"I/O-fel"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Det finns för lite minne (filen kan vara för stor)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Det gick inte att analysera vCard av okänd anledning"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Det gick inte att analysera vCard trots att formatet verkar vara giltigt. Den aktuella implementeringen stöder inte det."</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Det finns ingen vCard-fil på SD-kortet"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"Ingen vCard-fil hittades på SD-kortet"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"Ingen vCard-fil hittades på SD-kortet"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Det går inte att samla in metainformation för den eller de givna vCard-filerna."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"En eller flera filer kunde inte importeras: (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Okänt fel"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"Välj vCard-fil"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"Läser vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"Läser vCard-filer"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"Det gick inte att läsa vCard-data"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontakter"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> filer"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"Cachelagrar vCard i lokalt tillfälligt utrymme"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"Importfunktionen cachelagrar vCard-fil(er) i lokalt tillfälligt utrymme. Den faktiska importen börjar snart."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"Det går inte att läsa vCard-data"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"Läsning av vCard-data avbröts"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"vCard-importen har slutförts"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard-import har startat."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"Importfunktionen för vCard importerar vCard-filen efter en stund."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Bekräfta export"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Vill du exportera kontaktlistan till \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\"?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Det gick inte att exportera kontaktdata"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Det gick inte att exportera kontaktdata."\n"Orsak: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Det finns ingen kontakt som kan exporteras"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"För många vCard-filer på SD-kortet"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"För många vCard-filer på SD-kortet"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"För många vCard-filer på SD-kortet"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Det obligatoriska filnamnet är för långt (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard-export har startat."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"vCard-exporten har slutförts"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Exporterar kontaktuppgifter"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Exporterar kontaktuppgifter till: <xliff:g id="FILE_NAME">%s</xliff:g>"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Det gick inte att starta exportverktyget: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Det gick inte att hämta databasinformation"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Det finns ingen kontakt som kan exporteras. Om du vet att du har kontakter i din telefon kan problemet vara att en leverantör förhindrar att kontakterna exporteras från telefonen."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"vCard-kompositören är inte korrekt initierad"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Det gick inte att öppna <xliff:g id="FILE_NAME">%1$s</xliff:g>: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kontakter"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"Det gick inte att öppna <xliff:g id="FILE_NAME">%s</xliff:g>: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"<xliff:g id="CURRENT_NUMBER">%s</xliff:g> av <xliff:g id="TOTAL_NUMBER">%s</xliff:g> kontakter"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Dina kontakters namn"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"Lägg till en paus på 2 sek."</string>
     <string name="add_wait" msgid="3360818652790319634">"Lägg till väntetid"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Inget program som kan hantera åtgärden hittades"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Kom ihåg det här valet"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Okänd"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Inga data"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Konton"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"Importera/exportera"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Importera/exportera kontakter"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Alla andra kontakter"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Alla kontakter"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"Om du tar bort \"<xliff:g id="GROUP">%s</xliff:g>\" från synkroniseringen tas även alla kontakter som inte tillhör grupper bort från synkroniseringen."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Bara telefon (osynkad)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Bara telefon (osynkad)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Ring <xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"Ring hem"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Ring mobilen"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"Chatta med ICQ"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Chatta med Jabber"</string>
     <string name="chat" msgid="9025361898797412245">"Chatt"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adress"</string>
     <string name="postal_street" msgid="8133143961580058972">"Gata"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Postbox"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Område"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Delstat"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Postnummer"</string>
     <string name="postal_country" msgid="7638264508416368690">"Land"</string>
+    <string name="full_name" msgid="6602579550613988977">"Namn"</string>
     <string name="name_given" msgid="1687286314106019813">"Förnamn"</string>
     <string name="name_family" msgid="3416695586119999058">"Efternamn"</string>
     <string name="name_prefix" msgid="59756378548779822">"Namnprefix"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Fonetiskt efternamn"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g>-kontakt"</string>
     <string name="from_account_format" msgid="687567483928582084">"från <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_0">%1$s</xliff:g> kontakt från <xliff:g id="SOURCE_1">%2$s</xliff:g>"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Använd det här fotot"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"Kontaktinformation för <xliff:g id="SOURCE">%1$s</xliff:g> kan inte redigeras i den här enheten."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Det finns ingen mer information för kontakten"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Välj ett foto från galleriet"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Kontaktlistan uppdateras så att språkändringen visas."\n\n"Vänta..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Kontaktlistan uppdateras."\n\n"Vänta..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Kontakter håller på att uppgraderas. "\n\n"Uppgraderingen kräver ungefär <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>MB av telefonens internminne."\n\n"Välj något av följande alternativ:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Kontakter håller på att uppgraderas. "\n\n"Uppgraderingen kräver ungefär <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>MB av telefonens internminne."\n\n"Välj något av följande alternativ:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Avinstallera några program"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Försök uppgradera igen"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Sökresultat för: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Söker..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Läser in …"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Visa markerade"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Visa alla"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Markera alla"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Avmarkera alla"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 mottagare har markerats"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> mottagare har markerats"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Okända kontakter"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Inga kontakter har markerats."</string>
+    <string name="add_field" msgid="5257149039253569615">"Lägg till information"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"via <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> via <xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"redigera"</string>
+    <string name="description_star" msgid="2605854427360036550">"favorit"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Redigera kontakt"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"inte kombinerade"</item>
+    <item quantity="other" msgid="425683718017380845">"kombinerade från <xliff:g id="COUNT">%0$d</xliff:g> källor"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Ta bort"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Det gick inte att spara"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Övrigt"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;Å;Ä;Ö"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 66ee4a9..9e94660 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"Kişi ayrıntıları"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"Kişiyi görüntüle"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"Kişiyi düzenle"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"E-posta adresi:"</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"Tür: "</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"Kişi oluştur"</string>
     <string name="searchHint" msgid="8482945356247760701">"Kişileri ara"</string>
     <string name="menu_search" msgid="9147752853603483719">"Ara"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"Yeni kişi"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"Fonetik"</string>
     <string name="label_notes" msgid="8337354953278341042">"Notlar"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"İnternet çağrısı"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"Zil sesi"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"Adı ve Soyadı"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"Fonetik adı"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"Görülebilir kişi yok"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"1 kişi bulundu"</item>
-    <item quantity="other" msgid="7752927996850263152">"<xliff:g id="COUNT">%d</xliff:g> kişi bulundu"</item>
+    <item quantity="one" msgid="5517063038754171134">"1 kişi bulundu"</item>
+    <item quantity="other" msgid="3852668542926965042">"<xliff:g id="COUNT">%d</xliff:g> kişi bulundu"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"Kişi bulunamadı"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"Bulunamadı"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 kişi"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> kişi"</item>
+    <item quantity="one" msgid="4826918429708286628">"1 kişi bulundu"</item>
+    <item quantity="other" msgid="7988132539476575389">"<xliff:g id="COUNT">%d</xliff:g> kişi bulundu"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"Kişiler"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"Sık Kullanılanlar"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"SIM kart kişileri"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"Görüntülenecek kişiniz yok. (Hesabı yeni eklediyseniz, kişilerin senkronize edilmesi birkaç dakika sürebilir.)"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"Görüntülenecek kişiniz yok."</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"Görüntülenecek hiçbir kişiniz yok."\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip olan bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi eklemek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"Görüntülenecek hiçbir kişiniz yok. (Kısa süre önce bir hesap eklediyseniz, kişileri senkronize etmek birkaç dakika sürebilir.)"\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip olan bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Seçenekleri görüntüle"</b></font>" (görülebilir kişileri değiştirmek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi oluşturmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"Görüntülenecek hiçbir kişiniz yok."\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip olan bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi eklemek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"Görüntülenecek hiçbir kişiniz yok. (Kısa süre önce bir hesap eklediyseniz, kişileri senkronize etmek birkaç dakika sürebilir.)"\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip olan bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Seçenekleri görüntüle"</b></font>" (görülebilir kişileri değiştirmek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi oluşturmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"Görüntülenecek kişiniz yok."\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi eklemek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>\n</li>"(SIM veya SD kartınızdaki kişileri aktarmak için)"</string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"Görüntülenecek kişiniz yok. (Kısa bir süre önce hesap eklediyseniz, kişileri senkronize etmek birkaç dakika sürebilir.)"\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip olan bir hesap eklemek veya yapılandırmak için"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Seçenekleri görüntüle"</b></font>" (görülebilir kişileri değiştirmek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi oluşturmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>" (SIM veya SD kartınızdaki kişileri aktarmak için)"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"Görüntülenecek kişiniz yok."\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip olan bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi eklemek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>" (kişileri SD kartınızdan içe aktarmak için)"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"Görüntülenecek kişiniz yok. (Kısa süre önce bir hesap eklediyseniz kişileri senkronize etmek birkaç dakika sürebilir.)"\n\n"Kişi eklemek için, "<font fgcolor="#ffffffff"><b>"Menü"</b></font>"\'ye basın ve şunlara dokunun:"\n" "\n<li><font fgcolor="#ffffffff"><b>"Hesaplar"</b></font>" (telefon ile senkronize edebileceğiniz kişilere sahip bir hesap eklemek veya yapılandırmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Seçenekleri görüntüle"</b></font>" (görülebilir kişileri değiştirmek için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"Yeni kişi"</b></font>" (en baştan yeni bir kişi oluşturmak için)"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"İçe/Dışa Aktar"</b></font>\n</li>"(SIM veya SD kartınızdaki kişileri içe aktarmak için)"</string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"Favoriniz bulunmuyor."\n\n"Favoriler listenize kişi eklemek için:"\n\n"        "<li><b>"Kişiler"</b>" sekmesine dokunun"\n</li>" "\n<li>"Favorilerinize eklemek istediğiniz kişiye dokunun"\n</li>" "\n<li>"Kişi adının yanındaki yıldız simgesine dokunun"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"Tüm kişiler"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"Yıldızlı"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"Geri ara"</string>
     <string name="callAgain" msgid="3197312117049874778">"Tekrar çağrı yap"</string>
     <string name="returnCall" msgid="8171961914203617813">"Geri ara"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> dak <xliff:g id="SECONDS">%2$s</xliff:g> sn"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> dak <xliff:g id="SECONDS">%s</xliff:g> sn"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"Sık iletişim kurulanlar"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"Kişi ekle"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"\"<xliff:g id="EMAIL">%s</xliff:g>\" adresi kişilere eklensin mi?"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"kişi fotoğrafı"</string>
     <string name="description_minus_button" msgid="387136707700230172">"eksi"</string>
     <string name="description_plus_button" msgid="515164827856229880">"artı"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"Payl dep birm kullnlmıyor"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"SD kart yok"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"Paylaşılan depolama birimi algılanmadı"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"Hiçbir SD kart tespit edilmedi"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"SD kart yok"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"Hiçbir SD kart tespit edilmedi"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"vCard aranıyor"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"SIM karttan içe aktar"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"Payl deplm birmnden aktar"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"SD karttan içe aktar"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"Payl deplm birimine aktar"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"SD karta dışa aktar"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"SD karttan içe aktar"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"SD karta dışa aktar"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"Görülebilir kişileri paylaş"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"Bir vCard dosyasını içe aktar"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"Birden fazla vCard dosyasını içe aktar"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"Tüm vCard dosyalarını içe aktar"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"Paylaşılan depolama birimindeki vCard verileri aranıyor"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"SD kartta vCard verileri aranıyor"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"Paylaşılan depolama birimi taraması başarısız oldu"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"SD kart taranamadı"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"Paylaşılan depolama birimi taraması başarısız oldu (Nedeni: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"SD kart taraması başarısız oldu (Neden: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"SD kartta vCard verileri aranıyor"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"SD kart taranamadı"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"SD kart taraması başarısız oldu (Neden: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\")"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"G/Ç Hatası"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"Bellek yetersiz (dosya çok büyük olabilir)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"Beklenmedik bir nedenden dolayı vCard ayrıştırılamadı"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"Geçerli biçimde görünmesine rağmen vCard ayrıştırılamadı, çünkü şu anki uygulama vCard\'ı desteklemiyor"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"Paylaşılan depolama biriminde vCard dosyası bulunamadı"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"SD kartta hiçbir vCard dosyası bulunamadı"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"SD kartta hiçbir vCard dosyası bulunamadı"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"Belirtilen vCard dosyalarının meta bilgileri toplanamıyor."</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"İçe aktarılamayan bir veya birden fazla dosya (%s)."</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"Bilinmeyen hata"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"vCard dosyasını seç"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"vCard okunuyor"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"vCard dosyaları okunuyor"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"vCard verileri okunamadı"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"Toplam <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kişiden <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> kişi"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"toplam <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> dosyadan <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g>. dosya"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"vCard\'lar yerel geçici depolamada önbelleğe kaydediliyor"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"İçe aktarma aracı vCard\'ları yerel geçici depolama alanına önbelleğe kaydediyor. Asıl içe aktarma işlemi kısa süre içinde başlayacak."</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"vCard verileri Okunamadı"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"vCard verilerini okuma işlemi iptal edildi."</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"vCard içe aktarma işlemi tamamlandı"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard içe aktarma aracı başlatıldı."</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"vCard içe aktarma aracı vCard\'ı bir süre sonra içe aktaracaktır."</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"Dışa aktarımı onayla"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"Kişi listenizi \"<xliff:g id="VCARD_FILENAME">%s</xliff:g>\" için dışa aktarmak istediğinizden emin misiniz?"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"Kişi verileri dışa aktarılamadı"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"Kişi verileri dışa aktarılamadı."\n"Hata nedeni: \"<xliff:g id="FAIL_REASON">%s</xliff:g>\""</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"Dışa aktarılabilen hiçbir kişi yok"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"Paylaşılan depolama biriminde çok fazla vCard dosyası var"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"SD kartta çok fazla vCard dosyası var"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"SD kartta çok fazla vCard dosyası var"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"Gereken dosya adı çok uzun (\"<xliff:g id="FILENAME">%s</xliff:g>\")"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard dışa aktarma aracı başlatıldı."</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"vCard dışa aktarma işlemi tamamlandı"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"Kişi verileri dışa aktarılıyor"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"Kişi verileri \"<xliff:g id="FILE_NAME">%s</xliff:g>\" dosyasına dışa aktarılıyor"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"Dışa aktarıcı başlatılamadı: \"<xliff:g id="EXACT_REASON">%s</xliff:g>\""</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"Veri tabanı bilgileri alınamadı"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"Dışa aktarılabilir kişi yok. Telefonunuzda aslında kişi kayıtları varsa, veri sağlayıcısı tarafından tüm kişilerin telefon dışına aktarılması yasaklanmış olabilir."</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"vCard oluşturucu doğru bir şekilde başlatılmamış"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%1$s</xliff:g>\" dosyası açılamadı: <xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"Toplam <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> kişiden <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> kişi"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"\"<xliff:g id="FILE_NAME">%s</xliff:g>\" dosyası açılamadı: <xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"Toplam <xliff:g id="TOTAL_NUMBER">%s</xliff:g> kişiden <xliff:g id="CURRENT_NUMBER">%s</xliff:g> kişi"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"Kişilerinizin adları"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"2 saniyelik duraklama ekle"</string>
     <string name="add_wait" msgid="3360818652790319634">"Bekleme ekle"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"Bu işlemi gerçekleştirecek bir uygulama bulunamadı"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"Bu tercihi anımsa"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"Bilinmiyor"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"Veri yok"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"Hesaplar"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"İçe/Dışa Aktar"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"Kişileri içe/dışa aktar"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"Diğer Tüm Kişiler"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"Tüm Kişiler"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"\'<xliff:g id="GROUP">%s</xliff:g>\' grubunu senkronizasyondan kaldırmak, gruplandırılmamış tüm kişileri de senkronizasyondan kaldırır."</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"Yalnızca telefon (senkronize edilmemiş)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"Yalnızca telefon (senkronize edilmemiş)"</string>
     <string name="call_custom" msgid="7756571794763171802">"Ara (<xliff:g id="CUSTOM">%s</xliff:g>)"</string>
     <string name="call_home" msgid="1990519474420545392">"Çağrı yap (ev)"</string>
     <string name="call_mobile" msgid="7502236805487609178">"Çağrı yap (mobil)"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"ICQ kullanarak sohbet et"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"Jabber kullanarak sohbet et"</string>
     <string name="chat" msgid="9025361898797412245">"Sohbet"</string>
+    <string name="postal_address" msgid="8765560217149624536">"Adres"</string>
     <string name="postal_street" msgid="8133143961580058972">"Cadde"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"Posta kutusu"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"Mahalle"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"Eyalet"</string>
     <string name="postal_postcode" msgid="572136414136673751">"Alan kodu"</string>
     <string name="postal_country" msgid="7638264508416368690">"Ülke"</string>
+    <string name="full_name" msgid="6602579550613988977">"Ad"</string>
     <string name="name_given" msgid="1687286314106019813">"Adı"</string>
     <string name="name_family" msgid="3416695586119999058">"Soyadı"</string>
     <string name="name_prefix" msgid="59756378548779822">"Ad öneki"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"Fonetik soyadı"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> kişi"</string>
     <string name="from_account_format" msgid="687567483928582084">"kaynak: <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"<xliff:g id="SOURCE_1">%2$s</xliff:g> kaynağına ait <xliff:g id="SOURCE_0">%1$s</xliff:g> kişisi"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"Bu fotoğrafı kullan"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g> kişi bilgileri bu cihazda düzenlenemez."</string>
     <string name="no_contact_details" msgid="6754415338321837001">"Bu kişi için ek bilgi yok"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"Galeri\'den fotoğraf seç"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"Kişi listesi, dil değişikliğini yansıtmak üzere güncelleniyor."\n\n"Lütfen bekleyin..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"Kişi listesi güncelleniyor."\n\n"Lütfen bekleyin..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"Kişiler yeni sürüme geçiriliyor. "\n\n"Yeni sürüme geçirme işlemi yaklaşık <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g>Mb dahili telefon depolama alanı gerektirir."\n\n"Aşağıdaki seçeneklerden birini belirleyin:"</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"Kişiler yeni sürüme geçiriliyor. "\n\n"Yeni sürüme geçirme işlemi yaklaşık <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB dahili telefon depolama alanı gerektirir."\n\n"Aşağıdaki seçeneklerden birini belirleyin:"</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"Bazı uygulamaları kaldır"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"Yeni sürüme geçmeyi tekrar dene"</string>
     <string name="search_results_for" msgid="8705490885073188513">"Şunun için arama sonuçları: <xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"Aranıyor..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"Yükleniyor …"</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"Seçileni göster"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"Tümünü göster\n"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"Tümünü seç"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"Tümünün seçimini kaldır"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"1 alıcı seçildi"</item>
+    <item quantity="other" msgid="4608837420986126229">"<xliff:g id="COUNT">%d</xliff:g> alıcı seçildi"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"Bilinmeyen kişiler"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"Seçili kişi yok."</string>
+    <string name="add_field" msgid="5257149039253569615">"Bilgi ekle"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"<xliff:g id="SOURCE">%1$s</xliff:g> aracılığıyla"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="SOURCE">%2$s</xliff:g> üzerinden şu saatte: <xliff:g id="DATE">%1$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"düzenle"</string>
+    <string name="description_star" msgid="2605854427360036550">"favori"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"Kişiyi düzenle"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"birleştirilmemiş"</item>
+    <item quantity="other" msgid="425683718017380845">"<xliff:g id="COUNT">%0$d</xliff:g> kaynaktan birleştirildi"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"Sil"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"Kaydetme hatası"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"Diğer"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;Ç;D;E;F;G;H;I;İ;J;K;L;M;N;O;Ö;P;R;S;Ş;T;U;Ü;V;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-xlarge/colors.xml b/res/values-xlarge/colors.xml
new file mode 100644
index 0000000..0f8f8de
--- /dev/null
+++ b/res/values-xlarge/colors.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+
+    <!-- Color used for the letter in the A-Z section header -->
+    <color name="section_header_text_color">#ff000000</color>
+
+</resources>
diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml
new file mode 100644
index 0000000..8f81240
--- /dev/null
+++ b/res/values-xlarge/dimens.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+    <!-- Size of the text in the aizy visual scroll control -->
+    <dimen name="aizy_text_size">12sp</dimen>
+
+    <dimen name="edit_photo_size">96dip</dimen>
+
+    <dimen name="aggregation_suggestion_icon_size">64dip</dimen>
+</resources>
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
new file mode 100644
index 0000000..5b920d6
--- /dev/null
+++ b/res/values-xlarge/styles.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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.
+-->
+
+<resources>
+    <style name="ContactBrowserTheme" parent="@android:Theme.Light.Holo">
+        <item name="pressedBackground">@drawable/list_item_pressed_bg</item>
+        <item name="android:windowBackground">@drawable/contact_list_bg</item>
+        <item name="android:windowContentOverlay">@null</item>
+        <item name="android:actionBarStyle">@style/TransparentActionBarStyle</item>
+        <item name="section_header_background">@drawable/section_header_holo</item>
+        <item name="list_item_divider">@drawable/list_item_divider_holo</item>
+        <item name="list_item_padding_top">0dip</item>
+        <item name="list_item_padding_right">11dip</item>
+        <item name="list_item_padding_bottom">0dip</item>
+        <item name="list_item_padding_left">4dip</item>
+        <item name="list_item_gap_between_image_and_text">8dip</item>
+        <item name="list_item_gap_between_label_and_data">5dip</item>
+        <item name="list_item_call_button_padding">14dip</item>
+        <item name="list_item_vertical_divider_margin">5dip</item>
+        <item name="list_item_presence_icon_margin">5dip</item>
+        <item name="list_item_header_text_width">56dip</item>
+        <item name="list_item_photo_size">64dip</item>
+        <item name="list_item_prefix_highlight_color">#729a27</item>
+        <item name="contact_filter_popup_width">320dip</item>
+    </style>
+
+    <style name="ContactPickerTheme" parent="@android:Theme.Holo.Light.Dialog">
+        <item name="section_header_background">@drawable/section_header_holo</item>
+        <item name="list_item_divider">@drawable/list_item_divider_holo</item>
+        <item name="list_item_padding_top">0dip</item>
+        <item name="list_item_padding_right">11dip</item>
+        <item name="list_item_padding_bottom">0dip</item>
+        <item name="list_item_padding_left">4dip</item>
+        <item name="list_item_gap_between_image_and_text">8dip</item>
+        <item name="list_item_gap_between_label_and_data">5dip</item>
+        <item name="list_item_call_button_padding">14dip</item>
+        <item name="list_item_vertical_divider_margin">5dip</item>
+        <item name="list_item_presence_icon_margin">5dip</item>
+        <item name="list_item_header_text_width">56dip</item>
+        <item name="list_item_photo_size">64dip</item>
+    </style>
+    
+    <style name="SocialWidgetConfigureTheme" parent="ContactPickerTheme">
+    </style>
+
+    <style name="ContactsSearchTheme" parent="ContactPickerTheme">
+    </style>
+
+    <style name="ContactsPreferencesTheme" parent="@android:Theme.Light.Holo">
+    </style>
+
+    <style name="CustomContactListFilterTheme" parent="@android:Theme.Holo.Light.Dialog">
+    </style>
+
+    <style name="CustomContactListFilterView" parent="CustomContactListFilterTheme">
+        <item name="android:layout_width">400dip</item>
+        <item name="android:layout_height">600dip</item>
+    </style>
+
+    <style name="ContactPickerLayout" parent="ContactPickerTheme">
+        <item name="android:layout_width">480dip</item>
+        <item name="android:layout_height">650dip</item>
+    </style>
+
+    <style name="CallDetailActivityTheme" parent="@android:Theme.Dialog">
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <style name="ContactDetailActivityTheme" parent="@android:Theme.Dialog">
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <style name="ContactEditorActivityTheme" parent="@android:Theme.Light.Holo">
+        <item name="android:actionBarStyle">@style/TransparentActionBarStyle</item>
+        <item name="android:windowBackground">@drawable/contact_list_bg</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <style name="TransparentActionBarStyle" parent="android:Widget.Holo.Light.ActionBar">
+        <item name="android:background">@null</item>
+    </style>
+
+    <style name="DirectoryHeader" parent="ContactBrowserTheme">
+        <item name="android:background">@drawable/directory_bg_holo</item>
+    </style>
+</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index ef982ed..ae917eb 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"联系人详情"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"查看联系人"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"编辑联系人"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"电子邮件地址："</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"类型："</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"创建联系人"</string>
     <string name="searchHint" msgid="8482945356247760701">"搜索联系人"</string>
     <string name="menu_search" msgid="9147752853603483719">"搜索"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"新建联系人"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"拼音"</string>
     <string name="label_notes" msgid="8337354953278341042">"备注"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"互联网通话"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"铃声"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"姓名"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"姓名拼音"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"未显示任何联系人"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"找到 1 位联系人"</item>
-    <item quantity="other" msgid="7752927996850263152">"找到 <xliff:g id="COUNT">%d</xliff:g> 位联系人"</item>
+    <item quantity="one" msgid="5517063038754171134">"找到 1 个联系人"</item>
+    <item quantity="other" msgid="3852668542926965042">"找到 <xliff:g id="COUNT">%d</xliff:g> 个联系人"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"未找到联系人"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"找不到"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 位联系人"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> 位联系人"</item>
+    <item quantity="one" msgid="4826918429708286628">"找到 1 个联系人"</item>
+    <item quantity="other" msgid="7988132539476575389">"找到 <xliff:g id="COUNT">%d</xliff:g> 个联系人"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"通讯录"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"收藏"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"SIM 卡联系人"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"没有任何联系人可供显示。（如果您刚刚添加了一个帐户，则系统需要几分钟的时间同步联系人。）"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"没有任何联系人可供显示。"</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"您没有可显示的联系人。"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置可同步到手机的联系人的帐户"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"您没有可显示的联系人。（如果您刚刚添加了一个帐户，则需要几分钟时间同步联系人。）"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置可同步到手机的联系人的帐户"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"显示选项"</b></font>"以更改可见的联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"您没有可显示的联系人。"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置可同步到手机的联系人的帐户"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"您没有可显示的联系人。（如果您刚刚添加了一个帐户，则需要几分钟时间同步联系人。）"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置可同步到手机的联系人的帐户"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"显示选项"</b></font>"以更改可见的联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"您没有可显示的联系人。"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸以下按钮执行操作："\n\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置帐户，您可以将该帐户中包含的联系人同步到手机"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>"以导入 SIM 卡或 SD 卡上的联系人"\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"您没有可显示的联系人。（如果您刚刚添加了一个帐户，则需要几分钟时间同步联系人。）"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置帐户，您可以将该帐户中包含的联系人同步到手机"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"显示选项"</b></font>"以更改可见的联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>"以导入 SIM 卡或 SD 卡上的联系人"\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"您没有可显示的联系人。"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置帐户，您可以将该帐户中包含的联系人同步到手机"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>"以导入 SIM 卡或 SD 卡上的联系人"\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"您没有可显示的联系人。（如果您刚刚添加了一个帐户，则需要几分钟时间同步联系人。）"\n\n"要添加联系人，请按"<font fgcolor="#ffffffff"><b>"菜单"</b></font>"，然后触摸："\n" "\n<li><font fgcolor="#ffffffff"><b>"Google 帐户"</b></font>"以添加或配置帐户，您可以将该帐户中包含的联系人同步到手机"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"显示选项"</b></font>"以更改可见的联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"新建联系人"</b></font>"以从头开始创建新联系人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"导入/导出"</b></font>"以导入 SD 卡上的联系人"\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"您未收藏任何联系人。"\n\n"要向您的收藏列表添加联系人，请执行以下操作："\n\n"        "<li>"触摸"<b>"联系人"</b>"标签"\n</li>\n<li>"触摸您要加入收藏的联系人"\n</li>\n<li>"触摸联系人姓名旁边的星标"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"所有联系人"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"已加星标的内容"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"回电"</string>
     <string name="callAgain" msgid="3197312117049874778">"重拨"</string>
     <string name="returnCall" msgid="8171961914203617813">"回拨"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> 分 <xliff:g id="SECONDS">%2$s</xliff:g> 秒"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> 分 <xliff:g id="SECONDS">%s</xliff:g> 秒"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"常用联系人"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"添加联系人"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"将“<xliff:g id="EMAIL">%s</xliff:g>”添加到联系人？"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"联系人照片"</string>
     <string name="description_minus_button" msgid="387136707700230172">"删除"</string>
     <string name="description_plus_button" msgid="515164827856229880">"添加"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"共享存储设备不可用"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"无 SD 卡"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"未检测到共享存储设备"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"未检测到 SD 卡"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"无 SD 卡"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"未检测到 SD 卡"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"正在搜索 vCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"从 SIM 卡导入"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"从共享存储设备导入"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"从 SD 卡导入"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"导出到共享存储设备"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"导出到 SD 卡"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"从 SD 卡导入"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"导出到 SD 卡"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"分享可见的联系人"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"导入一个 vCard 文件"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"导入多个 vCard 文件"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"导入所有 vCard 文件"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"正在共享存储设备中搜索 vCard 文件"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"正在 SD 卡中搜索 vCard 数据"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"扫描共享存储设备时失败"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"扫描 SD 卡失败"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"扫描共享存储设备时失败（原因：“<xliff:g id="FAIL_REASON">%s</xliff:g>”）"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"扫描 SD 卡失败（原因：“<xliff:g id="FAIL_REASON">%s</xliff:g>”）"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"正在 SD 卡中搜索 vCard 数据"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"扫描 SD 卡失败"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"扫描 SD 卡失败（原因：“<xliff:g id="FAIL_REASON">%s</xliff:g>”）"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"I/O 错误"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"存储器空间不足（文件可能过大）"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"由于意外原因而无法解析 vCard"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"虽然 vCard 似乎使用了有效的格式，但系统无法对其进行解析，因为当前的实现方案不支持该格式。"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"未在共享存储设备中找到 vCard 文件"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"未在 SD 卡上找到 vCard 文件"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"未在 SD 卡上找到 vCard 文件"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"无法收集指定的 vCard 文件的元信息。"</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"一个或多个文件导入失败 (%s)。"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"未知错误"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"选择 vCard 文件"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"正在读取 vCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"正在读取 vCard 文件"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"读取 vCard 数据失败"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"第 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> 个联系人（共 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> 个）"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"第 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> 个，共 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> 个文件"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"正在将 vCard 缓存到本地临时存储"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"导入程序正在将 vCard 缓存到本地临时存储。很快将会开始真正的导入。"</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"无法读取 vCard 数据"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"已取消读取 vCard 数据"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"导入 vCard 已完成"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard 导入程序已启动。"</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"vCard 导入程序会在稍后导入该 vCard。"</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"确认导出"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"确定要将您的联系人列表导出到“<xliff:g id="VCARD_FILENAME">%s</xliff:g>”中吗？"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"导出联系人数据失败"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"导出联系人数据失败。"\n"失败原因：“<xliff:g id="FAIL_REASON">%s</xliff:g>”"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"没有可导出的联系人"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"共享存储设备中的 vCard 文件太多"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"SD 卡中的 vCard 文件太多"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"SD 卡中的 vCard 文件太多"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"所需文件名太长（“<xliff:g id="FILENAME">%s</xliff:g>”）"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard 导出程序已启动。"</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"导出 vCard 已完成"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"正在导出联系人数据"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"正在向“<xliff:g id="FILE_NAME">%s</xliff:g>”导出联系人数据"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"无法初始化导出程序：“<xliff:g id="EXACT_REASON">%s</xliff:g>”"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"获取数据库信息失败"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"没有可导出的联系人。如果您的手机中确实有联系人，则可能是某个数据提供程序禁止您从手机中导出任何联系人。"</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"vCard 制作程序未正确初始化"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"无法打开“<xliff:g id="FILE_NAME">%1$s</xliff:g>”：<xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"第 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> 个联系人（共 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> 个）"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"无法打开“<xliff:g id="FILE_NAME">%s</xliff:g>”：<xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"第 <xliff:g id="CURRENT_NUMBER">%s</xliff:g> 个联系人（共 <xliff:g id="TOTAL_NUMBER">%s</xliff:g> 个）"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"联系人姓名"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"暂停时间延长 2 秒"</string>
     <string name="add_wait" msgid="3360818652790319634">"延长等待时间"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"未找到可处理此操作的应用程序"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"记住此选择"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"未知"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"无数据"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"帐户"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"导入/导出"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"导入/导出联系人"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"其他所有联系人"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"所有联系人"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"如果从同步中删除群组“<xliff:g id="GROUP">%s</xliff:g>”，则会同时删除其中所有未分组的联系人。"</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"仅保存在手机中（不同步）"</string>
+    <string name="account_phone" msgid="4025734638492419713">"仅保存在手机中（不同步）"</string>
     <string name="call_custom" msgid="7756571794763171802">"呼叫<xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"呼叫住宅电话"</string>
     <string name="call_mobile" msgid="7502236805487609178">"呼叫手机"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"使用 ICQ 聊天"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"使用 Jabber 聊天"</string>
     <string name="chat" msgid="9025361898797412245">"聊天"</string>
+    <string name="postal_address" msgid="8765560217149624536">"地址"</string>
     <string name="postal_street" msgid="8133143961580058972">"街道"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"信箱"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"街区"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"省/直辖市/自治区"</string>
     <string name="postal_postcode" msgid="572136414136673751">"邮政编码"</string>
     <string name="postal_country" msgid="7638264508416368690">"国家/地区"</string>
+    <string name="full_name" msgid="6602579550613988977">"姓名"</string>
     <string name="name_given" msgid="1687286314106019813">"名字"</string>
     <string name="name_family" msgid="3416695586119999058">"姓氏"</string>
     <string name="name_prefix" msgid="59756378548779822">"名称前缀"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"姓氏拼音"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> 联系人"</string>
     <string name="from_account_format" msgid="687567483928582084">"来自 <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"来自 <xliff:g id="SOURCE_1">%2$s</xliff:g> 的 <xliff:g id="SOURCE_0">%1$s</xliff:g> 联系人"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"使用此照片"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"<xliff:g id="SOURCE">%1$s</xliff:g> 联系人信息在此设备上不可编辑。"</string>
     <string name="no_contact_details" msgid="6754415338321837001">"无此联系人的其他信息"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"从图库中选择照片"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"正在更新联系人列表，以反映语言的变更。"\n\n"请稍候..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"正在更新联系人列表。"\n\n"请稍候..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"正在升级联系人。"\n\n"升级过程需要约 <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> Mb 的手机内存。"\n\n"请选择以下选项之一："</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"正在升级联系人。"\n\n"升级过程需要约 <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB 的手机内存。"\n\n"请选择以下选项之一："</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"卸载一些应用程序"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"重新尝试升级"</string>
     <string name="search_results_for" msgid="8705490885073188513">"“<xliff:g id="QUERY">%s</xliff:g>”的搜索结果"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"正在搜索..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"正在载入..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"已选收件人"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"全部收件人"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"全选"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"取消全选"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"已选择 1 个收件人"</item>
+    <item quantity="other" msgid="4608837420986126229">"已选择 <xliff:g id="COUNT">%d</xliff:g> 个收件人"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"未知联系人"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"未选择联系人。"</string>
+    <string name="add_field" msgid="5257149039253569615">"添加信息"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"来源：<xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"时间：<xliff:g id="DATE">%1$s</xliff:g>，来源：<xliff:g id="SOURCE">%2$s</xliff:g>"</string>
+    <string name="description_edit" msgid="1601490950771217014">"编辑"</string>
+    <string name="description_star" msgid="2605854427360036550">"收藏"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"编辑联系人"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"未合并"</item>
+    <item quantity="other" msgid="425683718017380845">"合并自 <xliff:g id="COUNT">%0$d</xliff:g> 个来源"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"删除"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"保存出错"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"其他"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index f7040aa..f0901e3 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -31,6 +31,8 @@
     <string name="viewContactTitle" msgid="7989394521836644384">"聯絡人詳細資料"</string>
     <string name="viewContactDesription" msgid="214186610887547860">"檢視聯絡人"</string>
     <string name="editContactDescription" msgid="2947202828256214947">"編輯聯絡人"</string>
+    <string name="edit_email_caption" msgid="2401084399676154272">"電子郵件地址："</string>
+    <string name="edit_email_type_caption" msgid="66331218163770698">"類型："</string>
     <string name="insertContactDescription" msgid="4709878105452681987">"建立聯絡人"</string>
     <string name="searchHint" msgid="8482945356247760701">"搜尋聯絡人"</string>
     <string name="menu_search" msgid="9147752853603483719">"搜尋"</string>
@@ -71,7 +73,8 @@
     <string name="editContact_title_insert" msgid="9125600232291405757">"新增聯絡人"</string>
     <string name="label_phonetic_name" msgid="2288082649573927286">"拼音"</string>
     <string name="label_notes" msgid="8337354953278341042">"附註"</string>
-    <string name="label_sip_address" msgid="124073911714324974">"網路電話"</string>
+    <!-- no translation found for label_sip_address (124073911714324974) -->
+    <skip />
     <string name="label_ringtone" msgid="8833166825330686244">"鈴聲"</string>
     <string name="ghostData_name" msgid="6490954238641157585">"姓名"</string>
     <string name="ghostData_phonetic_name" msgid="7852749081984070902">"姓名拼音"</string>
@@ -124,13 +127,13 @@
   </plurals>
     <string name="listTotalAllContactsZero" msgid="6811347506748072822">"沒有可顯示的聯絡人"</string>
   <plurals name="listFoundAllContacts">
-    <item quantity="one" msgid="2830107332033967280">"已找到 1 位聯絡人"</item>
-    <item quantity="other" msgid="7752927996850263152">"已找到 <xliff:g id="COUNT">%d</xliff:g> 位聯絡人"</item>
+    <item quantity="one" msgid="5517063038754171134">"找到 1 位聯絡人"</item>
+    <item quantity="other" msgid="3852668542926965042">"找到 <xliff:g id="COUNT">%d</xliff:g> 位聯絡人"</item>
   </plurals>
-    <string name="listFoundAllContactsZero" msgid="5554368784319460828">"找不到聯絡人"</string>
+    <string name="listFoundAllContactsZero" msgid="777952841930508289">"找不到"</string>
   <plurals name="searchFoundContacts">
-    <item quantity="one" msgid="916648718690661777">"1 位聯絡人"</item>
-    <item quantity="other" msgid="5660384247071761844">"<xliff:g id="COUNT">%d</xliff:g> 位聯絡人"</item>
+    <item quantity="one" msgid="4826918429708286628">"找到 1 位聯絡人"</item>
+    <item quantity="other" msgid="7988132539476575389">"找到 <xliff:g id="COUNT">%d</xliff:g> 位聯絡人"</item>
   </plurals>
     <string name="contactsIconLabel" msgid="7666609097606552806">"聯絡人"</string>
     <string name="contactsFavoritesLabel" msgid="8417039765586853670">"我的最愛"</string>
@@ -160,10 +163,10 @@
     <string name="simContacts_title" msgid="27341688347689769">"SIM 卡聯絡人"</string>
     <string name="noContactsHelpTextWithSyncForCreateShortcut" msgid="801504710275614594">"您沒有任何聯絡人可供顯示 (如果您剛剛才新增帳戶，系統需要幾分鐘的時間才能同步聯絡人資訊)。"</string>
     <string name="noContactsHelpTextForCreateShortcut" msgid="3081286388667108335">"您沒有任何聯絡人可供顯示。"</string>
-    <string name="noContactsHelpText" msgid="6788487368878712350">"您沒有任何聯絡人。"\n\n"如要新增聯絡人，請按下 ["<font fgcolor="#ffffffff">"選單"<b></b></font>"] 並輕觸："\n" "\n<li>"["<font fgcolor="#ffffffff">"帳戶"<b></b></font>" 來新增或設定您可以同步處理手機資料的聯絡人帳戶"\n</li>" "\n<li>"["<font fgcolor="#ffffffff">"新增聯絡人"<b></b></font>"] 從頭開始建立聯絡人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"匯入/匯出"</b></font>\n</li></string>
-    <string name="noContactsHelpTextWithSync" msgid="3734101165712848179">"您沒有任何聯絡人 (如果您剛剛才新增帳戶，系統需要幾分鐘的時間才能同步聯絡人資訊)。"\n\n"如要新增聯絡人，請按下 ["<font fgcolor="#ffffffff">"選單"</font><b></b>"] 並輕觸："\n\n"["<li><font fgcolor="#ffffffff">"帳戶"<b></b></font>"] 來新增或設定您可以同步處理手機資料的聯絡人帳戶"\n</li>" "\n<li>"["<font fgcolor="#ffffffff">"顯示選項"<b></b></font>"] 來變更聯絡人的顯示狀態"\n</li>" "\n<li>"["<font fgcolor="#ffffffff">"新增聯絡人"<b></b></font>"] 從頭開始建立聯絡人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"匯入/匯出"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpText" msgid="6553845386917463292">"您沒有任何聯絡人。"\n\n"如要新增聯絡人，請按下 ["<font fgcolor="#ffffffff">"選單"<b></b></font>"] 並輕觸："\n" "\n<li>"["<font fgcolor="#ffffffff">"帳戶"<b></b></font>" 來新增或設定您可以同步處理手機資料的聯絡人帳戶"\n</li>" "\n<li>"["<font fgcolor="#ffffffff">"新增聯絡人"<b></b></font>"] 從頭開始建立聯絡人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"匯入/匯出"</b></font>\n</li></string>
-    <string name="noContactsNoSimHelpTextWithSync" msgid="1122296298361373488">"您沒有任何聯絡人 (如果您剛剛才新增帳戶，系統需要幾分鐘的時間才能同步聯絡人資訊)。"\n\n"如要新增聯絡人，請按下 ["<font fgcolor="#ffffffff">"選單"</font><b></b>"] 並輕觸："\n\n"["<li><font fgcolor="#ffffffff">"帳戶"<b></b></font>"] 來新增或設定您可以同步處理手機資料的聯絡人帳戶"\n</li>" "\n<li>"["<font fgcolor="#ffffffff">"顯示選項"<b></b></font>"] 來變更聯絡人的顯示狀態"\n</li>" "\n<li>"["<font fgcolor="#ffffffff">"新增聯絡人"<b></b></font>"] 從頭開始建立聯絡人"\n</li>" "\n<li><font fgcolor="#ffffffff"><b>"匯入/匯出"</b></font>\n</li></string>
+    <string name="noContactsHelpText" msgid="7633826236417884130">"您沒有任何聯絡人可以顯示。"\n\n"如要新增聯絡人，請按下 [選單] 並輕觸："\n\n"[帳戶] 以新增或設定含有聯絡人的帳戶，您可以將其聯絡人資料同步傳送到手機"\n" "\n"[新增聯絡人] 以從頭開始建立聯絡人"\n" "\n"[匯入/匯出] 以從 SIM 卡或 SD 卡匯入聯絡人"<font fgcolor="#ffffffff"><b></b></font><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font>\n</li></string>
+    <string name="noContactsHelpTextWithSync" msgid="3017521127042216243">"您沒有任何聯絡人 (如果您剛剛才新增帳戶，系統需要幾分鐘的時間才能同步處理聯絡人資訊)。"\n\n"如要新增聯絡人，請按下 [選單] 並輕觸："\n\n"[帳戶] 以新增或設定含有聯絡人的帳戶，您可以將其聯絡人資料同步傳送到手機"\n" "\n"[顯示選項] 以變更聯絡人的顯示狀態"\n" "\n"[新增聯絡人] 以從頭開始建立聯絡人"\n" "\n"[匯入/匯出] 以從 SIM 卡或 SD 卡匯入聯絡人"<font fgcolor="#ffffffff"><b></b></font><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font>\n</li></string>
+    <string name="noContactsNoSimHelpText" msgid="467658807711582876">"您沒有任何聯絡人。"\n\n"如要新增聯絡人，請按下 [選單] 並輕觸："\n" "\n"[帳戶] 以新增或設定含有聯絡人的帳戶，您可以將其聯絡人資料同步傳送到手機帳戶"\n" "\n"[新增聯絡人] 從頭開始建立聯絡人"\n" "\n"[匯入/匯出] 從 SD 卡匯入聯絡人"<font fgcolor="#ffffffff"><b></b></font><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font>\n</li></string>
+    <string name="noContactsNoSimHelpTextWithSync" msgid="9040060730467973050">"您沒有任何聯絡人 (如果您剛剛才新增帳戶，系統需要幾分鐘的時間才能同步處理聯絡人資訊)。"\n\n"如要新增聯絡人，請按下 [選單] 並輕觸："\n\n"[帳戶] 以新增或設定含有聯絡人的帳戶，您可以將其聯絡人資料同步傳送到手機"\n" "\n"[顯示選項] 以變更聯絡人的顯示狀態"\n" "\n"[新增聯絡人] 以從頭開始建立聯絡人"\n" "\n"[匯入/匯出] 以從 SD 卡匯入聯絡人"<font fgcolor="#ffffffff"><b></b></font><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font></li><li><font fgcolor="#ffffffff"><b></b></font>\n</li></string>
     <string name="noFavoritesHelpText" msgid="3744655776704833277">"您沒有任何最愛。"\n\n"如要將聯絡人新增至最愛清單："\n\n<li>"輕觸 [聯絡人"<b></b>"] 標籤"\n</li>" "\n<li>"輕觸要新增至最愛的聯絡人"\n</li>" "\n<li>"輕觸聯絡人名稱旁邊的星號圖示"\n</li></string>
     <string name="liveFolder_all_label" msgid="5961411940473276616">"所有聯絡人"</string>
     <string name="liveFolder_favorites_label" msgid="2674341514070517105">"已加星號"</string>
@@ -180,7 +183,7 @@
     <string name="callBack" msgid="5498224409038809224">"回播電話"</string>
     <string name="callAgain" msgid="3197312117049874778">"重撥"</string>
     <string name="returnCall" msgid="8171961914203617813">"回電"</string>
-    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%1$s</xliff:g> 分 <xliff:g id="SECONDS">%2$s</xliff:g> 秒"</string>
+    <string name="callDetailsDurationFormat" msgid="8157706382818184268">"<xliff:g id="MINUTES">%s</xliff:g> 分 <xliff:g id="SECONDS">%s</xliff:g> 秒"</string>
     <string name="favoritesFrquentSeparator" msgid="8107518433381283736">"常用聯絡人"</string>
     <string name="add_contact_dlg_title" msgid="2896685845822146494">"新增聯絡人"</string>
     <string name="add_contact_dlg_message_fmt" msgid="7986472669444326576">"要將「<xliff:g id="EMAIL">%s</xliff:g>」新增為聯絡人嗎？"</string>
@@ -204,48 +207,51 @@
     <string name="description_contact_photo" msgid="3387458082667894062">"聯絡人相片"</string>
     <string name="description_minus_button" msgid="387136707700230172">"負號"</string>
     <string name="description_plus_button" msgid="515164827856229880">"加號"</string>
-    <string name="no_sdcard_title" product="nosdcard" msgid="1432254751491952259">"沒有可用的共用儲存裝置"</string>
-    <string name="no_sdcard_title" product="default" msgid="5911758680339949273">"無 SD 卡"</string>
-    <string name="no_sdcard_message" product="nosdcard" msgid="545247788569631436">"未偵測到共用儲存裝置"</string>
-    <string name="no_sdcard_message" product="default" msgid="6019391476490445358">"未偵測到 SD 卡"</string>
+    <string name="no_sdcard_title" msgid="5911758680339949273">"無 SD 卡"</string>
+    <string name="no_sdcard_message" msgid="6019391476490445358">"未偵測到 SD 卡"</string>
     <string name="searching_vcard_title" msgid="4970508055399376813">"正在搜尋 VCard"</string>
     <string name="import_from_sim" msgid="3859272228033941659">"從 SIM 卡匯入"</string>
-    <string name="import_from_sdcard" product="nosdcard" msgid="7450489361553523938">"從共用儲存裝置匯入"</string>
-    <string name="import_from_sdcard" product="default" msgid="8550360976693202816">"從 SD 卡匯入"</string>
-    <string name="export_to_sdcard" product="nosdcard" msgid="2322839933356280686">"匯出到共用儲存裝置"</string>
-    <string name="export_to_sdcard" product="default" msgid="2597105442616166277">"匯出至 SD 卡"</string>
+    <string name="import_from_sdcard" msgid="8550360976693202816">"從 SD 卡匯入"</string>
+    <string name="export_to_sdcard" msgid="2597105442616166277">"匯出至 SD 卡"</string>
     <string name="share_visible_contacts" msgid="890150378880783797">"分享正常顯示的聯絡人"</string>
     <string name="import_one_vcard_string" msgid="9059163467020328433">"匯入一個 vCard 檔案"</string>
     <string name="import_multiple_vcard_string" msgid="3810226492811062392">"匯入多個 vCard 檔案"</string>
     <string name="import_all_vcard_string" msgid="5518136113853448474">"匯入所有 vCard 檔案"</string>
-    <string name="searching_vcard_message" product="nosdcard" msgid="8987993391730721760">"正在共用儲存裝置中搜尋 vCard 資料"</string>
-    <string name="searching_vcard_message" product="default" msgid="6917522333561434546">"在 SD 卡上搜尋 VCard 資料"</string>
-    <string name="scanning_sdcard_failed_title" product="nosdcard" msgid="5451697520220712906">"掃描共用儲存裝置失敗"</string>
-    <string name="scanning_sdcard_failed_title" product="default" msgid="3506782007953167180">"無法掃描 SD 卡"</string>
-    <string name="scanning_sdcard_failed_message" product="nosdcard" msgid="264566842682850873">"掃描共用儲存裝置失敗 (原因：「<xliff:g id="FAIL_REASON">%s</xliff:g>」)"</string>
-    <string name="scanning_sdcard_failed_message" product="default" msgid="3761992500690182922">"無法掃描 SD 卡 (原因：「<xliff:g id="FAIL_REASON">%s</xliff:g>」)"</string>
+    <string name="searching_vcard_message" msgid="6917522333561434546">"在 SD 卡上搜尋 VCard 資料"</string>
+    <string name="scanning_sdcard_failed_title" msgid="3506782007953167180">"無法掃描 SD 卡"</string>
+    <string name="scanning_sdcard_failed_message" msgid="3761992500690182922">"無法掃描 SD 卡 (原因：「<xliff:g id="FAIL_REASON">%s</xliff:g>」)"</string>
     <string name="fail_reason_io_error" msgid="5922864781066136340">"I/O 錯誤"</string>
+    <string name="fail_reason_low_memory_during_import" msgid="7514918659342886381">"記憶體不足 (檔案可能過大)"</string>
     <string name="fail_reason_vcard_parse_error" msgid="1201233722762680214">"因未預期原因，無法剖析 VCard"</string>
     <string name="fail_reason_vcard_not_supported_error" msgid="655208100451286027">"VCard 格式正確，但目前的實作系統不支援此格式，因此無法剖析"</string>
-    <string name="fail_reason_no_vcard_file" product="nosdcard" msgid="6099852462800299180">"在共用儲存裝置中找不到 vCard 檔案"</string>
-    <string name="fail_reason_no_vcard_file" product="default" msgid="6376516175882881595">"SD 卡上沒有 vCard 檔案"</string>
+    <string name="fail_reason_no_vcard_file" msgid="6376516175882881595">"SD 卡上沒有 vCard 檔案"</string>
+    <string name="fail_reason_failed_to_collect_vcard_meta_info" msgid="4154492282316067754">"無法從指定的 vCard 檔案收集中繼資料。"</string>
     <string name="fail_reason_failed_to_read_files" msgid="3659521123567134029">"無法匯入一或多個檔案 (%s)。"</string>
     <string name="fail_reason_unknown" msgid="999034019513096768">"未知的錯誤"</string>
     <string name="select_vcard_title" msgid="3968948173786172468">"選取 VCard 檔案"</string>
-    <string name="progress_shower_message" msgid="5636525578293752526">"<xliff:g id="ACTION">%1$s</xliff:g>"\n"<xliff:g id="FILENAME">%2$s</xliff:g>"</string>
-    <string name="reading_vcard_title" msgid="4723433501579653199">"正在讀取 VCard"</string>
-    <string name="reading_vcard_message" msgid="6381368920030748743">"正在讀取 VCard 檔案"</string>
-    <string name="reading_vcard_failed_title" msgid="4923008144735294994">"無法讀取 VCard 資料"</string>
-    <string name="reading_vcard_contacts" msgid="3066834102042012868">"第 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> 位聯絡人，共 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> 位"</string>
-    <string name="reading_vcard_files" msgid="34180143726972661">"第 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> 個檔案，共 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> 個"</string>
+    <string name="caching_vcard_title" msgid="5009556022082659780">"正在將 vCard 資料快取至本機暫存空間"</string>
+    <string name="caching_vcard_message" msgid="2380844718093378900">"匯入工具正在將 vCard 的資料快取至本機暫存空間，隨即將啟動實際的匯入作業。"</string>
+    <!-- no translation found for progress_notifier_message (2311011466908220528) -->
+    <skip />
+    <!-- no translation found for importing_vcard_description (4245275224298571351) -->
+    <skip />
+    <string name="reading_vcard_failed_title" msgid="2162610359561887043">"無法讀取 vCard 資料"</string>
+    <string name="reading_vcard_canceled_title" msgid="1770608329958463131">"已取消讀取 vCard 資料"</string>
+    <string name="importing_vcard_finished_title" msgid="3213257229785702182">"已結束 vCard 匯入作業"</string>
+    <!-- no translation found for importing_vcard_canceled_title (2963132079200382269) -->
+    <skip />
+    <string name="vcard_importer_start_message" msgid="5520549352987753320">"vCard 匯入工具已啟動。"</string>
+    <string name="vcard_importer_will_start_message" msgid="2055145402481822160">"vCard 匯入工具將於稍後匯入該 vCard。"</string>
+    <string name="percentage" msgid="34897865327092209">"%s%%"</string>
     <string name="confirm_export_title" msgid="7648747763127442983">"確認匯出"</string>
     <string name="confirm_export_message" msgid="3875683519257829750">"確定要將聯絡人清單匯出至「<xliff:g id="VCARD_FILENAME">%s</xliff:g>」嗎？"</string>
     <string name="exporting_contact_failed_title" msgid="585823094820602526">"無法匯出聯絡人資料"</string>
     <string name="exporting_contact_failed_message" msgid="4151348002470298092">"匯出聯絡人資料失敗。"\n"失敗原因：「<xliff:g id="FAIL_REASON">%s</xliff:g>」"</string>
     <string name="fail_reason_no_exportable_contact" msgid="4919714086648344495">"沒有可匯出的聯絡人"</string>
-    <string name="fail_reason_too_many_vcard" product="nosdcard" msgid="6603952032405558414">"共用儲存裝置中的 vCard 檔案過多"</string>
-    <string name="fail_reason_too_many_vcard" product="default" msgid="7084146295639672658">"SD 卡中的 VCard 檔案過多"</string>
+    <string name="fail_reason_too_many_vcard" msgid="7084146295639672658">"SD 卡中的 VCard 檔案過多"</string>
     <string name="fail_reason_too_long_filename" msgid="1915716071321839166">"要求的檔案名稱過長 (「<xliff:g id="FILENAME">%s</xliff:g>」)"</string>
+    <string name="vcard_exporter_start_message" msgid="6497218576519292369">"vCard 匯出工具已啟動。"</string>
+    <string name="exporting_vcard_finished_title" msgid="1268425436375550862">"已結束 vCard 匯出作業"</string>
     <string name="exporting_contact_list_title" msgid="9072240631534457415">"正在匯出聯絡人資料"</string>
     <string name="exporting_contact_list_message" msgid="5640326540405486055">"正在將聯絡人資料匯出至「<xliff:g id="FILE_NAME">%s</xliff:g>」"</string>
     <string name="fail_reason_could_not_initialize_exporter" msgid="4943708332700987376">"無法初始化匯出程式：「<xliff:g id="EXACT_REASON">%s</xliff:g>」"</string>
@@ -253,8 +259,12 @@
     <string name="composer_failed_to_get_database_infomation" msgid="3723109558155169053">"無法取得資料庫資訊"</string>
     <string name="composer_has_no_exportable_contact" msgid="754734132189369094">"沒有可匯出的聯絡人。如果您的手機中確實存有聯絡人資料，這可能是因為某些資料提供者禁止您將所有聯絡人匯出手機。"</string>
     <string name="composer_not_initialized" msgid="8041534450748388843">"VCard 編輯器並未正確初始化"</string>
-    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"無法開啟「<xliff:g id="FILE_NAME">%1$s</xliff:g>」：<xliff:g id="EXACT_REASON">%2$s</xliff:g>"</string>
-    <string name="exporting_contact_list_progress" msgid="560522409559101193">"第 <xliff:g id="CURRENT_NUMBER">%1$s</xliff:g> 位聯絡人，共 <xliff:g id="TOTAL_NUMBER">%2$s</xliff:g> 位"</string>
+    <string name="fail_reason_could_not_open_file" msgid="4013520943128739511">"無法開啟「<xliff:g id="FILE_NAME">%s</xliff:g>」：<xliff:g id="EXACT_REASON">%s</xliff:g>"</string>
+    <string name="exporting_contact_list_progress" msgid="560522409559101193">"第 <xliff:g id="CURRENT_NUMBER">%s</xliff:g> 位聯絡人，共 <xliff:g id="TOTAL_NUMBER">%s</xliff:g> 位"</string>
+    <!-- no translation found for cancel_import_confirmation_title (1311741984719347665) -->
+    <skip />
+    <!-- no translation found for cancel_import_confirmation_message (3737315228484332088) -->
+    <skip />
     <string name="search_settings_description" msgid="2675223022992445813">"您的聯絡人姓名"</string>
     <string name="add_2sec_pause" msgid="9214012315201040129">"新增 2 秒暫停功能"</string>
     <string name="add_wait" msgid="3360818652790319634">"新增插播功能"</string>
@@ -264,6 +274,7 @@
     <string name="quickcontact_missing_app" msgid="4600366393134289038">"找不到可以處理這個動作的應用程式"</string>
     <string name="quickcontact_remember_choice" msgid="5964536411579749424">"記住這個選擇"</string>
     <string name="quickcontact_missing_name" msgid="5590266114306996632">"不明"</string>
+    <string name="quickcontact_no_data" msgid="2098000859125253675">"無資料"</string>
     <string name="menu_accounts" msgid="8499114602017077970">"帳戶"</string>
     <string name="menu_import_export" msgid="3765725645491577190">"匯入/匯出"</string>
     <string name="dialog_import_export" msgid="4771877268244096596">"匯入/匯出聯絡人"</string>
@@ -290,7 +301,7 @@
     <string name="display_ungrouped" msgid="4602580795576261158">"所有其他聯絡人"</string>
     <string name="display_all_contacts" msgid="6846131371214707956">"所有聯絡人"</string>
     <string name="display_warn_remove_ungrouped" msgid="2314043155909167610">"如果從同步處理群組中移除「<xliff:g id="GROUP">%s</xliff:g>」群組，系統也會從同步處理群組中移除所有未分組的聯絡人。"</string>
-    <!-- outdated translation 4025734638492419713 -->     <string name="account_phone" msgid="3682950835276226870">"僅儲存於手機 (不會同步處理)"</string>
+    <string name="account_phone" msgid="4025734638492419713">"僅儲存於手機 (不會同步處理)"</string>
     <string name="call_custom" msgid="7756571794763171802">"去電<xliff:g id="CUSTOM">%s</xliff:g>"</string>
     <string name="call_home" msgid="1990519474420545392">"去電住家電話"</string>
     <string name="call_mobile" msgid="7502236805487609178">"去電行動裝置"</string>
@@ -352,6 +363,7 @@
     <string name="chat_icq" msgid="8438405386153745775">"使用 ICQ 進行即時通訊"</string>
     <string name="chat_jabber" msgid="7561444230307829609">"使用 Jabber 進行即時通訊"</string>
     <string name="chat" msgid="9025361898797412245">"即時通訊"</string>
+    <string name="postal_address" msgid="8765560217149624536">"地址"</string>
     <string name="postal_street" msgid="8133143961580058972">"街道"</string>
     <string name="postal_pobox" msgid="4431938829180269821">"郵政信箱"</string>
     <string name="postal_neighborhood" msgid="1450783874558956739">"鄰"</string>
@@ -359,6 +371,7 @@
     <string name="postal_region" msgid="6045263193478437672">"州/省"</string>
     <string name="postal_postcode" msgid="572136414136673751">"郵遞區號"</string>
     <string name="postal_country" msgid="7638264508416368690">"國家/地區"</string>
+    <string name="full_name" msgid="6602579550613988977">"姓名"</string>
     <string name="name_given" msgid="1687286314106019813">"名字"</string>
     <string name="name_family" msgid="3416695586119999058">"姓氏"</string>
     <string name="name_prefix" msgid="59756378548779822">"姓名前稱銜"</string>
@@ -369,6 +382,7 @@
     <string name="name_phonetic_family" msgid="462095502140180305">"姓氏 (拼音)"</string>
     <string name="account_type_format" msgid="718948015590343010">"<xliff:g id="SOURCE">%1$s</xliff:g> 聯絡人"</string>
     <string name="from_account_format" msgid="687567483928582084">"來自 <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="account_type_and_name" msgid="2876220035411512934">"來自 <xliff:g id="SOURCE_1">%2$s</xliff:g> 的 <xliff:g id="SOURCE_0">%1$s</xliff:g> 聯絡人"</string>
     <string name="use_photo_as_primary" msgid="8807110122951157246">"使用此相片"</string>
     <string name="contact_read_only" msgid="1203216914575723978">"無法在此裝置編輯 <xliff:g id="SOURCE">%1$s</xliff:g> 的聯絡人資訊"</string>
     <string name="no_contact_details" msgid="6754415338321837001">"沒有此聯絡人的其他資訊"</string>
@@ -384,9 +398,51 @@
     <string name="pick_photo" msgid="448886509158039462">"從圖片庫選取相片"</string>
     <string name="locale_change_in_progress" msgid="1124266507671178413">"正在更新聯絡人清單以反映語言變更。"\n\n"請稍候..."</string>
     <string name="upgrade_in_progress" msgid="7530893673211750223">"正在更新聯絡人清單。"\n\n"請稍候..."</string>
-    <string name="upgrade_out_of_memory" msgid="492151063059824962">"正在進行聯絡人升級。"\n\n"升級程序需要大約 <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB 的手機內部儲存空間。"\n\n"請選擇下列其中一個選項："</string>
+    <string name="upgrade_out_of_memory" msgid="6713914687111678777">"正在進行聯絡人升級。"\n\n"升級程序需要大約 <xliff:g id="SIZE_IN_MEGABYTES">%d</xliff:g> MB 的手機內部儲存空間。"\n\n"請選擇下列其中一個選項："</string>
     <string name="upgrade_out_of_memory_uninstall" msgid="1721798828992091432">"解除安裝一些應用程式"</string>
     <string name="upgrade_out_of_memory_retry" msgid="8431289830472724609">"重試升級"</string>
     <string name="search_results_for" msgid="8705490885073188513">"此項目之搜尋結果：<xliff:g id="QUERY">%s</xliff:g>"</string>
     <string name="search_results_searching" msgid="7755623475227227314">"搜尋中..."</string>
+    <string name="adding_recipients" msgid="5123647646892106631">"載入中..."</string>
+    <string name="menu_display_selected" msgid="6470001164297969034">"顯示已選取的項目"</string>
+    <string name="menu_display_all" msgid="8887488642609786198">"全部顯示"</string>
+    <string name="menu_select_all" msgid="621719255150713545">"全選"</string>
+    <string name="menu_select_none" msgid="7093222469852132345">"全部取消選取"</string>
+  <plurals name="multiple_picker_title">
+    <item quantity="one" msgid="4761009734586319101">"已選取 1 位收件者"</item>
+    <item quantity="other" msgid="4608837420986126229">"已選取 <xliff:g id="COUNT">%d</xliff:g> 位收件者"</item>
+  </plurals>
+    <string name="unknown_contacts_separator" msgid="2490675836664397214">"不明聯絡人"</string>
+    <string name="no_contacts_selected" msgid="5877803471037324613">"未選取任何聯絡人。"</string>
+    <string name="add_field" msgid="5257149039253569615">"新增資訊"</string>
+    <string name="contact_status_update_attribution" msgid="752179367353018597">"透過 <xliff:g id="SOURCE">%1$s</xliff:g>"</string>
+    <string name="contact_status_update_attribution_with_date" msgid="7358045508107825068">"<xliff:g id="DATE">%1$s</xliff:g> (透過 <xliff:g id="SOURCE">%2$s</xliff:g>)"</string>
+    <string name="description_edit" msgid="1601490950771217014">"編輯"</string>
+    <string name="description_star" msgid="2605854427360036550">"我的最愛"</string>
+    <string name="edit_contact" msgid="7529281274005689512">"編輯聯絡人"</string>
+  <plurals name="merge_info">
+    <item quantity="one" msgid="148365587896371969">"未合併"</item>
+    <item quantity="other" msgid="425683718017380845">"從 <xliff:g id="COUNT">%0$d</xliff:g> 個來源合併"</item>
+  </plurals>
+    <string name="edit_delete_rawcontact" msgid="5054644778227879148">"刪除"</string>
+    <string name="edit_error_saving" msgid="2153949392245240166">"儲存時發生錯誤"</string>
+    <string name="edit_structured_editor_button" msgid="3830078388142808106">"..."</string>
+    <string name="local_invisible_directory" msgid="6046691709127661065">"其他"</string>
+    <!-- no translation found for aggregation_suggestion_title:one (7676930148670768645) -->
+    <!-- no translation found for aggregation_suggestion_title:other (3744098467672876675) -->
+    <!-- no translation found for aggregation_suggestion_joined_title (5342738708069602301) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_join_button (7248325487963514260) -->
+    <skip />
+    <!-- no translation found for aggregation_suggestion_view_button (8232061564083962522) -->
+    <skip />
+    <string name="visualScrollerAlphabet" msgid="4697722110414354767">"A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z"</string>
+    <!-- no translation found for menu_copyContact (8960980032631007658) -->
+    <skip />
+    <!-- no translation found for contact_directory_description (7071885390570890999) -->
+    <skip />
+    <!-- no translation found for contact_directory_account_description (7674700530474108835) -->
+    <skip />
+    <!-- no translation found for toast_making_personal_copy (7905283986345263275) -->
+    <skip />
 </resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 5f39532..cea3573 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -23,7 +23,16 @@
 
     <color name="edit_divider">#ff666666</color>
     <color name="background_secondary">#ff202020</color>
-    <color name="pinned_header_background">#ff202020</color>
 
     <color name="translucent_search_background">#cc000000</color>
+
+    <!-- Color used in the Aizy visual scroll control for empty section -->
+    <color name="aizy_line_color">#ff689afe</color>
+
+    <!-- Color used for the letter in the A-Z section header -->
+    <color name="section_header_text_color">#ff999999</color>
+
+    <!-- Color used as a selected background for the account/group selection widget -->
+    <color name="filter_selector_selected_background">#66ffffff</color>
+
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 4a7a743..832987e 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -28,15 +28,20 @@
     <dimen name="contact_shortcut_frame_width">50dip</dimen>    
     <dimen name="contact_shortcut_frame_height">56dip</dimen>    
     
-    <!-- Dimensions for a list item -->
-    <dimen name="list_item_padding_top">4dip</dimen>    
-    <dimen name="list_item_padding_right">11dip</dimen>    
-    <dimen name="list_item_padding_bottom">4dip</dimen>    
-    <dimen name="list_item_padding_left">4dip</dimen>    
-    <dimen name="list_item_gap_between_image_and_text">8dip</dimen>    
-    <dimen name="list_item_gap_between_label_and_data">5dip</dimen>    
-    <dimen name="list_item_call_button_padding">14dip</dimen>    
-    <dimen name="list_item_vertical_divider_margin">5dip</dimen>    
-    <dimen name="list_item_presence_icon_margin">5dip</dimen>    
-    <dimen name="list_item_header_text_width">56dip</dimen>    
+    <dimen name="aggregation_suggestion_icon_size">40dip</dimen>
+
+    <!-- Size of the text in the aizy visual scroll control -->
+    <dimen name="aizy_text_size">13dip</dimen>
+    <dimen name="aizy_preview_width">80dip</dimen>
+    <dimen name="aizy_preview_height">80dip</dimen>
+    
+    <!-- Padding of the rounded plus/minus buttons in the editor (the minus button is created
+    in code) -->
+    <dimen name="editor_round_button_padding_left">5dip</dimen>
+    <dimen name="editor_round_button_padding_right">5dip</dimen>
+    <dimen name="editor_round_button_padding_top">10dip</dimen>
+    <dimen name="editor_round_button_padding_bottom">10dip</dimen>
+
+    <!-- Width of the Type-Label in the Editor -->
+    <dimen name="editor_type_label_width">150dip</dimen>
 </resources>
diff --git a/res/values/donottranslate_config.xml b/res/values/donottranslate_config.xml
index f1c6951..e41e153 100644
--- a/res/values/donottranslate_config.xml
+++ b/res/values/donottranslate_config.xml
@@ -18,6 +18,9 @@
 -->
 
 <resources>
+    <!-- Indicates whether the dialer activity is enabled in the build -->
+    <bool name="dialerEnabled">true</bool>
+
     <!-- Flag indicating whether Contacts app is allowed to import contacts from SDCard -->
     <bool name="config_allow_import_from_sdcard">true</bool>
     <!-- If true, all vcard files are imported from SDCard without asking a user.
@@ -53,7 +56,7 @@
     <string name="config_export_vcard_type" translatable="false">default</string>
 
     <!-- Directory in which exported VCard file is stored -->
-    <string name="config_export_dir" translatable="false">/sdcard</string>
+    <string name="config_export_dir" translatable="false">/mnt/sdcard</string>
 
     <!-- Prefix of exported VCard file -->
     <string name="config_export_file_prefix" translatable="false"></string>
diff --git a/res/values/ids.xml b/res/values/ids.xml
index ceb10f8..1b381ab 100644
--- a/res/values/ids.xml
+++ b/res/values/ids.xml
@@ -14,32 +14,50 @@
      limitations under the License.
 -->
 <resources>
-    <!-- The EditText for entries in the EditContactActivity -->
+    <!-- The EditText for entries in the ContactEditFragment -->
     <item type="id" name="data"/>
     <item type="id" name="header_phones"/>
     <item type="id" name="dialog_sync_add"/>
     <item type="id" name="dialog_import_export"/>
 
-    <!-- For ImportVCardActivity -->
+    <!-- For vcard.ImportVCardActivity -->
     <item type="id" name="dialog_searching_vcard"/>
     <item type="id" name="dialog_sdcard_not_found"/>
     <item type="id" name="dialog_vcard_not_found"/>
     <item type="id" name="dialog_select_import_type"/>
     <item type="id" name="dialog_select_one_vcard"/>
     <item type="id" name="dialog_select_multiple_vcard"/>
-    <item type="id" name="dialog_reading_vcard"/>
+    <item type="id" name="dialog_cache_vcard"/>
     <item type="id" name="dialog_io_exception"/>
     <item type="id" name="dialog_error_with_message"/>
 
-    <!-- For ContactsListActivity -->
-    <item type="id" name="dialog_delete_contact_confirmation"/>
-    <item type="id" name="dialog_readonly_contact_hide_confirmation"/>
-    <item type="id" name="dialog_multiple_contact_delete_confirmation"/>
-    <item type="id" name="dialog_readonly_contact_delete_confirmation"/>
+    <!-- For vcard.CancelImportActivity -->
+    <item type="id" name="dialog_cancel_import_confirmation"/>
 
-    <!-- For ExportVCard -->
+    <!-- For ContactDeletionInteraction -->
+    <item type="id" name="dialog_delete_contact_confirmation"/>
+
+    <!-- For ImportExportInteraction -->
+    <item type="id" name="dialog_import_export_options"/>
+
+    <!-- For ExportVCardActivity -->
     <item type="id" name="dialog_export_confirmation"/>
     <item type="id" name="dialog_exporting_vcard"/>
     <item type="id" name="dialog_fail_to_export_with_reason"/>
 
+    <!-- For PhoneNumberInteraction -->
+    <item type="id" name="dialog_phone_number_call_disambiguation"/>
+
+    <!-- For PhoneNumberMessageSendInteraction -->
+    <item type="id" name="dialog_phone_number_message_disambiguation"/>
+
+    <!-- Dialog Manager Ids -->
+    <item type="id" name="dialog_manager_id_1"/>
+    <item type="id" name="dialog_manager_id_2"/>
+
+    <!-- ContactDetailFragment ContextMenu Ids -->
+    <item type="id" name="menu_detail_makeDefault" />
+
+    <!-- Loader ID for contact filters -->
+    <item type="id" name="contact_list_filter_loader" />
 </resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5d275aa..cd39508 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -47,6 +47,9 @@
     <!-- Activity title when the user is selecting a contact for a direct message shortcut. -->
     <string name="messageShortcutActivityTitle">Choose a number to message</string>
 
+    <!-- Activity title when the user is selecting a contact.  [CHAR LIMIT=128] -->
+    <string name="contactPickerActivityTitle">Select a contact</string>
+
     <!-- Title for the activity that shows only starred contacts -->
     <string name="starredList">Starred</string>
 
@@ -68,6 +71,12 @@
          editing a contact. This string represents the built in way to edit the contact. -->
     <string name="editContactDescription">Edit contact</string>
 
+    <!-- The caption in the edit-email screen -->
+    <string name="edit_email_caption">Email address:</string>
+
+    <!-- The caption of the custom type -->
+    <string name="edit_email_type_caption">Type:</string>
+
     <!-- The description presented to the user in the Intent choose when there are multiple activities that allow
          creating a new contact. This string represents the built in way to create the contact. -->
     <string name="insertContactDescription">Create contact</string>
@@ -219,9 +228,6 @@
          list that allows the user to create a new contact, which this string is used for -->
     <string name="pickerNewContactHeader">Create new contact</string>
 
-    <!-- Dialog title when you select a label when creating or edit a contact -->
-    <string name="selectLabel">Select label</string>
-
     <!-- Header that expands to list all of the types of phone numbers when editing or creating a phone number for a contact -->
     <string name="phoneLabelsGroup">Phone</string>
 
@@ -232,7 +238,7 @@
     <string name="imLabelsGroup">IM</string>
 
     <!-- Header that expands to list all of the types of postal addresses when editing or creating an postal address for a contact -->
-    <string name="postalLabelsGroup">Postal address</string>
+    <string name="postalLabelsGroup">Address</string>
 
     <!-- The order of the items below is important, don't reorder without changing EditContactActivity.java -->
     <skip/>
@@ -254,12 +260,6 @@
          For example, this may be used to set a phone number's label to "Vaction house" -->
     <string name="customLabelPickerTitle">Custom label name</string>
 
-    <!-- The menu item to open the list of groups to display -->
-    <string name="menu_displayGroup">Display options</string>
-
-    <!-- Title of activity that lets user pick which contact groups to display -->
-    <string name="displayGroups">Display options</string>
-
     <!-- Check box label that allows calls to the contact to be sent directly to voicemail -->
     <string name="send_to_voicemail_checkbox">Send calls directly to voicemail</string>
 
@@ -314,8 +314,8 @@
 
     <!-- Displayed at the top of the contacts showing the total number of contacts visible when "Only contacts with phones" is selected -->
     <plurals name="listTotalPhoneContacts">
-        <item quantity="one">Displaying 1 contact with phone number</item>
-        <item quantity="other">Displaying <xliff:g id="count">%d</xliff:g> contacts with phone numbers</item>
+        <item quantity="one">1 contact with phone number</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> contacts with phone numbers</item>
     </plurals>
 
     <!-- Displayed at the top of the contacts showing the zero as total number of contacts visible when "Only contacts with phones" is selected -->
@@ -323,8 +323,8 @@
 
     <!-- Displayed at the top of the contacts showing the total number of contacts visible when "Only contacts with phones" not selected -->
     <plurals name="listTotalAllContacts">
-        <item quantity="one">Displaying 1 contact</item>
-        <item quantity="other">Displaying <xliff:g id="count">%d</xliff:g> contacts</item>
+        <item quantity="one">1 contact</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> contacts</item>
     </plurals>
 
     <!-- Displayed at the top of the contacts showing the zero total number of contacts visible when "Only contacts with phones" not selected -->
@@ -332,17 +332,20 @@
 
     <!-- Displayed at the top of the contacts showing the total number of contacts found when "Only contacts with phones" not selected -->
     <plurals name="listFoundAllContacts">
-        <item quantity="one">Found 1 contact</item>
-        <item quantity="other">Found <xliff:g id="count">%d</xliff:g> contacts</item>
+        <item quantity="one">1 found</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> found</item>
     </plurals>
 
+    <!-- Displayed at the top of search results indicating that more contacts were found than shown [CHAR LIMIT=64] -->
+    <string name="foundTooManyContacts">more than <xliff:g id="count">%d</xliff:g> found</string>
+
     <!-- Displayed at the top of the contacts showing the zero total number of contacts found when "Only contacts with phones" not selected -->
-    <string name="listFoundAllContactsZero">Contact not found</string>
+    <string name="listFoundAllContactsZero">Not found</string>
 
     <!-- Displayed at the top of the contacts showing the total number of contacts found when typing search query -->
     <plurals name="searchFoundContacts">
-        <item quantity="one">1 contact</item>
-        <item quantity="other"><xliff:g id="count">%d</xliff:g> contacts</item>
+        <item quantity="one">1 found</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> found</item>
     </plurals>
 
     <!-- The description text for the contacts tab. Space is limited for this string, so the shorter the better -->
@@ -431,7 +434,7 @@
     <string name="noContactsHelpText">"You don't have any contacts to display.\n\nTo add contacts, press <font fgcolor="#ffffffff"><b>Menu</b></font> and touch:\n
         \n<li><font fgcolor="#ffffffff"><b>Accounts</b></font> to add or configure an account with contacts you can sync to the phone\n</li>
         \n<li><font fgcolor="#ffffffff"><b>New contact</b></font> to create a new contact from scratch\n</li>
-        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font>\n</li>"
+        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font> to import contacts from your SIM or SD card\n</li>"
     </string>
 
     <!-- Displayed full screen when the user has no contacts and they are displaying the My Contacts group, and contact syncing is enabled -->
@@ -439,14 +442,14 @@
         \n<li><font fgcolor="#ffffffff"><b>Accounts</b></font> to add or configure an account with contacts you can sync to the phone\n</li>
         \n<li><font fgcolor="#ffffffff"><b>Display options</b></font> to change which contacts are visible\n</li>
         \n<li><font fgcolor="#ffffffff"><b>New contact</b></font> to create a new contact from scratch\n</li>
-        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font>\n</li>"
+        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font> to import contacts from your SIM or SD card\n</li>"
     </string>
 
     <!-- Displayed full screen when the user has no contacts and they are displaying the My Contacts group, and contact syncing is disabled, and there is no sim card (cdma)-->
     <string name="noContactsNoSimHelpText">"You don't have any contacts to display.\n\nTo add contacts, press <font fgcolor="#ffffffff"><b>Menu</b></font> and touch:\n
         \n<li><font fgcolor="#ffffffff"><b>Accounts</b></font> to add or configure an account with contacts you can sync to the phone\n</li>
         \n<li><font fgcolor="#ffffffff"><b>New contact</b></font> to create a new contact from scratch\n</li>
-        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font>\n</li>"
+        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font> to import contacts from your SD card\n</li>"
     </string>
 
     <!-- Displayed full screen when the user has no contacts and they are displaying the My Contacts group, and contact syncing is enabled, and there is no sim card (cdma) -->
@@ -454,7 +457,7 @@
         \n<li><font fgcolor="#ffffffff"><b>Accounts</b></font> to add or configure an account with contacts you can sync to the phone\n</li>
         \n<li><font fgcolor="#ffffffff"><b>Display options</b></font> to change which contacts are visible\n</li>
         \n<li><font fgcolor="#ffffffff"><b>New contact</b></font> to create a new contact from scratch\n</li>
-        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font>\n</li>"
+        \n<li><font fgcolor="#ffffffff"><b>Import/Export</b></font> to import contacts from your SD card\n</li>"
     </string>
 
     <!-- Displayed full screen when the user has no favorites and they are displaying the favorites tab -->
@@ -519,7 +522,7 @@
     <string name="returnCall">Return call</string>
 
     <!-- A nicely formatted call duration displayed when viewing call details. For example "42 mins 28 secs" -->
-    <string name="callDetailsDurationFormat"><xliff:g id="minutes" example="42">%1$s</xliff:g> mins <xliff:g id="seconds" example="28">%2$s</xliff:g> secs</string>
+    <string name="callDetailsDurationFormat"><xliff:g id="minutes" example="42">%s</xliff:g> mins <xliff:g id="seconds" example="28">%s</xliff:g> secs</string>
 
     <!-- A list separator for the Favorites tab indicating that items below it are frequently contacted contacts rather than starred contacts -->
     <string name="favoritesFrquentSeparator">Frequently contacted</string>
@@ -669,7 +672,7 @@
     <!-- Dialog message shown when SDcard does not exist -->
     <string name="no_sdcard_message" product="default">No SD card detected</string>
 
-    <!-- Dialog title shown when searching VCard data from SD Card -->
+    <!-- Dialog title shown when searching vCard data from SD Card -->
     <string name="searching_vcard_title">Searching for vCard</string>
 
     <!-- Action string for selecting SIM for importing contacts -->
@@ -724,6 +727,10 @@
          emitted some I/O error. Exact reason will be appended by the system. -->
     <string name="fail_reason_io_error">I/O Error</string>
 
+    <!-- Failure reason show when Contacts app (especially vCard importer) encountered
+         low memory problem and could not proceed its import procedure. -->
+    <string name="fail_reason_low_memory_during_import">Memory is insufficient (the file may be too large)</string>
+
     <!-- The failed reason shown when vCard parser was not able to be parsed by the current vCard
          implementation. This might happen even when the input vCard is completely valid, though
          we believe it is rather rare in the actual world. -->
@@ -742,6 +749,9 @@
          (with extension ".vcf" in SDCard.) -->
     <string name="fail_reason_no_vcard_file" product="default">No vCard file found on the SD card</string>
 
+    <!-- Fail reason shown when vCard importer failed to look over meta information stored in vCard file(s). -->
+    <string name="fail_reason_failed_to_collect_vcard_meta_info">Failed to collect meta information of given vCard file(s).</string>
+
     <!-- The failed reason shown when the import of some of vCard files failed during multiple vCard
          files import. It includes the case where all files were failed to be imported. -->
     <string name="fail_reason_failed_to_read_files">One or more files failed to be imported (%s).</string>
@@ -749,28 +759,51 @@
     <!-- The failed reason which should not be shown but it may in some buggy condition. -->
     <string name="fail_reason_unknown">Unknown error</string>
 
-    <!-- Dialog title shown when a user is asked to select VCard file -->
+    <!-- Dialog title shown when a user is asked to select vCard file -->
     <string name="select_vcard_title">Select vCard file</string>
 
-    <!-- The message shown while reading a vCard file/entry. The first argument is like
-    "Reading VCard" or "Reading VCard files" and the second is the display name of the current
-    data being parsed -->
-    <string name="progress_shower_message"><xliff:g id="action" example="Reading VCard">%1$s</xliff:g>\n<xliff:g id="filename" example="foo.vcf">%2$s</xliff:g></string>
+    <!-- The title shown when vCard importer is caching files to be imported into local temporary
+         data storage. -->
+    <string name="caching_vcard_title">Caching vCard(s) to local temporary storage</string>
 
-    <!-- Dialog title shown when reading VCard data -->
-    <string name="reading_vcard_title">Reading vCard</string>
+    <!-- The message shown when vCard importer is caching files to be imported into local temporary
+         data storage. -->
+    <string name="caching_vcard_message">Importer is caching vCard(s) to local temporary storage. Actual import will start soon.</string>
 
-    <!-- Dialog message shown when reading a VCard file -->
-    <string name="reading_vcard_message">Reading vCard file(s)</string>
+    <!-- The message shown while importing vCard(s).
+         First argument is current index of contacts to be imported.
+         Second argument is the total number of contacts.
+         Third argument is the name of a contact which is being read.
+         [CHAR LIMIT=20] -->
+    <string name="progress_notifier_message">Importing <xliff:g id="current_number">%s</xliff:g>/<xliff:g id="total_number">%s</xliff:g>: <xliff:g id="name" example="Joe Due">%s</xliff:g></string>
 
-    <!-- Dialog title shown when reading VCard data failed -->
-    <string name="reading_vcard_failed_title">Reading of vCard data has failed</string>
+    <!-- Description shown when importing vCard data.
+         The argument is the name of a contact which is being read.
+         [CHAR LIMIT=20] -->
+    <string name="importing_vcard_description">Importing <xliff:g id="name" example="Joe Due">%s</xliff:g></string>
 
-    <!-- Message while reading one vCard file "(current number) of (total number) contacts" The order of "current number" and "total number" cannot be changed (like "total: (total number), current: (current number)")-->
-    <string name="reading_vcard_contacts"><xliff:g id="current_number">%1$s</xliff:g> of <xliff:g id="total_number">%2$s</xliff:g> contacts</string>
+    <!-- Dialog title shown when reading vCard data failed [CHAR LIMIT=40] -->
+    <string name="reading_vcard_failed_title">Failed to Read vCard data</string>
 
-    <!-- Message while reading multiple vCard files "(current number) of (total number) files" The order of "current number" and "total number" cannot be changed (like "total: (total number), current: (current number)")-->
-    <string name="reading_vcard_files"><xliff:g id="current_number">%1$s</xliff:g> of <xliff:g id="total_number">%2$s</xliff:g> files</string>
+    <!-- The title shown when reading vCard is canceled (probably by a user)
+         [CHAR LIMIT=40] -->
+    <string name="reading_vcard_canceled_title">Reading vCard data was canceled</string>
+
+    <!-- The title shown when reading vCard finished -->
+    <string name="importing_vcard_finished_title">Finished importing vCard</string>
+
+    <!-- The title shown when importing vCard is canceled (probably by a user)
+         [CHAR LIMIT=40] -->
+    <string name="importing_vcard_canceled_title">Reading vCard data was canceled</string>
+
+    <!-- The message shown when vCard importer started running. -->
+    <string name="vcard_importer_start_message">vCard importer started.</string>
+
+    <!-- The message shown when additional vCard to be imported is given during the import for others -->
+    <string name="vcard_importer_will_start_message">vCard importer will import the vCard after a while.</string>
+
+    <!-- The percentage, used for expressing the progress of vCard import/export. -->
+    <string name="percentage">%s%%</string>
 
     <!-- Dialog title shown when a user confirms whether he/she export Contact data -->
     <string name="confirm_export_title">Confirm export</string>
@@ -801,6 +834,12 @@
          mention it here. -->
     <string name="fail_reason_too_long_filename">Required filename is too long (\"<xliff:g id="filename">%s</xliff:g>\")</string>
 
+    <!-- The message shown when vCard importer started running. -->
+    <string name="vcard_exporter_start_message">vCard exporter started.</string>
+
+    <!-- The title shown when reading vCard is canceled (probably by a user) -->
+    <string name="exporting_vcard_finished_title">Finished exporting vCard</string>
+
     <!-- Dialog title shown when the application is exporting contact data outside -->
     <string name="exporting_contact_list_title">Exporting contact data</string>
 
@@ -831,10 +870,19 @@
 
     <!-- The failed reason shown when vCard importer/exporter could not open the file
          specified by a user. The file name should be in the message. -->
-    <string name="fail_reason_could_not_open_file">Could not open \"<xliff:g id="file_name">%1$s</xliff:g>\": <xliff:g id="exact_reason">%2$s</xliff:g></string>
+    <string name="fail_reason_could_not_open_file">Could not open \"<xliff:g id="file_name">%s</xliff:g>\": <xliff:g id="exact_reason">%s</xliff:g></string>
 
     <!-- Message in progress bar while exporting contact list to a file "(current number) of (total number) contacts" The order of "current number" and "total number" cannot be changed (like "total: (total number), current: (current number)")-->
-    <string name="exporting_contact_list_progress"><xliff:g id="current_number">%1$s</xliff:g> of <xliff:g id="total_number">%2$s</xliff:g> contacts</string>
+    <string name="exporting_contact_list_progress"><xliff:g id="current_number">%s</xliff:g> of <xliff:g id="total_number">%s</xliff:g> contacts</string>
+
+    <!-- Title shown in a Dialog confirming a user's cancel request toward existing vCard import. [CHAR LIMIT=40] -->
+    <string name="cancel_import_confirmation_title">Canceling import vCard</string>
+
+    <!-- Message shown in a Dialog confirming a user's cancel request toward existing vCard import.
+         The argument is the Uri for the vCard import the user wants to cancel.
+         [CHAR LIMIT=70]
+      -->
+    <string name="cancel_import_confirmation_message">Are you sure to cancel importing vCard?</string>
 
     <!-- The string used to describe Contacts as a searchable item within system search settings. -->
     <string name="search_settings_description">Names of your contacts</string>
@@ -895,6 +943,8 @@
     <string name="websiteLabelsGroup">Website</string>
     <!-- Header that expands to list all event types when editing an event of a contact -->
     <string name="eventLabelsGroup">Event</string>
+    <!-- Header for the list of all groups for a contact -->
+    <string name="groupsLabel">Groups</string>
 
     <!-- Single-character overlay for home phone numbers when creating desktop shortcuts -->
     <string name="type_short_home">H</string>
@@ -1066,6 +1116,8 @@
     <!-- Generic action string for starting an IM chat -->
     <string name="chat">Chat</string>
 
+    <!-- Field title for the full postal address of a contact [CHAR LIMIT=64]-->
+    <string name="postal_address">Address</string>
     <!-- Field title for the street of a structured postal address of a contact -->
     <string name="postal_street">Street</string>
     <!-- Field title for the PO box of a structured postal address of a contact -->
@@ -1081,6 +1133,8 @@
     <!-- Field title for the country of a structured postal address of a contact -->
     <string name="postal_country">Country</string>
 
+    <!-- Field title for the full name of a contact [CHAR LIMIT=64]-->
+    <string name="full_name">Name</string>
     <!-- Field title for the given name of a contact -->
     <string name="name_given">Given name</string>
     <!-- Field title for the family name of a contact -->
@@ -1104,6 +1158,9 @@
     <!-- String describing which account a contact came from when editing it -->
     <string name="from_account_format">from <xliff:g id="source" example="user@gmail.com">%1$s</xliff:g></string>
 
+    <!-- String describing both account type and account name -->
+    <string name="account_type_and_name"><xliff:g id="source" example="Gmail">%1$s</xliff:g> contact from <xliff:g id="source" example="user@gmail.com">%2$s</xliff:g></string>
+
     <!-- Checkbox asking the user if they want to display a particular photo for a contact -->
     <string name="use_photo_as_primary">Use this photo</string>
 
@@ -1165,4 +1222,152 @@
 
     <!-- Title shown in the search result activity of contacts app while searching -->
     <string name="search_results_searching">Searching...</string>
+
+    <!-- Message of progress dialog for multiple picker -->
+    <string name="adding_recipients">"Loading \u2026"</string>
+
+    <!-- Label to display only selection in multiple picker -->
+    <string name="menu_display_selected">"Show selected"</string>
+
+    <!-- Label to display all recipients in multiple picker -->
+    <string name="menu_display_all">"Show all"</string>
+
+    <!-- Label to select all contacts in multiple picker -->
+    <string name="menu_select_all">"Select all"</string>
+
+    <!-- Label to clear all selection in multiple picker -->
+    <string name="menu_select_none">"Unselect all"</string>
+
+    <!-- Label to display how many selected in multiple picker -->
+    <plurals name="multiple_picker_title">
+        <!-- number of selected recipients is one -->
+        <item quantity="one">"1 recipient selected"</item>
+        <!-- number of selected recipients is not equal to one -->
+        <item quantity="other"><xliff:g id="count">%d</xliff:g>" recipients selected"</item>
+    </plurals>
+
+    <!-- Separator label to display unknown recipients in multiple picker -->
+    <string name="unknown_contacts_separator">"Unknown contacts"</string>
+
+    <!-- The text displayed when the contacts list is empty while displaying only selected contacts in multiple picker -->
+    <string name="no_contacts_selected">"No contacts selected."</string>
+
+    <!-- The add field button shown in the editor under each editable Raw Contact -->
+    <string name="add_field">Add information</string>
+
+    <!-- Attbution of a contact status update, when the time of update is unknown -->
+    <string name="contact_status_update_attribution">via <xliff:g id="source" example="Google Talk">%1$s</xliff:g></string>
+
+    <!-- Attbution of a contact status update, when the time of update is known -->
+    <string name="contact_status_update_attribution_with_date"><xliff:g id="date" example="3 hours ago">%1$s</xliff:g> via <xliff:g id="source" example="Google Talk">%2$s</xliff:g></string>
+
+    <!-- String describing the Edit push button
+
+         Used by AccessibilityService to announce the purpose of the view.
+    -->
+    <string name="description_edit">edit</string>
+
+    <!-- String describing the Star/Favorite checkbox
+
+         Used by AccessibilityService to announce the purpose of the view.
+    -->
+    <string name="description_star">favorite</string>
+
+    <!-- The title of the Edit-Contact screen -->
+    <string name="edit_contact">Edit contact</string>
+
+    <!-- Shows how many contacts have been merged. The value 1 is not shown but should be translated
+         anyway if we change our mind later -->
+    <plurals name="merge_info">
+        <item quantity="one">not merged</item>
+        <item quantity="other">merged from <xliff:g id="count">%0$d</xliff:g> sources</item>
+    </plurals>
+
+    <!-- Command to delete a RawContact (a Fragment of a Contact) -->
+    <string name="edit_delete_rawcontact">Delete</string>
+
+    <!-- Shown in a Toast to indicate an error while trying to save the Data -->
+    <string name="edit_error_saving">Error saving</string>
+
+    <!-- Text in the editor to show the structured editor -->
+    <string name="edit_structured_editor_button">...</string>
+
+    <!-- The name of the invisible local contact directory -->
+    <string name="local_invisible_directory">Other</string>
+
+    <!-- The heading of the contact aggregation suggestions section in Contact editor. [CHAR LIMIT=128]-->
+    <plurals name="aggregation_suggestion_title">
+        <item quantity="one">Similar contact</item>
+        <item quantity="other">Similar contacts</item>
+    </plurals>
+
+    <!-- The heading of the aggregation suggestion section of the Contact editor
+        indicating the contact that will be joined with the current contact. [CHAR LIMIT=128]-->
+    <string name="aggregation_suggestion_joined_title">Joined contact:</string>
+
+    <!-- The button next to a contact aggregation suggestion in Contact editor. Causes a logical
+      join with the suggested contact. [CHAR LIMIT=12]-->
+    <string name="aggregation_suggestion_join_button">Join</string>
+
+    <!-- The button next to a contact aggregation suggestion in Contact editor. Causes the UI
+    to switch to the suggested contact in the editor. [CHAR LIMIT=12]-->
+    <string name="aggregation_suggestion_edit_button">Edit</string>
+
+    <!-- The menu item (or button) that creates a local copy of a corporate contact. [CHAR LIMIT=40]-->
+    <string name="menu_copyContact">Copy to my contacts</string>
+
+    <!-- The description of the directory where the contact was found [CHAR LIMIT=100]-->
+    <string name="contact_directory_description">from <xliff:g id="type" example="Corporate Directory">%1$s</xliff:g></string>
+
+    <!-- The description of the directory where the contact was found [CHAR LIMIT=100]-->
+    <string name="contact_directory_account_description">from <xliff:g id="type" example="Corporate Directory">%1$s</xliff:g> (<xliff:g id="name" example="me@acme.com">%2$s</xliff:g>)</string>
+
+    <!-- The label displayed in the Contacts action bar when in search mode [CHAR LIMIT=64] -->
+    <string name="search_label">Searching all contacts</string>
+
+    <!-- The label in section header in the contact list for a contact directory [CHAR LIMIT=128] -->
+    <string name="directory_search_label">Directory</string>
+
+    <!-- The label in section header in the contact list for a local contacts [CHAR LIMIT=128] -->
+    <string name="local_search_label">Contacts</string>
+
+    <!-- Toast shown when creating a personal copy of a contact [CHAR LIMIT=100] -->
+    <string name="toast_making_personal_copy">Creating a personal copy</string>
+
+    <!-- Prompt for selection of a contact list filter [CHAR LIMIT=64] -->
+    <string name="list_filter_prompt">Choose contact list</string>
+
+    <!-- Contact list filter label indicating that the list is showing all available accounts [CHAR LIMIT=64] -->
+    <string name="list_filter_all_accounts">All contacts</string>
+
+    <!-- Contact list filter label indicating that the list is showing all starred contacts [CHAR LIMIT=64] -->
+    <string name="list_filter_all_starred">Starred</string>
+
+    <!-- Contact list filter label indicating that the list is showing starred contacts for the account [CHAR LIMIT=64] -->
+    <string name="list_filter_starred">Starred</string>
+
+    <!-- Contact list filter indicating that the list shows groups chosen by the user [CHAR LIMIT=64] -->
+    <string name="list_filter_custom">Custom</string>
+
+    <!-- Contact list filter selection indicating that the list shows groups chosen by the user [CHAR LIMIT=64] -->
+    <string name="list_filter_customize">Customize...</string>
+
+    <!-- Contact list filter selection indicating that the list shows all contacts with phone numbers [CHAR LIMIT=64] -->
+    <string name="list_filter_phones">Contacts with phone numbers</string>
+
+    <!-- Title of the activity that allows the user to customize filtering of contact list [CHAR LIMIT=128] -->
+    <string name="custom_list_filter">Define custom view</string>
+
+    <!-- Title of the settings activity [CHAR LIMIT=64] -->
+    <string name="activity_title_settings">Settings</string>
+
+    <!-- Menu item for the settings activity [CHAR LIMIT=64] -->
+    <string name="menu_settings">Settings</string>
+
+    <!-- The preference section title for contact display options [CHAR LIMIT=128] -->
+    <string name="preference_displayOptions">Display options</string>
+
+    <!-- Text used to show a organization that has both a company and title. This is used in the Detail-View
+    of a Contact. This is mostly about the formatting of the two elements, so it should be kept small [CHAR LIMIT=79] -->
+    <string name="organization_company_and_title"><xliff:g id="company" example="Technical Program Manager">%2$s</xliff:g>, <xliff:g id="company" example="Google Inc.">%1$s</xliff:g></string>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index ad4f4f6..5f64e27 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -24,16 +24,9 @@
         <item name="android:windowAnimationStyle">@style/ContactsSearchAnimation</item>
     </style>
 
-    <style name="MinusButton">
+    <!-- TODO: Once there are assets for More/Less buttons, remove these styles -->
+    <style name="EmptyButton">
         <item name="android:background">@drawable/btn_circle</item>
-        <item name="android:src">@drawable/ic_btn_round_minus</item>
-        <item name="android:contentDescription">@string/description_minus_button</item>
-    </style>
-
-    <style name="PlusButton">
-        <item name="android:background">@drawable/btn_circle</item>
-        <item name="android:src">@drawable/ic_btn_round_plus</item>
-        <item name="android:contentDescription">@string/description_plus_button</item>
     </style>
 
     <style name="MoreButton">
@@ -46,7 +39,13 @@
         <item name="android:src">@drawable/ic_btn_round_less</item>
     </style>
 
-    <style name="TallTitleBarTheme" parent="android:Theme.NoTitleBar">
+    <style name="CallDetailActivityTheme" parent="android:Theme.NoTitleBar">
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+    <style name="ContactDetailActivityTheme" parent="android:Theme.NoTitleBar">
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+    <style name="ContactEditorActivityTheme" parent="android:Theme.NoTitleBar">
         <item name="android:windowContentOverlay">@null</item>
     </style>
 
@@ -97,7 +96,119 @@
         <item name="android:windowExitAnimation">@anim/search_bar_exit</item>
     </style>
 
+    <style name="AizyPreviewPopupAnimation"> 
+        <item name="android:windowEnterAnimation">@anim/aizy_preview_popup_enter</item> 
+        <item name="android:windowExitAnimation">@anim/aizy_preview_popup_exit</item> 
+    </style> 
+
     <style name="DummyAnimation">
         <item name="android:windowExitAnimation">@anim/dummy_animation</item>
     </style>
+
+    <declare-styleable name="ContactBrowser">
+        <attr name="contact_filter_popup_width" format="dimension"/>
+    </declare-styleable>
+
+    <declare-styleable name="ContactListItemView">
+        <!-- An attribute that specifies a custom drawable for the pressed state in the contact list-->
+        <attr name="pressedBackground" format="reference"/>
+        <attr name="section_header_background" format="reference"/>
+        <attr name="list_item_divider" format="reference"/>
+        <attr name="list_item_padding_top" format="dimension"/>
+        <attr name="list_item_padding_right" format="dimension"/>
+        <attr name="list_item_padding_bottom" format="dimension"/>
+        <attr name="list_item_padding_left" format="dimension"/>
+        <attr name="list_item_gap_between_image_and_text" format="dimension"/>
+        <attr name="list_item_gap_between_label_and_data" format="dimension"/>
+        <attr name="list_item_call_button_padding" format="dimension"/>
+        <attr name="list_item_vertical_divider_margin" format="dimension"/>
+        <attr name="list_item_presence_icon_margin" format="dimension"/>
+        <attr name="list_item_header_text_width" format="dimension"/>
+        <attr name="list_item_photo_size" format="dimension"/>
+        <attr name="list_item_prefix_highlight_color" format="color"/>
+    </declare-styleable>
+
+    <declare-styleable name="MultiplePhonePickerItemView">
+        <attr name="list_item_header_chip_width" format="dimension"/>
+        <attr name="list_item_header_chip_right_margin" format="dimension"/>
+        <attr name="list_item_header_checkbox_margin" format="dimension"/>
+    </declare-styleable>
+
+    <style name="ContactBrowserTheme" parent="@android:Theme">
+        <item name="pressedBackground">@*android:drawable/list_selector_background</item>
+        <item name="section_header_background">@drawable/section_header</item>
+        <item name="list_item_divider">@drawable/list_item_divider</item>
+        <item name="list_item_padding_top">4dip</item>
+        <item name="list_item_padding_right">11dip</item>
+        <item name="list_item_padding_bottom">4dip</item>
+        <item name="list_item_padding_left">4dip</item>
+        <item name="list_item_gap_between_image_and_text">8dip</item>
+        <item name="list_item_gap_between_label_and_data">5dip</item>
+        <item name="list_item_call_button_padding">14dip</item>
+        <item name="list_item_vertical_divider_margin">5dip</item>
+        <item name="list_item_presence_icon_margin">5dip</item>
+        <item name="list_item_header_text_width">56dip</item>
+        <item name="list_item_photo_size">56dip</item>
+        <item name="list_item_prefix_highlight_color">#729a27</item>
+        <item name="contact_filter_popup_width">320dip</item>
+    </style>
+
+    <style name="ContactPickerTheme" parent="@android:Theme">
+        <item name="section_header_background">@drawable/section_header</item>
+        <item name="list_item_divider">@drawable/list_item_divider</item>
+        <item name="list_item_padding_top">4dip</item>
+        <item name="list_item_padding_right">11dip</item>
+        <item name="list_item_padding_bottom">4dip</item>
+        <item name="list_item_padding_left">4dip</item>
+        <item name="list_item_gap_between_image_and_text">8dip</item>
+        <item name="list_item_gap_between_label_and_data">5dip</item>
+        <item name="list_item_call_button_padding">14dip</item>
+        <item name="list_item_vertical_divider_margin">5dip</item>
+        <item name="list_item_presence_icon_margin">5dip</item>
+        <item name="list_item_header_text_width">56dip</item>
+        <item name="list_item_photo_size">56dip</item>
+        <item name="list_item_prefix_highlight_color">#729a27</item>
+        <item name="list_item_header_chip_width">4dip</item>
+        <item name="list_item_header_chip_right_margin">4dip</item>
+        <item name="list_item_header_checkbox_margin">5dip</item>
+    </style>
+
+    <style name="SocialWidgetConfigureTheme" parent="ContactPickerTheme">
+    </style>
+
+    <style name="JoinContactActivityTheme" parent="ContactPickerTheme">
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
+
+    <style name="ContactsPreferencesTheme" parent="@android:Theme">
+    </style>
+
+    <style name="CustomContactListFilterTheme" parent="@android:Theme">
+    </style>
+
+    <style name="ContactPickerLayout" parent="ContactPickerTheme">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">match_parent</item>
+    </style>
+
+    <style name="CustomContactListFilterView" parent="CustomContactListFilterTheme">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">match_parent</item>
+    </style>
+
+    <declare-styleable name="InterpolatingLayout_Layout">
+        <attr name="layout_narrowParentWidth" format="dimension"/>
+        <attr name="layout_narrowWidth" format="dimension"/>
+        <attr name="layout_narrowLeftMargin" format="dimension"/>
+        <attr name="layout_narrowRightMargin" format="dimension"/>
+        <attr name="layout_wideParentWidth" format="dimension"/>
+        <attr name="layout_wideWidth" format="dimension"/>
+        <attr name="layout_wideLeftMargin" format="dimension"/>
+        <attr name="layout_wideRightMargin" format="dimension"/>
+    </declare-styleable>
+    
+    <style name="DirectoryHeader" parent="ContactBrowserTheme">
+        <item name="android:background">@drawable/directory_bg</item>
+    </style>
 </resources>
diff --git a/res/xml/preference_display_options.xml b/res/xml/preference_display_options.xml
new file mode 100644
index 0000000..a662efa
--- /dev/null
+++ b/res/xml/preference_display_options.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+    <PreferenceCategory
+        android:title="@string/preference_displayOptions">
+        <com.android.contacts.preference.SortOrderPreference
+            android:key="sortOrder"
+            android:title="@string/display_options_sort_list_by"
+            android:dialogTitle="@string/display_options_sort_list_by" />
+
+        <com.android.contacts.preference.DisplayOrderPreference
+            android:key="sortOrder"
+            android:title="@string/display_options_view_names_as"
+            android:dialogTitle="@string/display_options_view_names_as" />
+    </PreferenceCategory>
+</PreferenceScreen>
diff --git a/res/xml/preference_headers.xml b/res/xml/preference_headers.xml
new file mode 100644
index 0000000..ed709fc
--- /dev/null
+++ b/res/xml/preference_headers.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<preference-headers
+    xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <header
+        android:fragment="com.android.contacts.preference.DisplayOptionsPreferenceFragment"
+        android:title="@string/preference_displayOptions" />
+
+</preference-headers>
diff --git a/res/xml/social_widget_info.xml b/res/xml/social_widget_info.xml
new file mode 100644
index 0000000..330ddc7
--- /dev/null
+++ b/res/xml/social_widget_info.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
+    android:minWidth="294dip"
+    android:minHeight="72dip"
+    android:updatePeriodMillis="3600000"
+    android:initialLayout="@layout/social_widget"
+    android:configure="com.android.contacts.socialwidget.SocialWidgetConfigureActivity" >
+</appwidget-provider>
diff --git a/src/com/android/contacts/AttachImage.java b/src/com/android/contacts/AttachImage.java
index 6970842..ba1892a 100644
--- a/src/com/android/contacts/AttachImage.java
+++ b/src/com/android/contacts/AttachImage.java
@@ -36,8 +36,8 @@
 import android.provider.ContactsContract.CommonDataKinds.Photo;
 import android.widget.Toast;
 
-import com.android.contacts.model.ExchangeSource;
-import com.android.contacts.model.GoogleSource;
+import com.android.contacts.model.ExchangeAccountType;
+import com.android.contacts.model.GoogleAccountType;
 
 import java.io.ByteArrayOutputStream;
 import java.util.ArrayList;
@@ -189,8 +189,8 @@
             operations.add(ContentProviderOperation.newAssertQuery(rawContactDataUri)
                     .withSelection(Photo.MIMETYPE + "=? AND "
                             + RawContacts.ACCOUNT_TYPE + " IN (?,?)",
-                            new String[] {Photo.CONTENT_ITEM_TYPE, GoogleSource.ACCOUNT_TYPE,
-                            ExchangeSource.ACCOUNT_TYPE})
+                            new String[] {Photo.CONTENT_ITEM_TYPE, GoogleAccountType.ACCOUNT_TYPE,
+                            ExchangeAccountType.ACCOUNT_TYPE})
                             .withExpectedCount(0).build());
         }
 
diff --git a/src/com/android/contacts/CallContactActivity.java b/src/com/android/contacts/CallContactActivity.java
new file mode 100644
index 0000000..76f0892
--- /dev/null
+++ b/src/com/android/contacts/CallContactActivity.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2009 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 com.android.contacts.interactions.PhoneNumberInteraction;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnDismissListener;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+
+/**
+ * An interstitial activity used when the user selects a QSB search suggestion using
+ * a call button.
+ */
+public class CallContactActivity extends Activity implements OnDismissListener {
+
+    private PhoneNumberInteraction mPhoneNumberInteraction;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        mPhoneNumberInteraction = new PhoneNumberInteraction(this, false, this);
+
+        Uri contactUri = getIntent().getData();
+        if (contactUri == null) {
+            finish();
+        }
+
+        // If we are being invoked with a saved state, rely on Activity to restore it
+        if (savedInstanceState != null) {
+            return;
+        }
+
+        if (Contacts.CONTENT_ITEM_TYPE.equals(getContentResolver().getType(contactUri))) {
+            mPhoneNumberInteraction.startInteraction(contactUri);
+        } else {
+            startActivity(new Intent(Intent.ACTION_CALL_PRIVILEGED, contactUri));
+            finish();
+        }
+    }
+
+    public void onDismiss(DialogInterface dialog) {
+        if (!isChangingConfigurations()) {
+            finish();
+        }
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int id, Bundle args) {
+        return mPhoneNumberInteraction.onCreateDialog(id, args);
+    }
+
+    @Override
+    protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
+        mPhoneNumberInteraction.onPrepareDialog(id, dialog, args);
+    }
+}
diff --git a/src/com/android/contacts/CallDetailActivity.java b/src/com/android/contacts/CallDetailActivity.java
index 9f027bb..b3c68ef 100644
--- a/src/com/android/contacts/CallDetailActivity.java
+++ b/src/com/android/contacts/CallDetailActivity.java
@@ -63,6 +63,7 @@
     private TextView mCallDuration;
 
     private String mNumber = null;
+    private String mDefaultCountryIso;
 
     /* package */ LayoutInflater mInflater;
     /* package */ Resources mResources;
@@ -72,12 +73,14 @@
         CallLog.Calls.DURATION,
         CallLog.Calls.NUMBER,
         CallLog.Calls.TYPE,
+        CallLog.Calls.COUNTRY_ISO,
     };
 
     static final int DATE_COLUMN_INDEX = 0;
     static final int DURATION_COLUMN_INDEX = 1;
     static final int NUMBER_COLUMN_INDEX = 2;
     static final int CALL_TYPE_COLUMN_INDEX = 3;
+    static final int COUNTRY_ISO_COLUMN_INDEX = 4;
 
     static final String[] PHONES_PROJECTION = new String[] {
         PhoneLookup._ID,
@@ -85,12 +88,14 @@
         PhoneLookup.TYPE,
         PhoneLookup.LABEL,
         PhoneLookup.NUMBER,
+        PhoneLookup.NORMALIZED_NUMBER,
     };
     static final int COLUMN_INDEX_ID = 0;
     static final int COLUMN_INDEX_NAME = 1;
     static final int COLUMN_INDEX_TYPE = 2;
     static final int COLUMN_INDEX_LABEL = 3;
     static final int COLUMN_INDEX_NUMBER = 4;
+    static final int COLUMN_INDEX_NORMALIZED_NUMBER = 5;
 
     @Override
     protected void onCreate(Bundle icicle) {
@@ -105,6 +110,7 @@
         mCallTypeIcon = (ImageView) findViewById(R.id.icon);
         mCallTime = (TextView) findViewById(R.id.time);
         mCallDuration = (TextView) findViewById(R.id.duration);
+        mDefaultCountryIso = ContactsUtils.getCurrentCountryIso(this);
 
         getListView().setOnItemClickListener(this);
     }
@@ -126,7 +132,6 @@
                     Intent callIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
                             Uri.fromParts("tel", mNumber, null));
                     startActivity(callIntent);
-                    StickyTabs.saveTab(this, getIntent());
                     return true;
                 }
             }
@@ -150,7 +155,10 @@
                 long date = callCursor.getLong(DATE_COLUMN_INDEX);
                 long duration = callCursor.getLong(DURATION_COLUMN_INDEX);
                 int callType = callCursor.getInt(CALL_TYPE_COLUMN_INDEX);
-
+                String countryIso = callCursor.getString(COUNTRY_ISO_COLUMN_INDEX);
+                if (TextUtils.isEmpty(countryIso)) {
+                    countryIso = mDefaultCountryIso;
+                }
                 // Pull out string in format [relative], [date]
                 CharSequence dateClause = DateUtils.formatDateRange(this, date, date,
                         DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE |
@@ -210,12 +218,14 @@
                             callText = getString(R.string.recentCalls_callNumber,
                                     phonesCursor.getString(COLUMN_INDEX_NAME));
                             mNumber = PhoneNumberUtils.formatNumber(
-                                    phonesCursor.getString(COLUMN_INDEX_NUMBER));
+                                    phonesCursor.getString(COLUMN_INDEX_NUMBER),
+                                    phonesCursor.getString(COLUMN_INDEX_NORMALIZED_NUMBER),
+                                    countryIso);
                             callLabel = Phone.getDisplayLabel(this,
                                     phonesCursor.getInt(COLUMN_INDEX_TYPE),
                                     phonesCursor.getString(COLUMN_INDEX_LABEL)).toString();
                         } else {
-                            mNumber = PhoneNumberUtils.formatNumber(mNumber);
+                            mNumber = PhoneNumberUtils.formatNumber(mNumber, countryIso);
                         }
                     } finally {
                         if (phonesCursor != null) phonesCursor.close();
@@ -241,7 +251,6 @@
                     // to create new contact from this number.
                     if (personUri != null) {
                         Intent viewIntent = new Intent(Intent.ACTION_VIEW, personUri);
-                        StickyTabs.setTab(viewIntent, getIntent());
                         actions.add(new ViewEntry(R.drawable.sym_action_view_contact,
                                 getString(R.string.menu_viewContact), viewIntent));
                     } else {
@@ -364,9 +373,6 @@
         if (view.getTag() instanceof ViewEntry) {
             ViewEntry entry = (ViewEntry) view.getTag();
             if (entry.intent != null) {
-                if (Intent.ACTION_CALL_PRIVILEGED.equals(entry.intent.getAction())) {
-                    StickyTabs.saveTab(this, getIntent());
-                }
                 startActivity(entry.intent);
             }
         }
diff --git a/src/com/android/contacts/Collapser.java b/src/com/android/contacts/Collapser.java
index 3872dfd..d072dce 100644
--- a/src/com/android/contacts/Collapser.java
+++ b/src/com/android/contacts/Collapser.java
@@ -16,7 +16,6 @@
 
 package com.android.contacts;
 
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.ArrayList;
 
@@ -44,7 +43,7 @@
 
     /**
      * Collapses a list of Collapsible items into a list of collapsed items. Items are collapsed
-     * if {@link Collapsible#shouldCollapseWith(Object) return strue, and are collapsed
+     * if {@link Collapsible#shouldCollapseWith(Object)} returns strue, and are collapsed
      * through the {@Link Collapsible#collapseWith(Object)} function implemented by the data item.
      *
      * @param list ArrayList of Objects of type <T extends Collapsible<T>> to be collapsed.
diff --git a/src/com/android/contacts/ContactEntryAdapter.java b/src/com/android/contacts/ContactEntryAdapter.java
deleted file mode 100644
index 34ee505..0000000
--- a/src/com/android/contacts/ContactEntryAdapter.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (C) 2007 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.content.Context;
-import android.net.Uri;
-import android.os.Parcel;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-
-import java.util.ArrayList;
-
-public abstract class ContactEntryAdapter<E extends ContactEntryAdapter.Entry>
-        extends BaseAdapter {
-
-    protected ArrayList<ArrayList<E>> mSections;
-    protected LayoutInflater mInflater;
-    protected Context mContext;
-    protected boolean mSeparators;
-
-    /**
-     * Base class for adapter entries.
-     */
-    public static class Entry {
-        public int type = -1;
-        public String label;
-        public String data;
-        public Uri uri;
-        public long id = 0;
-        public long contactId;
-        public int maxLines = 1;
-        public String mimetype;
-
-        /**
-         * Helper for making subclasses parcelable.
-         */
-        protected void writeToParcel(Parcel p) {
-            p.writeInt(type);
-            p.writeString(label);
-            p.writeString(data);
-            p.writeParcelable(uri, 0);
-            p.writeLong(id);
-            p.writeInt(maxLines);
-            p.writeString(mimetype);
-        }
-
-        /**
-         * Helper for making subclasses parcelable.
-         */
-        protected void readFromParcel(Parcel p) {
-            final ClassLoader loader = getClass().getClassLoader();
-            type = p.readInt();
-            label = p.readString();
-            data = p.readString();
-            uri = p.readParcelable(loader);
-            id = p.readLong();
-            maxLines = p.readInt();
-            mimetype = p.readString();
-        }
-    }
-
-    ContactEntryAdapter(Context context, ArrayList<ArrayList<E>> sections, boolean separators) {
-        mContext = context;
-        mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-        mSections = sections;
-        mSeparators = separators;
-    }
-
-    /**
-     * Resets the section data.
-     *
-     * @param sections the section data
-     */
-    public final void setSections(ArrayList<ArrayList<E>> sections, boolean separators) {
-        mSections = sections;
-        mSeparators = separators;
-        notifyDataSetChanged();
-    }
-
-    /**
-     * Resets the section data and returns the position of the given entry.
-     *
-     * @param sections the section data
-     * @param entry the entry to return the position for
-     * @return the position of entry, or -1 if it isn't found
-     */
-    public final int setSections(ArrayList<ArrayList<E>> sections, E entry) {
-        mSections = sections;
-        notifyDataSetChanged();
-
-        int numSections = mSections.size();
-        int position = 0;
-        for (int i = 0; i < numSections; i++) {
-            ArrayList<E> section = mSections.get(i);
-            int sectionSize = section.size();
-            for (int j = 0; j < sectionSize; j++) {
-                E e = section.get(j);
-                if (e.equals(entry)) {
-                    position += j;
-                    return position;
-                }
-            }
-            position += sectionSize;
-        }
-        return -1;
-    }
-
-    /**
-     * @see android.widget.ListAdapter#getCount()
-     */
-    public final int getCount() {
-        return countEntries(mSections, mSeparators);
-    }
-
-    /**
-     * @see android.widget.ListAdapter#hasSeparators()
-     */
-    @Override
-    public final boolean areAllItemsEnabled() {
-        return mSeparators == false;
-    }
-
-    /**
-     * @see android.widget.ListAdapter#isSeparator(int)
-     */
-    @Override
-    public final boolean isEnabled(int position) {
-        if (!mSeparators) {
-            return true;
-        }
-
-        int numSections = mSections.size();
-        for (int i = 0; i < numSections; i++) {
-            ArrayList<E> section = mSections.get(i);
-            int sectionSize = section.size();
-            if (sectionSize == 1) {
-                // The section only contains a separator and nothing else, skip it
-                continue;
-            }
-            if (position == 0) {
-                // The first item in a section is always the separator
-                return false;
-            }
-            position -= sectionSize;
-        }
-        return true;
-    }
-
-    /**
-     * @see android.widget.ListAdapter#getItem(int)
-     */
-    public final Object getItem(int position) {
-        return getEntry(mSections, position, mSeparators);
-    }
-
-    /**
-     * Get the entry for the given position.
-     *
-     * @param sections the list of sections
-     * @param position the position for the desired entry
-     * @return the ContactEntry for the given position
-     */
-    public final static <T extends Entry> T getEntry(ArrayList<ArrayList<T>> sections,
-            int position, boolean separators) {
-        int numSections = sections.size();
-        for (int i = 0; i < numSections; i++) {
-            ArrayList<T> section = sections.get(i);
-            int sectionSize = section.size();
-            if (separators && sectionSize == 1) {
-                // The section only contains a separator and nothing else, skip it
-                continue;
-            }
-            if (position < section.size()) {
-                return section.get(position);
-            }
-            position -= section.size();
-        }
-        return null;
-    }
-
-    /**
-     * Get the count of entries in all sections
-     *
-     * @param sections the list of sections
-     * @return the count of entries in all sections
-     */
-    public static <T extends Entry> int countEntries(ArrayList<ArrayList<T>> sections,
-            boolean separators) {
-        int count = 0;
-        int numSections = sections.size();
-        for (int i = 0; i < numSections; i++) {
-            ArrayList<T> section = sections.get(i);
-            int sectionSize = section.size();
-            if (separators && sectionSize == 1) {
-                // The section only contains a separator and nothing else, skip it
-                continue;
-            }
-            count += sections.get(i).size();
-        }
-        return count;
-    }
-
-    /**
-     * @see android.widget.ListAdapter#getItemId(int)
-     */
-    public final long getItemId(int position) {
-        Entry entry = getEntry(mSections, position, mSeparators);
-        if (entry != null) {
-            return entry.id;
-        } else {
-            return -1;
-        }
-    }
-
-    /**
-     * @see android.widget.ListAdapter#getView(int, View, ViewGroup)
-     */
-    public View getView(int position, View convertView, ViewGroup parent) {
-        View v;
-        if (convertView == null) {
-            v = newView(position, parent);
-        } else {
-            v = convertView;
-        }
-        bindView(v, getEntry(mSections, position, mSeparators));
-        return v;
-    }
-
-    /**
-     * Create a new view for an entry.
-     *
-     * @parent the parent ViewGroup
-     * @return the newly created view
-     */
-    protected abstract View newView(int position, ViewGroup parent);
-
-    /**
-     * Binds the data from an entry to a view.
-     *
-     * @param view the view to display the entry in
-     * @param entry the data to bind
-     */
-    protected abstract void bindView(View view, E entry);
-}
diff --git a/src/com/android/contacts/ContactListEmptyView.java b/src/com/android/contacts/ContactListEmptyView.java
new file mode 100644
index 0000000..40d5152
--- /dev/null
+++ b/src/com/android/contacts/ContactListEmptyView.java
@@ -0,0 +1,113 @@
+/*
+ * 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;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.IContentService;
+import android.os.RemoteException;
+import android.provider.ContactsContract;
+import android.telephony.TelephonyManager;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.widget.ScrollView;
+import android.widget.TextView;
+
+/**
+ * Displays a message when there is nothing to display in a contact list.
+ */
+public class ContactListEmptyView extends ScrollView {
+
+    private static final String TAG = "ContactListEmptyView";
+
+    public ContactListEmptyView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public void hide() {
+        TextView empty = (TextView) findViewById(R.id.emptyText);
+        empty.setVisibility(GONE);
+    }
+
+    public void show(boolean searchMode, boolean displayOnlyPhones,
+            boolean isFavoritesMode, boolean isQueryMode, boolean isShortcutAction,
+            boolean isMultipleSelectionEnabled, boolean showSelectedOnly) {
+        if (searchMode) {
+            return;
+        }
+
+        TextView empty = (TextView) findViewById(R.id.emptyText);
+        Context context = getContext();
+        if (displayOnlyPhones) {
+            empty.setText(context.getText(R.string.noContactsWithPhoneNumbers));
+        } else if (isFavoritesMode) {
+            empty.setText(context.getText(R.string.noFavoritesHelpText));
+        } else if (isQueryMode) {
+            empty.setText(context.getText(R.string.noMatchingContacts));
+        } if (isMultipleSelectionEnabled) {
+            if (showSelectedOnly) {
+                empty.setText(context.getText(R.string.no_contacts_selected));
+            } else {
+                empty.setText(context.getText(R.string.noContactsWithPhoneNumbers));
+            }
+        } else {
+            TelephonyManager telephonyManager =
+                    (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+            boolean hasSim = telephonyManager.hasIccCard();
+            if (isSyncActive()) {
+                if (isShortcutAction) {
+                    // Help text is the same no matter whether there is SIM or not.
+                    empty.setText(
+                            context.getText(R.string.noContactsHelpTextWithSyncForCreateShortcut));
+                } else if (hasSim) {
+                    empty.setText(context.getText(R.string.noContactsHelpTextWithSync));
+                } else {
+                    empty.setText(context.getText(R.string.noContactsNoSimHelpTextWithSync));
+                }
+            } else {
+                if (isShortcutAction) {
+                    // Help text is the same no matter whether there is SIM or not.
+                    empty.setText(context.getText(R.string.noContactsHelpTextForCreateShortcut));
+                } else if (hasSim) {
+                    empty.setText(context.getText(R.string.noContactsHelpText));
+                } else {
+                    empty.setText(context.getText(R.string.noContactsNoSimHelpText));
+                }
+            }
+        }
+        empty.setVisibility(VISIBLE);
+    }
+
+    private boolean isSyncActive() {
+        Account[] accounts = AccountManager.get(getContext()).getAccounts();
+        if (accounts != null && accounts.length > 0) {
+            IContentService contentService = ContentResolver.getContentService();
+            for (Account account : accounts) {
+                try {
+                    if (contentService.isSyncActive(account, ContactsContract.AUTHORITY)) {
+                        return true;
+                    }
+                } catch (RemoteException e) {
+                    Log.e(TAG, "Could not get the sync status");
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/ContactListItemView.java b/src/com/android/contacts/ContactListItemView.java
deleted file mode 100644
index 89e4265..0000000
--- a/src/com/android/contacts/ContactListItemView.java
+++ /dev/null
@@ -1,595 +0,0 @@
-/*
- * 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;
-
-import com.android.contacts.ui.widget.DontPressWithParentImageView;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.content.res.TypedArray;
-import android.graphics.Canvas;
-import android.graphics.Typeface;
-import android.graphics.drawable.Drawable;
-import android.provider.ContactsContract.Contacts;
-import android.text.TextUtils;
-import android.text.TextUtils.TruncateAt;
-import android.util.AttributeSet;
-import android.view.Gravity;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.QuickContactBadge;
-import android.widget.TextView;
-import android.widget.ImageView.ScaleType;
-
-/**
- * A custom view for an item in the contact list.
- */
-public class ContactListItemView extends ViewGroup {
-
-    private static final int QUICK_CONTACT_BADGE_STYLE =
-            com.android.internal.R.attr.quickContactBadgeStyleWindowMedium;
-
-    private final Context mContext;
-
-    private final int mPreferredHeight;
-    private final int mVerticalDividerMargin;
-    private final int mPaddingTop;
-    private final int mPaddingRight;
-    private final int mPaddingBottom;
-    private final int mPaddingLeft;
-    private final int mGapBetweenImageAndText;
-    private final int mGapBetweenLabelAndData;
-    private final int mCallButtonPadding;
-    private final int mPresenceIconMargin;
-    private final int mHeaderTextWidth;
-
-    private boolean mHorizontalDividerVisible;
-    private Drawable mHorizontalDividerDrawable;
-    private int mHorizontalDividerHeight;
-
-    private boolean mVerticalDividerVisible;
-    private Drawable mVerticalDividerDrawable;
-    private int mVerticalDividerWidth;
-
-    private boolean mHeaderVisible;
-    private Drawable mHeaderBackgroundDrawable;
-    private int mHeaderBackgroundHeight;
-    private TextView mHeaderTextView;
-
-    private QuickContactBadge mQuickContact;
-    private ImageView mPhotoView;
-    private TextView mNameTextView;
-    private DontPressWithParentImageView mCallButton;
-    private TextView mLabelView;
-    private TextView mDataView;
-    private TextView mSnippetView;
-    private ImageView mPresenceIcon;
-
-    private int mPhotoViewWidth;
-    private int mPhotoViewHeight;
-    private int mLine1Height;
-    private int mLine2Height;
-    private int mLine3Height;
-
-    private OnClickListener mCallButtonClickListener;
-
-    public ContactListItemView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mContext = context;
-
-        // Obtain preferred item height from the current theme
-        TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.Theme);
-        mPreferredHeight =
-                a.getDimensionPixelSize(android.R.styleable.Theme_listPreferredItemHeight, 0);
-        a.recycle();
-
-        Resources resources = context.getResources();
-        mVerticalDividerMargin =
-                resources.getDimensionPixelOffset(R.dimen.list_item_vertical_divider_margin);
-        mPaddingTop =
-                resources.getDimensionPixelOffset(R.dimen.list_item_padding_top);
-        mPaddingBottom =
-                resources.getDimensionPixelOffset(R.dimen.list_item_padding_bottom);
-        mPaddingLeft =
-                resources.getDimensionPixelOffset(R.dimen.list_item_padding_left);
-        mPaddingRight =
-                resources.getDimensionPixelOffset(R.dimen.list_item_padding_right);
-        mGapBetweenImageAndText =
-                resources.getDimensionPixelOffset(R.dimen.list_item_gap_between_image_and_text);
-        mGapBetweenLabelAndData =
-                resources.getDimensionPixelOffset(R.dimen.list_item_gap_between_label_and_data);
-        mCallButtonPadding =
-                resources.getDimensionPixelOffset(R.dimen.list_item_call_button_padding);
-        mPresenceIconMargin =
-                resources.getDimensionPixelOffset(R.dimen.list_item_presence_icon_margin);
-        mHeaderTextWidth =
-                resources.getDimensionPixelOffset(R.dimen.list_item_header_text_width);
-    }
-
-    /**
-     * Installs a call button listener.
-     */
-    public void setOnCallButtonClickListener(OnClickListener callButtonClickListener) {
-        mCallButtonClickListener = callButtonClickListener;
-    }
-
-    @Override
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        // We will match parent's width and wrap content vertically, but make sure
-        // height is no less than listPreferredItemHeight.
-        int width = resolveSize(0, widthMeasureSpec);
-        int height = 0;
-
-        mLine1Height = 0;
-        mLine2Height = 0;
-        mLine3Height = 0;
-
-        // Obtain the natural dimensions of the name text (we only care about height)
-        mNameTextView.measure(0, 0);
-
-        mLine1Height = mNameTextView.getMeasuredHeight();
-
-        if (isVisible(mLabelView)) {
-            mLabelView.measure(0, 0);
-            mLine2Height = mLabelView.getMeasuredHeight();
-        }
-
-        if (isVisible(mDataView)) {
-            mDataView.measure(0, 0);
-            mLine2Height = Math.max(mLine2Height, mDataView.getMeasuredHeight());
-        }
-
-        if (isVisible(mSnippetView)) {
-            mSnippetView.measure(0, 0);
-            mLine3Height = mSnippetView.getMeasuredHeight();
-        }
-
-        height += mLine1Height + mLine2Height + mLine3Height;
-
-        if (isVisible(mCallButton)) {
-            mCallButton.measure(0, 0);
-        }
-        if (isVisible(mPresenceIcon)) {
-            mPresenceIcon.measure(0, 0);
-        }
-
-        ensurePhotoViewSize();
-
-        height = Math.max(height, mPhotoViewHeight);
-        height = Math.max(height, mPreferredHeight);
-
-        if (mHeaderVisible) {
-            ensureHeaderBackground();
-            mHeaderTextView.measure(
-                    MeasureSpec.makeMeasureSpec(mHeaderTextWidth, MeasureSpec.EXACTLY),
-                    MeasureSpec.makeMeasureSpec(mHeaderBackgroundHeight, MeasureSpec.EXACTLY));
-            height += mHeaderBackgroundDrawable.getIntrinsicHeight();
-        }
-
-        setMeasuredDimension(width, height);
-    }
-
-    @Override
-    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-        int height = bottom - top;
-        int width = right - left;
-
-        // Determine the vertical bounds by laying out the header first.
-        int topBound = 0;
-
-        if (mHeaderVisible) {
-            mHeaderBackgroundDrawable.setBounds(
-                    0,
-                    0,
-                    width,
-                    mHeaderBackgroundHeight);
-            mHeaderTextView.layout(0, 0, width, mHeaderBackgroundHeight);
-            topBound += mHeaderBackgroundHeight;
-        }
-
-        // Positions of views on the left are fixed and so are those on the right side.
-        // The stretchable part of the layout is in the middle.  So, we will start off
-        // by laying out the left and right sides. Then we will allocate the remainder
-        // to the text fields in the middle.
-
-        // Left side
-        int leftBound = mPaddingLeft;
-        View photoView = mQuickContact != null ? mQuickContact : mPhotoView;
-        if (photoView != null) {
-            // Center the photo vertically
-            int photoTop = topBound + (height - topBound - mPhotoViewHeight) / 2;
-            photoView.layout(
-                    leftBound,
-                    photoTop,
-                    leftBound + mPhotoViewWidth,
-                    photoTop + mPhotoViewHeight);
-            leftBound += mPhotoViewWidth + mGapBetweenImageAndText;
-        }
-
-        // Right side
-        int rightBound = right;
-        if (isVisible(mCallButton)) {
-            int buttonWidth = mCallButton.getMeasuredWidth();
-            rightBound -= buttonWidth;
-            mCallButton.layout(
-                    rightBound,
-                    topBound,
-                    rightBound + buttonWidth,
-                    height);
-            mVerticalDividerVisible = true;
-            ensureVerticalDivider();
-            rightBound -= mVerticalDividerWidth;
-            mVerticalDividerDrawable.setBounds(
-                    rightBound,
-                    topBound + mVerticalDividerMargin,
-                    rightBound + mVerticalDividerWidth,
-                    height - mVerticalDividerMargin);
-        } else {
-            mVerticalDividerVisible = false;
-        }
-
-        if (isVisible(mPresenceIcon)) {
-            int iconWidth = mPresenceIcon.getMeasuredWidth();
-            rightBound -= mPresenceIconMargin + iconWidth;
-            mPresenceIcon.layout(
-                    rightBound,
-                    topBound,
-                    rightBound + iconWidth,
-                    height);
-        }
-
-        if (mHorizontalDividerVisible) {
-            ensureHorizontalDivider();
-            mHorizontalDividerDrawable.setBounds(
-                    0,
-                    height - mHorizontalDividerHeight,
-                    width,
-                    height);
-        }
-
-        topBound += mPaddingTop;
-        int bottomBound = height - mPaddingBottom;
-
-        // Text lines, centered vertically
-        rightBound -= mPaddingRight;
-
-        // Center text vertically
-        int totalTextHeight = mLine1Height + mLine2Height + mLine3Height;
-        int textTopBound = (bottomBound + topBound - totalTextHeight) / 2;
-
-        mNameTextView.layout(leftBound,
-                textTopBound,
-                rightBound,
-                textTopBound + mLine1Height);
-
-        int dataLeftBound = leftBound;
-        if (isVisible(mLabelView)) {
-            dataLeftBound = leftBound + mLabelView.getMeasuredWidth();
-            mLabelView.layout(leftBound,
-                    textTopBound + mLine1Height,
-                    dataLeftBound,
-                    textTopBound + mLine1Height + mLine2Height);
-            dataLeftBound += mGapBetweenLabelAndData;
-        }
-
-        if (isVisible(mDataView)) {
-            mDataView.layout(dataLeftBound,
-                    textTopBound + mLine1Height,
-                    rightBound,
-                    textTopBound + mLine1Height + mLine2Height);
-        }
-
-        if (isVisible(mSnippetView)) {
-            mSnippetView.layout(leftBound,
-                    textTopBound + mLine1Height + mLine2Height,
-                    rightBound,
-                    textTopBound + mLine1Height + mLine2Height + mLine3Height);
-        }
-    }
-
-    private boolean isVisible(View view) {
-        return view != null && view.getVisibility() == View.VISIBLE;
-    }
-
-    /**
-     * Loads the drawable for the vertical divider if it has not yet been loaded.
-     */
-    private void ensureVerticalDivider() {
-        if (mVerticalDividerDrawable == null) {
-            mVerticalDividerDrawable = mContext.getResources().getDrawable(
-                    R.drawable.divider_vertical_dark);
-            mVerticalDividerWidth = mVerticalDividerDrawable.getIntrinsicWidth();
-        }
-    }
-
-    /**
-     * Loads the drawable for the horizontal divider if it has not yet been loaded.
-     */
-    private void ensureHorizontalDivider() {
-        if (mHorizontalDividerDrawable == null) {
-            mHorizontalDividerDrawable = mContext.getResources().getDrawable(
-                    com.android.internal.R.drawable.divider_horizontal_dark_opaque);
-            mHorizontalDividerHeight = mHorizontalDividerDrawable.getIntrinsicHeight();
-        }
-    }
-
-    /**
-     * Loads the drawable for the header background if it has not yet been loaded.
-     */
-    private void ensureHeaderBackground() {
-        if (mHeaderBackgroundDrawable == null) {
-            mHeaderBackgroundDrawable = mContext.getResources().getDrawable(
-                    android.R.drawable.dark_header);
-            mHeaderBackgroundHeight = mHeaderBackgroundDrawable.getIntrinsicHeight();
-        }
-    }
-
-    /**
-     * Extracts width and height from the style
-     */
-    private void ensurePhotoViewSize() {
-        if (mPhotoViewWidth == 0 && mPhotoViewHeight == 0) {
-            TypedArray a = mContext.obtainStyledAttributes(null,
-                    com.android.internal.R.styleable.ViewGroup_Layout,
-                    QUICK_CONTACT_BADGE_STYLE, 0);
-            mPhotoViewWidth = a.getLayoutDimension(
-                    android.R.styleable.ViewGroup_Layout_layout_width,
-                    ViewGroup.LayoutParams.WRAP_CONTENT);
-            mPhotoViewHeight = a.getLayoutDimension(
-                    android.R.styleable.ViewGroup_Layout_layout_height,
-                    ViewGroup.LayoutParams.WRAP_CONTENT);
-            a.recycle();
-        }
-    }
-
-    @Override
-    public void dispatchDraw(Canvas canvas) {
-        if (mHeaderVisible) {
-            mHeaderBackgroundDrawable.draw(canvas);
-        }
-        if (mHorizontalDividerVisible) {
-            mHorizontalDividerDrawable.draw(canvas);
-        }
-        if (mVerticalDividerVisible) {
-            mVerticalDividerDrawable.draw(canvas);
-        }
-        super.dispatchDraw(canvas);
-    }
-
-    /**
-     * Sets the flag that determines whether a divider should drawn at the bottom
-     * of the view.
-     */
-    public void setDividerVisible(boolean visible) {
-        mHorizontalDividerVisible = visible;
-    }
-
-    /**
-     * Sets section header or makes it invisible if the title is null.
-     */
-    public void setSectionHeader(String title) {
-        if (!TextUtils.isEmpty(title)) {
-            if (mHeaderTextView == null) {
-                mHeaderTextView = new TextView(mContext);
-                mHeaderTextView.setTypeface(mHeaderTextView.getTypeface(), Typeface.BOLD);
-                mHeaderTextView.setTextColor(mContext.getResources()
-                        .getColor(com.android.internal.R.color.dim_foreground_dark));
-                mHeaderTextView.setTextSize(14);
-                mHeaderTextView.setGravity(Gravity.CENTER);
-                addView(mHeaderTextView);
-            }
-            mHeaderTextView.setText(title);
-            mHeaderTextView.setVisibility(View.VISIBLE);
-            mHeaderVisible = true;
-        } else {
-            if (mHeaderTextView != null) {
-                mHeaderTextView.setVisibility(View.GONE);
-            }
-            mHeaderVisible = false;
-        }
-    }
-
-    /**
-     * Returns the quick contact badge, creating it if necessary.
-     */
-    public QuickContactBadge getQuickContact() {
-        if (mQuickContact == null) {
-            mQuickContact = new QuickContactBadge(mContext, null, QUICK_CONTACT_BADGE_STYLE);
-            mQuickContact.setExcludeMimes(new String[] { Contacts.CONTENT_ITEM_TYPE });
-            addView(mQuickContact);
-        }
-        return mQuickContact;
-    }
-
-    /**
-     * Returns the photo view, creating it if necessary.
-     */
-    public ImageView getPhotoView() {
-        if (mPhotoView == null) {
-            mPhotoView = new ImageView(mContext, null, QUICK_CONTACT_BADGE_STYLE);
-            // Quick contact style used above will set a background - remove it
-            mPhotoView.setBackgroundDrawable(null);
-            addView(mPhotoView);
-        }
-        return mPhotoView;
-    }
-
-    /**
-     * Returns the text view for the contact name, creating it if necessary.
-     */
-    public TextView getNameTextView() {
-        if (mNameTextView == null) {
-            mNameTextView = new TextView(mContext);
-            mNameTextView.setSingleLine(true);
-            mNameTextView.setEllipsize(TruncateAt.MARQUEE);
-            mNameTextView.setTextAppearance(mContext, android.R.style.TextAppearance_Large);
-            mNameTextView.setGravity(Gravity.CENTER_VERTICAL);
-            addView(mNameTextView);
-        }
-        return mNameTextView;
-    }
-
-    /**
-     * Adds a call button using the supplied arguments as an id and tag.
-     */
-    public void showCallButton(int id, int tag) {
-        if (mCallButton == null) {
-            mCallButton = new DontPressWithParentImageView(mContext, null);
-            mCallButton.setId(id);
-            mCallButton.setOnClickListener(mCallButtonClickListener);
-            mCallButton.setBackgroundResource(R.drawable.call_background);
-            mCallButton.setImageResource(android.R.drawable.sym_action_call);
-            mCallButton.setPadding(mCallButtonPadding, 0, mCallButtonPadding, 0);
-            mCallButton.setScaleType(ScaleType.CENTER);
-            addView(mCallButton);
-        }
-
-        mCallButton.setTag(tag);
-        mCallButton.setVisibility(View.VISIBLE);
-    }
-
-    public void hideCallButton() {
-        if (mCallButton != null) {
-            mCallButton.setVisibility(View.GONE);
-        }
-    }
-
-    /**
-     * Adds or updates a text view for the data label.
-     */
-    public void setLabel(CharSequence text) {
-        if (TextUtils.isEmpty(text)) {
-            if (mLabelView != null) {
-                mLabelView.setVisibility(View.GONE);
-            }
-        } else {
-            getLabelView();
-            mLabelView.setText(text);
-            mLabelView.setVisibility(VISIBLE);
-        }
-    }
-
-    /**
-     * Adds or updates a text view for the data label.
-     */
-    public void setLabel(char[] text, int size) {
-        if (text == null || size == 0) {
-            if (mLabelView != null) {
-                mLabelView.setVisibility(View.GONE);
-            }
-        } else {
-            getLabelView();
-            mLabelView.setText(text, 0, size);
-            mLabelView.setVisibility(VISIBLE);
-        }
-    }
-
-    /**
-     * Returns the text view for the data label, creating it if necessary.
-     */
-    public TextView getLabelView() {
-        if (mLabelView == null) {
-            mLabelView = new TextView(mContext);
-            mLabelView.setSingleLine(true);
-            mLabelView.setEllipsize(TruncateAt.MARQUEE);
-            mLabelView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
-            mLabelView.setTypeface(mLabelView.getTypeface(), Typeface.BOLD);
-            addView(mLabelView);
-        }
-        return mLabelView;
-    }
-
-    /**
-     * Adds or updates a text view for the data element.
-     */
-    public void setData(char[] text, int size) {
-        if (text == null || size == 0) {
-            if (mDataView != null) {
-                mDataView.setVisibility(View.GONE);
-            }
-            return;
-        } else {
-            getDataView();
-            mDataView.setText(text, 0, size);
-            mDataView.setVisibility(VISIBLE);
-        }
-    }
-
-    /**
-     * Returns the text view for the data text, creating it if necessary.
-     */
-    public TextView getDataView() {
-        if (mDataView == null) {
-            mDataView = new TextView(mContext);
-            mDataView.setSingleLine(true);
-            mDataView.setEllipsize(TruncateAt.MARQUEE);
-            mDataView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
-            addView(mDataView);
-        }
-        return mDataView;
-    }
-
-    /**
-     * Adds or updates a text view for the search snippet.
-     */
-    public void setSnippet(CharSequence text) {
-        if (TextUtils.isEmpty(text)) {
-            if (mSnippetView != null) {
-                mSnippetView.setVisibility(View.GONE);
-            }
-        } else {
-            getSnippetView();
-            mSnippetView.setText(text);
-            mSnippetView.setVisibility(VISIBLE);
-        }
-    }
-
-    /**
-     * Returns the text view for the search snippet, creating it if necessary.
-     */
-    public TextView getSnippetView() {
-        if (mSnippetView == null) {
-            mSnippetView = new TextView(mContext);
-            mSnippetView.setSingleLine(true);
-            mSnippetView.setEllipsize(TruncateAt.MARQUEE);
-            mSnippetView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
-            mSnippetView.setTypeface(mSnippetView.getTypeface(), Typeface.BOLD);
-            addView(mSnippetView);
-        }
-        return mSnippetView;
-    }
-
-    /**
-     * Adds or updates the presence icon view.
-     */
-    public void setPresence(Drawable icon) {
-        if (icon != null) {
-            if (mPresenceIcon == null) {
-                mPresenceIcon = new ImageView(mContext);
-                addView(mPresenceIcon);
-            }
-            mPresenceIcon.setImageDrawable(icon);
-            mPresenceIcon.setScaleType(ScaleType.CENTER);
-            mPresenceIcon.setVisibility(View.VISIBLE);
-        } else {
-            if (mPresenceIcon != null) {
-                mPresenceIcon.setVisibility(View.GONE);
-            }
-        }
-    }
-}
diff --git a/src/com/android/contacts/ContactPhotoLoader.java b/src/com/android/contacts/ContactPhotoLoader.java
deleted file mode 100644
index 96f55a6..0000000
--- a/src/com/android/contacts/ContactPhotoLoader.java
+++ /dev/null
@@ -1,419 +0,0 @@
-/*
- * 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;
-
-import com.google.android.collect.Lists;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Message;
-import android.os.Handler.Callback;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.Contacts.Photo;
-import android.widget.ImageView;
-
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Asynchronously loads contact photos and maintains cache of photos.  The class is
- * mostly single-threaded.  The only two methods accessed by the loader thread are
- * {@link #cacheBitmap} and {@link #obtainPhotoIdsToLoad}. Those methods access concurrent
- * hash maps shared with the main thread.
- */
-public class ContactPhotoLoader implements Callback {
-
-    private static final String LOADER_THREAD_NAME = "ContactPhotoLoader";
-
-    /**
-     * Type of message sent by the UI thread to itself to indicate that some photos
-     * need to be loaded.
-     */
-    private static final int MESSAGE_REQUEST_LOADING = 1;
-
-    /**
-     * Type of message sent by the loader thread to indicate that some photos have
-     * been loaded.
-     */
-    private static final int MESSAGE_PHOTOS_LOADED = 2;
-
-    private static final String[] EMPTY_STRING_ARRAY = new String[0];
-
-    private final String[] COLUMNS = new String[] { Photo._ID, Photo.PHOTO };
-
-    /**
-     * The resource ID of the image to be used when the photo is unavailable or being
-     * loaded.
-     */
-    private final int mDefaultResourceId;
-
-    /**
-     * Maintains the state of a particular photo.
-     */
-    private static class BitmapHolder {
-        private static final int NEEDED = 0;
-        private static final int LOADING = 1;
-        private static final int LOADED = 2;
-
-        int state;
-        SoftReference<Bitmap> bitmapRef;
-    }
-
-    /**
-     * A soft cache for photos.
-     */
-    private final ConcurrentHashMap<Long, BitmapHolder> mBitmapCache =
-            new ConcurrentHashMap<Long, BitmapHolder>();
-
-    /**
-     * A map from ImageView to the corresponding photo ID. Please note that this
-     * photo ID may change before the photo loading request is started.
-     */
-    private final ConcurrentHashMap<ImageView, Long> mPendingRequests =
-            new ConcurrentHashMap<ImageView, Long>();
-
-    /**
-     * Handler for messages sent to the UI thread.
-     */
-    private final Handler mMainThreadHandler = new Handler(this);
-
-    /**
-     * Thread responsible for loading photos from the database. Created upon
-     * the first request.
-     */
-    private LoaderThread mLoaderThread;
-
-    /**
-     * A gate to make sure we only send one instance of MESSAGE_PHOTOS_NEEDED at a time.
-     */
-    private boolean mLoadingRequested;
-
-    /**
-     * Flag indicating if the image loading is paused.
-     */
-    private boolean mPaused;
-
-    private final Context mContext;
-
-    /**
-     * Constructor.
-     *
-     * @param context content context
-     * @param defaultResourceId the image resource ID to be used when there is
-     *            no photo for a contact
-     */
-    public ContactPhotoLoader(Context context, int defaultResourceId) {
-        mDefaultResourceId = defaultResourceId;
-        mContext = context;
-    }
-
-    /**
-     * Load photo into the supplied image view.  If the photo is already cached,
-     * it is displayed immediately.  Otherwise a request is sent to load the photo
-     * from the database.
-     */
-    public void loadPhoto(ImageView view, long photoId) {
-        if (photoId == 0) {
-            // No photo is needed
-            view.setImageResource(mDefaultResourceId);
-            mPendingRequests.remove(view);
-        } else {
-            boolean loaded = loadCachedPhoto(view, photoId);
-            if (loaded) {
-                mPendingRequests.remove(view);
-            } else {
-                mPendingRequests.put(view, photoId);
-                if (!mPaused) {
-                    // Send a request to start loading photos
-                    requestLoading();
-                }
-            }
-        }
-    }
-
-    /**
-     * Checks if the photo is present in cache.  If so, sets the photo on the view,
-     * otherwise sets the state of the photo to {@link BitmapHolder#NEEDED} and
-     * temporarily set the image to the default resource ID.
-     */
-    private boolean loadCachedPhoto(ImageView view, long photoId) {
-        BitmapHolder holder = mBitmapCache.get(photoId);
-        if (holder == null) {
-            holder = new BitmapHolder();
-            mBitmapCache.put(photoId, holder);
-        } else if (holder.state == BitmapHolder.LOADED) {
-            // Null bitmap reference means that database contains no bytes for the photo
-            if (holder.bitmapRef == null) {
-                view.setImageResource(mDefaultResourceId);
-                return true;
-            }
-
-            Bitmap bitmap = holder.bitmapRef.get();
-            if (bitmap != null) {
-                view.setImageBitmap(bitmap);
-                return true;
-            }
-
-            // Null bitmap means that the soft reference was released by the GC
-            // and we need to reload the photo.
-            holder.bitmapRef = null;
-        }
-
-        // The bitmap has not been loaded - should display the placeholder image.
-        view.setImageResource(mDefaultResourceId);
-        holder.state = BitmapHolder.NEEDED;
-        return false;
-    }
-
-    /**
-     * Stops loading images, kills the image loader thread and clears all caches.
-     */
-    public void stop() {
-        pause();
-
-        if (mLoaderThread != null) {
-            mLoaderThread.quit();
-            mLoaderThread = null;
-        }
-
-        mPendingRequests.clear();
-        mBitmapCache.clear();
-    }
-
-    public void clear() {
-        mPendingRequests.clear();
-        mBitmapCache.clear();
-    }
-
-    /**
-     * Temporarily stops loading photos from the database.
-     */
-    public void pause() {
-        mPaused = true;
-    }
-
-    /**
-     * Resumes loading photos from the database.
-     */
-    public void resume() {
-        mPaused = false;
-        if (!mPendingRequests.isEmpty()) {
-            requestLoading();
-        }
-    }
-
-    /**
-     * Sends a message to this thread itself to start loading images.  If the current
-     * view contains multiple image views, all of those image views will get a chance
-     * to request their respective photos before any of those requests are executed.
-     * This allows us to load images in bulk.
-     */
-    private void requestLoading() {
-        if (!mLoadingRequested) {
-            mLoadingRequested = true;
-            mMainThreadHandler.sendEmptyMessage(MESSAGE_REQUEST_LOADING);
-        }
-    }
-
-    /**
-     * Processes requests on the main thread.
-     */
-    public boolean handleMessage(Message msg) {
-        switch (msg.what) {
-            case MESSAGE_REQUEST_LOADING: {
-                mLoadingRequested = false;
-                if (!mPaused) {
-                    if (mLoaderThread == null) {
-                        mLoaderThread = new LoaderThread(mContext.getContentResolver());
-                        mLoaderThread.start();
-                    }
-
-                    mLoaderThread.requestLoading();
-                }
-                return true;
-            }
-
-            case MESSAGE_PHOTOS_LOADED: {
-                if (!mPaused) {
-                    processLoadedImages();
-                }
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Goes over pending loading requests and displays loaded photos.  If some of the
-     * photos still haven't been loaded, sends another request for image loading.
-     */
-    private void processLoadedImages() {
-        Iterator<ImageView> iterator = mPendingRequests.keySet().iterator();
-        while (iterator.hasNext()) {
-            ImageView view = iterator.next();
-            long photoId = mPendingRequests.get(view);
-            boolean loaded = loadCachedPhoto(view, photoId);
-            if (loaded) {
-                iterator.remove();
-            }
-        }
-
-        if (!mPendingRequests.isEmpty()) {
-            requestLoading();
-        }
-    }
-
-    /**
-     * Stores the supplied bitmap in cache.
-     */
-    private void cacheBitmap(long id, byte[] bytes) {
-        if (mPaused) {
-            return;
-        }
-
-        BitmapHolder holder = new BitmapHolder();
-        holder.state = BitmapHolder.LOADED;
-        if (bytes != null) {
-            try {
-                Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, null);
-                holder.bitmapRef = new SoftReference<Bitmap>(bitmap);
-            } catch (OutOfMemoryError e) {
-                // Do nothing - the photo will appear to be missing
-            }
-        }
-        mBitmapCache.put(id, holder);
-    }
-
-    /**
-     * Populates an array of photo IDs that need to be loaded.
-     */
-    private void obtainPhotoIdsToLoad(ArrayList<Long> photoIds,
-            ArrayList<String> photoIdsAsStrings) {
-        photoIds.clear();
-        photoIdsAsStrings.clear();
-
-        /*
-         * Since the call is made from the loader thread, the map could be
-         * changing during the iteration. That's not really a problem:
-         * ConcurrentHashMap will allow those changes to happen without throwing
-         * exceptions. Since we may miss some requests in the situation of
-         * concurrent change, we will need to check the map again once loading
-         * is complete.
-         */
-        Iterator<Long> iterator = mPendingRequests.values().iterator();
-        while (iterator.hasNext()) {
-            Long id = iterator.next();
-            BitmapHolder holder = mBitmapCache.get(id);
-            if (holder != null && holder.state == BitmapHolder.NEEDED) {
-                // Assuming atomic behavior
-                holder.state = BitmapHolder.LOADING;
-                photoIds.add(id);
-                photoIdsAsStrings.add(id.toString());
-            }
-        }
-    }
-
-    /**
-     * The thread that performs loading of photos from the database.
-     */
-    private class LoaderThread extends HandlerThread implements Callback {
-        private final ContentResolver mResolver;
-        private final StringBuilder mStringBuilder = new StringBuilder();
-        private final ArrayList<Long> mPhotoIds = Lists.newArrayList();
-        private final ArrayList<String> mPhotoIdsAsStrings = Lists.newArrayList();
-        private Handler mLoaderThreadHandler;
-
-        public LoaderThread(ContentResolver resolver) {
-            super(LOADER_THREAD_NAME);
-            mResolver = resolver;
-        }
-
-        /**
-         * Sends a message to this thread to load requested photos.
-         */
-        public void requestLoading() {
-            if (mLoaderThreadHandler == null) {
-                mLoaderThreadHandler = new Handler(getLooper(), this);
-            }
-            mLoaderThreadHandler.sendEmptyMessage(0);
-        }
-
-        /**
-         * Receives the above message, loads photos and then sends a message
-         * to the main thread to process them.
-         */
-        public boolean handleMessage(Message msg) {
-            loadPhotosFromDatabase();
-            mMainThreadHandler.sendEmptyMessage(MESSAGE_PHOTOS_LOADED);
-            return true;
-        }
-
-        private void loadPhotosFromDatabase() {
-            obtainPhotoIdsToLoad(mPhotoIds, mPhotoIdsAsStrings);
-
-            int count = mPhotoIds.size();
-            if (count == 0) {
-                return;
-            }
-
-            mStringBuilder.setLength(0);
-            mStringBuilder.append(Photo._ID + " IN(");
-            for (int i = 0; i < count; i++) {
-                if (i != 0) {
-                    mStringBuilder.append(',');
-                }
-                mStringBuilder.append('?');
-            }
-            mStringBuilder.append(')');
-
-            Cursor cursor = null;
-            try {
-                cursor = mResolver.query(Data.CONTENT_URI,
-                        COLUMNS,
-                        mStringBuilder.toString(),
-                        mPhotoIdsAsStrings.toArray(EMPTY_STRING_ARRAY),
-                        null);
-
-                if (cursor != null) {
-                    while (cursor.moveToNext()) {
-                        Long id = cursor.getLong(0);
-                        byte[] bytes = cursor.getBlob(1);
-                        cacheBitmap(id, bytes);
-                        mPhotoIds.remove(id);
-                    }
-                }
-            } finally {
-                if (cursor != null) {
-                    cursor.close();
-                }
-            }
-
-            // Remaining photos were not found in the database - mark the cache accordingly.
-            count = mPhotoIds.size();
-            for (int i = 0; i < count; i++) {
-                cacheBitmap(mPhotoIds.get(i), null);
-            }
-        }
-    }
-}
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
deleted file mode 100644
index ac6a3a8..0000000
--- a/src/com/android/contacts/ContactsListActivity.java
+++ /dev/null
@@ -1,3614 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.contacts.TextHighlightingAnimation.TextWithHighlighting;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.Sources;
-import com.android.contacts.ui.ContactsPreferences;
-import com.android.contacts.ui.ContactsPreferencesActivity;
-import com.android.contacts.ui.ContactsPreferencesActivity.Prefs;
-import com.android.contacts.util.AccountSelectionUtil;
-import com.android.contacts.util.Constants;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ListActivity;
-import android.app.SearchManager;
-import android.content.AsyncQueryHandler;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.IContentService;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.content.UriMatcher;
-import android.content.res.ColorStateList;
-import android.content.res.Resources;
-import android.database.CharArrayBuffer;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.database.MatrixCursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.Rect;
-import android.graphics.Typeface;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
-import android.net.Uri;
-import android.net.Uri.Builder;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.preference.PreferenceManager;
-import android.provider.ContactsContract;
-import android.provider.Settings;
-import android.provider.Contacts.ContactMethods;
-import android.provider.Contacts.People;
-import android.provider.Contacts.PeopleColumns;
-import android.provider.Contacts.Phones;
-import android.provider.ContactsContract.ContactCounts;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.Intents;
-import android.provider.ContactsContract.ProviderStatus;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.SearchSnippetColumns;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Nickname;
-import android.provider.ContactsContract.CommonDataKinds.Organization;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
-import android.provider.ContactsContract.Contacts.AggregationSuggestions;
-import android.provider.ContactsContract.Intents.Insert;
-import android.provider.ContactsContract.Intents.UI;
-import android.telephony.TelephonyManager;
-import android.text.Editable;
-import android.text.Html;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.util.Log;
-import android.view.ContextMenu;
-import android.view.ContextThemeWrapper;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.view.View.OnClickListener;
-import android.view.View.OnFocusChangeListener;
-import android.view.View.OnTouchListener;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.AbsListView;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.CursorAdapter;
-import android.widget.Filter;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.QuickContactBadge;
-import android.widget.SectionIndexer;
-import android.widget.TextView;
-import android.widget.Toast;
-import android.widget.AbsListView.OnScrollListener;
-
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-/**
- * Displays a list of contacts. Usually is embedded into the ContactsActivity.
- */
-@SuppressWarnings("deprecation")
-public class ContactsListActivity extends ListActivity implements View.OnCreateContextMenuListener,
-        View.OnClickListener, View.OnKeyListener, TextWatcher, TextView.OnEditorActionListener,
-        OnFocusChangeListener, OnTouchListener {
-
-    public static class JoinContactActivity extends ContactsListActivity {
-
-    }
-
-    public static class ContactsSearchActivity extends ContactsListActivity {
-
-    }
-
-    private static final String TAG = "ContactsListActivity";
-
-    private static final boolean ENABLE_ACTION_ICON_OVERLAYS = true;
-
-    private static final String LIST_STATE_KEY = "liststate";
-    private static final String SHORTCUT_ACTION_KEY = "shortcutAction";
-
-    static final int MENU_ITEM_VIEW_CONTACT = 1;
-    static final int MENU_ITEM_CALL = 2;
-    static final int MENU_ITEM_EDIT_BEFORE_CALL = 3;
-    static final int MENU_ITEM_SEND_SMS = 4;
-    static final int MENU_ITEM_SEND_IM = 5;
-    static final int MENU_ITEM_EDIT = 6;
-    static final int MENU_ITEM_DELETE = 7;
-    static final int MENU_ITEM_TOGGLE_STAR = 8;
-
-    private static final int SUBACTIVITY_NEW_CONTACT = 1;
-    private static final int SUBACTIVITY_VIEW_CONTACT = 2;
-    private static final int SUBACTIVITY_DISPLAY_GROUP = 3;
-    private static final int SUBACTIVITY_SEARCH = 4;
-    private static final int SUBACTIVITY_FILTER = 5;
-
-    private static final int TEXT_HIGHLIGHTING_ANIMATION_DURATION = 350;
-
-    /**
-     * The action for the join contact activity.
-     * <p>
-     * Input: extra field {@link #EXTRA_AGGREGATE_ID} is the aggregate ID.
-     *
-     * TODO: move to {@link ContactsContract}.
-     */
-    public static final String JOIN_AGGREGATE =
-            "com.android.contacts.action.JOIN_AGGREGATE";
-
-    /**
-     * Used with {@link #JOIN_AGGREGATE} to give it the target for aggregation.
-     * <p>
-     * Type: LONG
-     */
-    public static final String EXTRA_AGGREGATE_ID =
-            "com.android.contacts.action.AGGREGATE_ID";
-
-    /**
-     * Used with {@link #JOIN_AGGREGATE} to give it the name of the aggregation target.
-     * <p>
-     * Type: STRING
-     */
-    @Deprecated
-    public static final String EXTRA_AGGREGATE_NAME =
-            "com.android.contacts.action.AGGREGATE_NAME";
-
-    public static final String AUTHORITIES_FILTER_KEY = "authorities";
-
-    private static final Uri CONTACTS_CONTENT_URI_WITH_LETTER_COUNTS =
-            buildSectionIndexerUri(Contacts.CONTENT_URI);
-
-    /** Mask for picker mode */
-    static final int MODE_MASK_PICKER = 0x80000000;
-    /** Mask for no presence mode */
-    static final int MODE_MASK_NO_PRESENCE = 0x40000000;
-    /** Mask for enabling list filtering */
-    static final int MODE_MASK_NO_FILTER = 0x20000000;
-    /** Mask for having a "create new contact" header in the list */
-    static final int MODE_MASK_CREATE_NEW = 0x10000000;
-    /** Mask for showing photos in the list */
-    static final int MODE_MASK_SHOW_PHOTOS = 0x08000000;
-    /** Mask for hiding additional information e.g. primary phone number in the list */
-    static final int MODE_MASK_NO_DATA = 0x04000000;
-    /** Mask for showing a call button in the list */
-    static final int MODE_MASK_SHOW_CALL_BUTTON = 0x02000000;
-    /** Mask to disable quickcontact (images will show as normal images) */
-    static final int MODE_MASK_DISABLE_QUIKCCONTACT = 0x01000000;
-    /** Mask to show the total number of contacts at the top */
-    static final int MODE_MASK_SHOW_NUMBER_OF_CONTACTS = 0x00800000;
-
-    /** Unknown mode */
-    static final int MODE_UNKNOWN = 0;
-    /** Default mode */
-    static final int MODE_DEFAULT = 4 | MODE_MASK_SHOW_PHOTOS | MODE_MASK_SHOW_NUMBER_OF_CONTACTS;
-    /** Custom mode */
-    static final int MODE_CUSTOM = 8;
-    /** Show all starred contacts */
-    static final int MODE_STARRED = 20 | MODE_MASK_SHOW_PHOTOS;
-    /** Show frequently contacted contacts */
-    static final int MODE_FREQUENT = 30 | MODE_MASK_SHOW_PHOTOS;
-    /** Show starred and the frequent */
-    static final int MODE_STREQUENT = 35 | MODE_MASK_SHOW_PHOTOS | MODE_MASK_SHOW_CALL_BUTTON;
-    /** Show all contacts and pick them when clicking */
-    static final int MODE_PICK_CONTACT = 40 | MODE_MASK_PICKER | MODE_MASK_SHOW_PHOTOS
-            | MODE_MASK_DISABLE_QUIKCCONTACT;
-    /** Show all contacts as well as the option to create a new one */
-    static final int MODE_PICK_OR_CREATE_CONTACT = 42 | MODE_MASK_PICKER | MODE_MASK_CREATE_NEW
-            | MODE_MASK_SHOW_PHOTOS | MODE_MASK_DISABLE_QUIKCCONTACT;
-    /** Show all people through the legacy provider and pick them when clicking */
-    static final int MODE_LEGACY_PICK_PERSON = 43 | MODE_MASK_PICKER
-            | MODE_MASK_DISABLE_QUIKCCONTACT;
-    /** Show all people through the legacy provider as well as the option to create a new one */
-    static final int MODE_LEGACY_PICK_OR_CREATE_PERSON = 44 | MODE_MASK_PICKER
-            | MODE_MASK_CREATE_NEW | MODE_MASK_DISABLE_QUIKCCONTACT;
-    /** Show all contacts and pick them when clicking, and allow creating a new contact */
-    static final int MODE_INSERT_OR_EDIT_CONTACT = 45 | MODE_MASK_PICKER | MODE_MASK_CREATE_NEW
-            | MODE_MASK_SHOW_PHOTOS | MODE_MASK_DISABLE_QUIKCCONTACT;
-    /** Show all phone numbers and pick them when clicking */
-    static final int MODE_PICK_PHONE = 50 | MODE_MASK_PICKER | MODE_MASK_NO_PRESENCE;
-    /** Show all phone numbers through the legacy provider and pick them when clicking */
-    static final int MODE_LEGACY_PICK_PHONE =
-            51 | MODE_MASK_PICKER | MODE_MASK_NO_PRESENCE | MODE_MASK_NO_FILTER;
-    /** Show all postal addresses and pick them when clicking */
-    static final int MODE_PICK_POSTAL =
-            55 | MODE_MASK_PICKER | MODE_MASK_NO_PRESENCE | MODE_MASK_NO_FILTER;
-    /** Show all postal addresses and pick them when clicking */
-    static final int MODE_LEGACY_PICK_POSTAL =
-            56 | MODE_MASK_PICKER | MODE_MASK_NO_PRESENCE | MODE_MASK_NO_FILTER;
-    static final int MODE_GROUP = 57 | MODE_MASK_SHOW_PHOTOS;
-    /** Run a search query */
-    static final int MODE_QUERY = 60 | MODE_MASK_SHOW_PHOTOS | MODE_MASK_NO_FILTER
-            | MODE_MASK_SHOW_NUMBER_OF_CONTACTS;
-    /** Run a search query in PICK mode, but that still launches to VIEW */
-    static final int MODE_QUERY_PICK_TO_VIEW = 65 | MODE_MASK_SHOW_PHOTOS | MODE_MASK_PICKER
-            | MODE_MASK_SHOW_NUMBER_OF_CONTACTS;
-
-    /** Show join suggestions followed by an A-Z list */
-    static final int MODE_JOIN_CONTACT = 70 | MODE_MASK_PICKER | MODE_MASK_NO_PRESENCE
-            | MODE_MASK_NO_DATA | MODE_MASK_SHOW_PHOTOS | MODE_MASK_DISABLE_QUIKCCONTACT;
-
-    /** Run a search query in a PICK mode */
-    static final int MODE_QUERY_PICK = 75 | MODE_MASK_SHOW_PHOTOS | MODE_MASK_NO_FILTER
-            | MODE_MASK_PICKER | MODE_MASK_DISABLE_QUIKCCONTACT | MODE_MASK_SHOW_NUMBER_OF_CONTACTS;
-
-    /** Run a search query in a PICK_PHONE mode */
-    static final int MODE_QUERY_PICK_PHONE = 80 | MODE_MASK_NO_FILTER | MODE_MASK_PICKER
-            | MODE_MASK_SHOW_NUMBER_OF_CONTACTS;
-
-    /** Run a search query in PICK mode, but that still launches to EDIT */
-    static final int MODE_QUERY_PICK_TO_EDIT = 85 | MODE_MASK_NO_FILTER | MODE_MASK_SHOW_PHOTOS
-            | MODE_MASK_PICKER | MODE_MASK_SHOW_NUMBER_OF_CONTACTS;
-
-    /**
-     * An action used to do perform search while in a contact picker.  It is initiated
-     * by the ContactListActivity itself.
-     */
-    private static final String ACTION_SEARCH_INTERNAL = "com.android.contacts.INTERNAL_SEARCH";
-
-    /** Maximum number of suggestions shown for joining aggregates */
-    static final int MAX_SUGGESTIONS = 4;
-
-    static final String[] CONTACTS_SUMMARY_PROJECTION = new String[] {
-        Contacts._ID,                       // 0
-        Contacts.DISPLAY_NAME_PRIMARY,      // 1
-        Contacts.DISPLAY_NAME_ALTERNATIVE,  // 2
-        Contacts.SORT_KEY_PRIMARY,          // 3
-        Contacts.STARRED,                   // 4
-        Contacts.TIMES_CONTACTED,           // 5
-        Contacts.CONTACT_PRESENCE,          // 6
-        Contacts.PHOTO_ID,                  // 7
-        Contacts.LOOKUP_KEY,                // 8
-        Contacts.PHONETIC_NAME,             // 9
-        Contacts.HAS_PHONE_NUMBER,          // 10
-    };
-    static final String[] CONTACTS_SUMMARY_PROJECTION_FROM_EMAIL = new String[] {
-        Contacts._ID,                       // 0
-        Contacts.DISPLAY_NAME_PRIMARY,      // 1
-        Contacts.DISPLAY_NAME_ALTERNATIVE,  // 2
-        Contacts.SORT_KEY_PRIMARY,          // 3
-        Contacts.STARRED,                   // 4
-        Contacts.TIMES_CONTACTED,           // 5
-        Contacts.CONTACT_PRESENCE,          // 6
-        Contacts.PHOTO_ID,                  // 7
-        Contacts.LOOKUP_KEY,                // 8
-        Contacts.PHONETIC_NAME,             // 9
-        // email lookup doesn't included HAS_PHONE_NUMBER in projection
-    };
-
-    static final String[] CONTACTS_SUMMARY_FILTER_PROJECTION = new String[] {
-        Contacts._ID,                       // 0
-        Contacts.DISPLAY_NAME_PRIMARY,      // 1
-        Contacts.DISPLAY_NAME_ALTERNATIVE,  // 2
-        Contacts.SORT_KEY_PRIMARY,          // 3
-        Contacts.STARRED,                   // 4
-        Contacts.TIMES_CONTACTED,           // 5
-        Contacts.CONTACT_PRESENCE,          // 6
-        Contacts.PHOTO_ID,                  // 7
-        Contacts.LOOKUP_KEY,                // 8
-        Contacts.PHONETIC_NAME,             // 9
-        Contacts.HAS_PHONE_NUMBER,          // 10
-        SearchSnippetColumns.SNIPPET_MIMETYPE, // 11
-        SearchSnippetColumns.SNIPPET_DATA1,     // 12
-        SearchSnippetColumns.SNIPPET_DATA4,     // 13
-    };
-
-    static final String[] LEGACY_PEOPLE_PROJECTION = new String[] {
-        People._ID,                         // 0
-        People.DISPLAY_NAME,                // 1
-        People.DISPLAY_NAME,                // 2
-        People.DISPLAY_NAME,                // 3
-        People.STARRED,                     // 4
-        PeopleColumns.TIMES_CONTACTED,      // 5
-        People.PRESENCE_STATUS,             // 6
-    };
-    static final int SUMMARY_ID_COLUMN_INDEX = 0;
-    static final int SUMMARY_DISPLAY_NAME_PRIMARY_COLUMN_INDEX = 1;
-    static final int SUMMARY_DISPLAY_NAME_ALTERNATIVE_COLUMN_INDEX = 2;
-    static final int SUMMARY_SORT_KEY_PRIMARY_COLUMN_INDEX = 3;
-    static final int SUMMARY_STARRED_COLUMN_INDEX = 4;
-    static final int SUMMARY_TIMES_CONTACTED_COLUMN_INDEX = 5;
-    static final int SUMMARY_PRESENCE_STATUS_COLUMN_INDEX = 6;
-    static final int SUMMARY_PHOTO_ID_COLUMN_INDEX = 7;
-    static final int SUMMARY_LOOKUP_KEY_COLUMN_INDEX = 8;
-    static final int SUMMARY_PHONETIC_NAME_COLUMN_INDEX = 9;
-    static final int SUMMARY_HAS_PHONE_COLUMN_INDEX = 10;
-    static final int SUMMARY_SNIPPET_MIMETYPE_COLUMN_INDEX = 11;
-    static final int SUMMARY_SNIPPET_DATA1_COLUMN_INDEX = 12;
-    static final int SUMMARY_SNIPPET_DATA4_COLUMN_INDEX = 13;
-
-    static final String[] PHONES_PROJECTION = new String[] {
-        Phone._ID, //0
-        Phone.TYPE, //1
-        Phone.LABEL, //2
-        Phone.NUMBER, //3
-        Phone.DISPLAY_NAME, // 4
-        Phone.CONTACT_ID, // 5
-    };
-    static final String[] LEGACY_PHONES_PROJECTION = new String[] {
-        Phones._ID, //0
-        Phones.TYPE, //1
-        Phones.LABEL, //2
-        Phones.NUMBER, //3
-        People.DISPLAY_NAME, // 4
-    };
-    static final int PHONE_ID_COLUMN_INDEX = 0;
-    static final int PHONE_TYPE_COLUMN_INDEX = 1;
-    static final int PHONE_LABEL_COLUMN_INDEX = 2;
-    static final int PHONE_NUMBER_COLUMN_INDEX = 3;
-    static final int PHONE_DISPLAY_NAME_COLUMN_INDEX = 4;
-    static final int PHONE_CONTACT_ID_COLUMN_INDEX = 5;
-
-    static final String[] POSTALS_PROJECTION = new String[] {
-        StructuredPostal._ID, //0
-        StructuredPostal.TYPE, //1
-        StructuredPostal.LABEL, //2
-        StructuredPostal.DATA, //3
-        StructuredPostal.DISPLAY_NAME, // 4
-    };
-    static final String[] LEGACY_POSTALS_PROJECTION = new String[] {
-        ContactMethods._ID, //0
-        ContactMethods.TYPE, //1
-        ContactMethods.LABEL, //2
-        ContactMethods.DATA, //3
-        People.DISPLAY_NAME, // 4
-    };
-    static final String[] RAW_CONTACTS_PROJECTION = new String[] {
-        RawContacts._ID, //0
-        RawContacts.CONTACT_ID, //1
-        RawContacts.ACCOUNT_TYPE, //2
-    };
-
-    static final int POSTAL_ID_COLUMN_INDEX = 0;
-    static final int POSTAL_TYPE_COLUMN_INDEX = 1;
-    static final int POSTAL_LABEL_COLUMN_INDEX = 2;
-    static final int POSTAL_ADDRESS_COLUMN_INDEX = 3;
-    static final int POSTAL_DISPLAY_NAME_COLUMN_INDEX = 4;
-
-    private static final int QUERY_TOKEN = 42;
-
-    static final String KEY_PICKER_MODE = "picker_mode";
-
-    private ContactItemListAdapter mAdapter;
-
-    int mMode = MODE_DEFAULT;
-
-    private QueryHandler mQueryHandler;
-    private boolean mJustCreated;
-    private boolean mSyncEnabled;
-    Uri mSelectedContactUri;
-
-//    private boolean mDisplayAll;
-    private boolean mDisplayOnlyPhones;
-
-    private Uri mGroupUri;
-
-    private long mQueryAggregateId;
-
-    private ArrayList<Long> mWritableRawContactIds = new ArrayList<Long>();
-    private int  mWritableSourcesCnt;
-    private int  mReadOnlySourcesCnt;
-
-    /**
-     * Used to keep track of the scroll state of the list.
-     */
-    private Parcelable mListState = null;
-
-    private String mShortcutAction;
-
-    /**
-     * Internal query type when in mode {@link #MODE_QUERY_PICK_TO_VIEW}.
-     */
-    private int mQueryMode = QUERY_MODE_NONE;
-
-    private static final int QUERY_MODE_NONE = -1;
-    private static final int QUERY_MODE_MAILTO = 1;
-    private static final int QUERY_MODE_TEL = 2;
-
-    private int mProviderStatus = ProviderStatus.STATUS_NORMAL;
-
-    private boolean mSearchMode;
-    private boolean mSearchResultsMode;
-    private boolean mShowNumberOfContacts;
-
-    private boolean mShowSearchSnippets;
-    private boolean mSearchInitiated;
-
-    private String mInitialFilter;
-
-    private static final String CLAUSE_ONLY_VISIBLE = Contacts.IN_VISIBLE_GROUP + "=1";
-    private static final String CLAUSE_ONLY_PHONES = Contacts.HAS_PHONE_NUMBER + "=1";
-
-    /**
-     * In the {@link #MODE_JOIN_CONTACT} determines whether we display a list item with the label
-     * "Show all contacts" or actually show all contacts
-     */
-    private boolean mJoinModeShowAllContacts;
-
-    /**
-     * The ID of the special item described above.
-     */
-    private static final long JOIN_MODE_SHOW_ALL_CONTACTS_ID = -2;
-
-    // Uri matcher for contact id
-    private static final int CONTACTS_ID = 1001;
-    private static final UriMatcher sContactsIdMatcher;
-
-    private ContactPhotoLoader mPhotoLoader;
-
-    final String[] sLookupProjection = new String[] {
-            Contacts.LOOKUP_KEY
-    };
-
-    static {
-        sContactsIdMatcher = new UriMatcher(UriMatcher.NO_MATCH);
-        sContactsIdMatcher.addURI(ContactsContract.AUTHORITY, "contacts/#", CONTACTS_ID);
-    }
-
-    private class DeleteClickListener implements DialogInterface.OnClickListener {
-        public void onClick(DialogInterface dialog, int which) {
-            if (mSelectedContactUri != null) {
-                getContentResolver().delete(mSelectedContactUri, null, null);
-            }
-        }
-    }
-
-    /**
-     * A {@link TextHighlightingAnimation} that redraws just the contact display name in a
-     * list item.
-     */
-    private static class NameHighlightingAnimation extends TextHighlightingAnimation {
-        private final ListView mListView;
-
-        private NameHighlightingAnimation(ListView listView, int duration) {
-            super(duration);
-            this.mListView = listView;
-        }
-
-        /**
-         * Redraws all visible items of the list corresponding to contacts
-         */
-        @Override
-        protected void invalidate() {
-            int childCount = mListView.getChildCount();
-            for (int i = 0; i < childCount; i++) {
-                View itemView = mListView.getChildAt(i);
-                if (itemView instanceof ContactListItemView) {
-                    final ContactListItemView view = (ContactListItemView)itemView;
-                    view.getNameTextView().invalidate();
-                }
-            }
-        }
-
-        @Override
-        protected void onAnimationStarted() {
-            mListView.setScrollingCacheEnabled(false);
-        }
-
-        @Override
-        protected void onAnimationEnded() {
-            mListView.setScrollingCacheEnabled(true);
-        }
-    }
-
-    // The size of a home screen shortcut icon.
-    private int mIconSize;
-    private ContactsPreferences mContactsPrefs;
-    private int mDisplayOrder;
-    private int mSortOrder;
-    private boolean mHighlightWhenScrolling;
-    private TextHighlightingAnimation mHighlightingAnimation;
-    private SearchEditText mSearchEditText;
-
-    /**
-     * An approximation of the background color of the pinned header. This color
-     * is used when the pinned header is being pushed up.  At that point the header
-     * "fades away".  Rather than computing a faded bitmap based on the 9-patch
-     * normally used for the background, we will use a solid color, which will
-     * provide better performance and reduced complexity.
-     */
-    private int mPinnedHeaderBackgroundColor;
-
-    private ContentObserver mProviderStatusObserver = new ContentObserver(new Handler()) {
-
-        @Override
-        public void onChange(boolean selfChange) {
-            checkProviderState(true);
-        }
-    };
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        mIconSize = getResources().getDimensionPixelSize(android.R.dimen.app_icon_size);
-        mContactsPrefs = new ContactsPreferences(this);
-        mPhotoLoader = new ContactPhotoLoader(this, R.drawable.ic_contact_list_picture);
-
-        // Resolve the intent
-        final Intent intent = getIntent();
-
-        // Allow the title to be set to a custom String using an extra on the intent
-        String title = intent.getStringExtra(UI.TITLE_EXTRA_KEY);
-        if (title != null) {
-            setTitle(title);
-        }
-
-        String action = intent.getAction();
-        String component = intent.getComponent().getClassName();
-
-        // When we get a FILTER_CONTACTS_ACTION, it represents search in the context
-        // of some other action. Let's retrieve the original action to provide proper
-        // context for the search queries.
-        if (UI.FILTER_CONTACTS_ACTION.equals(action)) {
-            mSearchMode = true;
-            mShowSearchSnippets = true;
-            Bundle extras = intent.getExtras();
-            if (extras != null) {
-                mInitialFilter = extras.getString(UI.FILTER_TEXT_EXTRA_KEY);
-                String originalAction =
-                        extras.getString(ContactsSearchManager.ORIGINAL_ACTION_EXTRA_KEY);
-                if (originalAction != null) {
-                    action = originalAction;
-                }
-                String originalComponent =
-                        extras.getString(ContactsSearchManager.ORIGINAL_COMPONENT_EXTRA_KEY);
-                if (originalComponent != null) {
-                    component = originalComponent;
-                }
-            } else {
-                mInitialFilter = null;
-            }
-        }
-
-        Log.i(TAG, "Called with action: " + action);
-        mMode = MODE_UNKNOWN;
-        if (UI.LIST_DEFAULT.equals(action) || UI.FILTER_CONTACTS_ACTION.equals(action)) {
-            mMode = MODE_DEFAULT;
-            // When mDefaultMode is true the mode is set in onResume(), since the preferneces
-            // activity may change it whenever this activity isn't running
-        } else if (UI.LIST_GROUP_ACTION.equals(action)) {
-            mMode = MODE_GROUP;
-            String groupName = intent.getStringExtra(UI.GROUP_NAME_EXTRA_KEY);
-            if (TextUtils.isEmpty(groupName)) {
-                finish();
-                return;
-            }
-            buildUserGroupUri(groupName);
-        } else if (UI.LIST_ALL_CONTACTS_ACTION.equals(action)) {
-            mMode = MODE_CUSTOM;
-            mDisplayOnlyPhones = false;
-        } else if (UI.LIST_STARRED_ACTION.equals(action)) {
-            mMode = mSearchMode ? MODE_DEFAULT : MODE_STARRED;
-        } else if (UI.LIST_FREQUENT_ACTION.equals(action)) {
-            mMode = mSearchMode ? MODE_DEFAULT : MODE_FREQUENT;
-        } else if (UI.LIST_STREQUENT_ACTION.equals(action)) {
-            mMode = mSearchMode ? MODE_DEFAULT : MODE_STREQUENT;
-        } else if (UI.LIST_CONTACTS_WITH_PHONES_ACTION.equals(action)) {
-            mMode = MODE_CUSTOM;
-            mDisplayOnlyPhones = true;
-        } else if (Intent.ACTION_PICK.equals(action)) {
-            // XXX These should be showing the data from the URI given in
-            // the Intent.
-            final String type = intent.resolveType(this);
-            if (Contacts.CONTENT_TYPE.equals(type)) {
-                mMode = MODE_PICK_CONTACT;
-            } else if (People.CONTENT_TYPE.equals(type)) {
-                mMode = MODE_LEGACY_PICK_PERSON;
-            } else if (Phone.CONTENT_TYPE.equals(type)) {
-                mMode = MODE_PICK_PHONE;
-            } else if (Phones.CONTENT_TYPE.equals(type)) {
-                mMode = MODE_LEGACY_PICK_PHONE;
-            } else if (StructuredPostal.CONTENT_TYPE.equals(type)) {
-                mMode = MODE_PICK_POSTAL;
-            } else if (ContactMethods.CONTENT_POSTAL_TYPE.equals(type)) {
-                mMode = MODE_LEGACY_PICK_POSTAL;
-            }
-        } else if (Intent.ACTION_CREATE_SHORTCUT.equals(action)) {
-            if (component.equals("alias.DialShortcut")) {
-                mMode = MODE_PICK_PHONE;
-                mShortcutAction = Intent.ACTION_CALL;
-                mShowSearchSnippets = false;
-                setTitle(R.string.callShortcutActivityTitle);
-            } else if (component.equals("alias.MessageShortcut")) {
-                mMode = MODE_PICK_PHONE;
-                mShortcutAction = Intent.ACTION_SENDTO;
-                mShowSearchSnippets = false;
-                setTitle(R.string.messageShortcutActivityTitle);
-            } else if (mSearchMode) {
-                mMode = MODE_PICK_CONTACT;
-                mShortcutAction = Intent.ACTION_VIEW;
-                setTitle(R.string.shortcutActivityTitle);
-            } else {
-                mMode = MODE_PICK_OR_CREATE_CONTACT;
-                mShortcutAction = Intent.ACTION_VIEW;
-                setTitle(R.string.shortcutActivityTitle);
-            }
-        } else if (Intent.ACTION_GET_CONTENT.equals(action)) {
-            final String type = intent.resolveType(this);
-            if (Contacts.CONTENT_ITEM_TYPE.equals(type)) {
-                if (mSearchMode) {
-                    mMode = MODE_PICK_CONTACT;
-                } else {
-                    mMode = MODE_PICK_OR_CREATE_CONTACT;
-                }
-            } else if (Phone.CONTENT_ITEM_TYPE.equals(type)) {
-                mMode = MODE_PICK_PHONE;
-            } else if (Phones.CONTENT_ITEM_TYPE.equals(type)) {
-                mMode = MODE_LEGACY_PICK_PHONE;
-            } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(type)) {
-                mMode = MODE_PICK_POSTAL;
-            } else if (ContactMethods.CONTENT_POSTAL_ITEM_TYPE.equals(type)) {
-                mMode = MODE_LEGACY_PICK_POSTAL;
-            }  else if (People.CONTENT_ITEM_TYPE.equals(type)) {
-                if (mSearchMode) {
-                    mMode = MODE_LEGACY_PICK_PERSON;
-                } else {
-                    mMode = MODE_LEGACY_PICK_OR_CREATE_PERSON;
-                }
-            }
-
-        } else if (Intent.ACTION_INSERT_OR_EDIT.equals(action)) {
-            mMode = MODE_INSERT_OR_EDIT_CONTACT;
-        } else if (Intent.ACTION_SEARCH.equals(action)) {
-            // See if the suggestion was clicked with a search action key (call button)
-            if ("call".equals(intent.getStringExtra(SearchManager.ACTION_MSG))) {
-                String query = intent.getStringExtra(SearchManager.QUERY);
-                if (!TextUtils.isEmpty(query)) {
-                    Intent newIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
-                            Uri.fromParts("tel", query, null));
-                    startActivity(newIntent);
-                }
-                finish();
-                return;
-            }
-
-            // See if search request has extras to specify query
-            if (intent.hasExtra(Insert.EMAIL)) {
-                mMode = MODE_QUERY_PICK_TO_VIEW;
-                mQueryMode = QUERY_MODE_MAILTO;
-                mInitialFilter = intent.getStringExtra(Insert.EMAIL);
-            } else if (intent.hasExtra(Insert.PHONE)) {
-                mMode = MODE_QUERY_PICK_TO_VIEW;
-                mQueryMode = QUERY_MODE_TEL;
-                mInitialFilter = intent.getStringExtra(Insert.PHONE);
-            } else {
-                // Otherwise handle the more normal search case
-                mMode = MODE_QUERY;
-                mShowSearchSnippets = true;
-                mInitialFilter = getIntent().getStringExtra(SearchManager.QUERY);
-            }
-            mSearchResultsMode = true;
-        } else if (ACTION_SEARCH_INTERNAL.equals(action)) {
-            String originalAction = null;
-            Bundle extras = intent.getExtras();
-            if (extras != null) {
-                originalAction = extras.getString(ContactsSearchManager.ORIGINAL_ACTION_EXTRA_KEY);
-            }
-            mShortcutAction = intent.getStringExtra(SHORTCUT_ACTION_KEY);
-
-            if (Intent.ACTION_INSERT_OR_EDIT.equals(originalAction)) {
-                mMode = MODE_QUERY_PICK_TO_EDIT;
-                mShowSearchSnippets = true;
-                mInitialFilter = getIntent().getStringExtra(SearchManager.QUERY);
-            } else if (mShortcutAction != null && intent.hasExtra(Insert.PHONE)) {
-                mMode = MODE_QUERY_PICK_PHONE;
-                mQueryMode = QUERY_MODE_TEL;
-                mInitialFilter = intent.getStringExtra(Insert.PHONE);
-            } else {
-                mMode = MODE_QUERY_PICK;
-                mQueryMode = QUERY_MODE_NONE;
-                mShowSearchSnippets = true;
-                mInitialFilter = getIntent().getStringExtra(SearchManager.QUERY);
-            }
-            mSearchResultsMode = true;
-        // Since this is the filter activity it receives all intents
-        // dispatched from the SearchManager for security reasons
-        // so we need to re-dispatch from here to the intended target.
-        } else if (Intents.SEARCH_SUGGESTION_CLICKED.equals(action)) {
-            Uri data = intent.getData();
-            Uri telUri = null;
-            if (sContactsIdMatcher.match(data) == CONTACTS_ID) {
-                long contactId = Long.valueOf(data.getLastPathSegment());
-                final Cursor cursor = queryPhoneNumbers(contactId);
-                if (cursor != null) {
-                    if (cursor.getCount() == 1 && cursor.moveToFirst()) {
-                        int phoneNumberIndex = cursor.getColumnIndex(Phone.NUMBER);
-                        String phoneNumber = cursor.getString(phoneNumberIndex);
-                        telUri = Uri.parse("tel:" + phoneNumber);
-                    }
-                    cursor.close();
-                }
-            }
-            // See if the suggestion was clicked with a search action key (call button)
-            Intent newIntent;
-            if ("call".equals(intent.getStringExtra(SearchManager.ACTION_MSG)) && telUri != null) {
-                newIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, telUri);
-            } else {
-                newIntent = new Intent(Intent.ACTION_VIEW, data);
-            }
-            startActivity(newIntent);
-            finish();
-            return;
-        } else if (Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED.equals(action)) {
-            Intent newIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, intent.getData());
-            startActivity(newIntent);
-            finish();
-            return;
-        } else if (Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED.equals(action)) {
-            // TODO actually support this in EditContactActivity.
-            String number = intent.getData().getSchemeSpecificPart();
-            Intent newIntent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
-            newIntent.putExtra(Intents.Insert.PHONE, number);
-            startActivity(newIntent);
-            finish();
-            return;
-        }
-
-        if (JOIN_AGGREGATE.equals(action)) {
-            if (mSearchMode) {
-                mMode = MODE_PICK_CONTACT;
-            } else {
-                mMode = MODE_JOIN_CONTACT;
-                mQueryAggregateId = intent.getLongExtra(EXTRA_AGGREGATE_ID, -1);
-                if (mQueryAggregateId == -1) {
-                    Log.e(TAG, "Intent " + action + " is missing required extra: "
-                            + EXTRA_AGGREGATE_ID);
-                    setResult(RESULT_CANCELED);
-                    finish();
-                }
-            }
-        }
-
-        if (mMode == MODE_UNKNOWN) {
-            mMode = MODE_DEFAULT;
-        }
-
-        if (((mMode & MODE_MASK_SHOW_NUMBER_OF_CONTACTS) != 0 || mSearchMode)
-                && !mSearchResultsMode) {
-            mShowNumberOfContacts = true;
-        }
-
-        if (mMode == MODE_JOIN_CONTACT) {
-            setContentView(R.layout.contacts_list_content_join);
-            TextView blurbView = (TextView)findViewById(R.id.join_contact_blurb);
-
-            String blurb = getString(R.string.blurbJoinContactDataWith,
-                    getContactDisplayName(mQueryAggregateId));
-            blurbView.setText(blurb);
-            mJoinModeShowAllContacts = true;
-        } else if (mSearchMode) {
-            setContentView(R.layout.contacts_search_content);
-        } else if (mSearchResultsMode) {
-            setContentView(R.layout.contacts_list_search_results);
-            TextView titleText = (TextView)findViewById(R.id.search_results_for);
-            titleText.setText(Html.fromHtml(getString(R.string.search_results_for,
-                    "<b>" + mInitialFilter + "</b>")));
-        } else {
-            setContentView(R.layout.contacts_list_content);
-        }
-
-        setupListView();
-        if (mSearchMode) {
-            setupSearchView();
-        }
-
-        mQueryHandler = new QueryHandler(this);
-        mJustCreated = true;
-
-        mSyncEnabled = true;
-    }
-
-    /**
-     * Register an observer for provider status changes - we will need to
-     * reflect them in the UI.
-     */
-    private void registerProviderStatusObserver() {
-        getContentResolver().registerContentObserver(ProviderStatus.CONTENT_URI,
-                false, mProviderStatusObserver);
-    }
-
-    /**
-     * Register an observer for provider status changes - we will need to
-     * reflect them in the UI.
-     */
-    private void unregisterProviderStatusObserver() {
-        getContentResolver().unregisterContentObserver(mProviderStatusObserver);
-    }
-
-    private void setupListView() {
-        final ListView list = getListView();
-        final LayoutInflater inflater = getLayoutInflater();
-
-        mHighlightingAnimation =
-                new NameHighlightingAnimation(list, TEXT_HIGHLIGHTING_ANIMATION_DURATION);
-
-        // Tell list view to not show dividers. We'll do it ourself so that we can *not* show
-        // them when an A-Z headers is visible.
-        list.setDividerHeight(0);
-        list.setOnCreateContextMenuListener(this);
-
-        mAdapter = new ContactItemListAdapter(this);
-        setListAdapter(mAdapter);
-
-        if (list instanceof PinnedHeaderListView && mAdapter.getDisplaySectionHeadersEnabled()) {
-            mPinnedHeaderBackgroundColor =
-                    getResources().getColor(R.color.pinned_header_background);
-            PinnedHeaderListView pinnedHeaderList = (PinnedHeaderListView)list;
-            View pinnedHeader = inflater.inflate(R.layout.list_section, list, false);
-            pinnedHeaderList.setPinnedHeaderView(pinnedHeader);
-        }
-
-        list.setOnScrollListener(mAdapter);
-        list.setOnKeyListener(this);
-        list.setOnFocusChangeListener(this);
-        list.setOnTouchListener(this);
-
-        // We manually save/restore the listview state
-        list.setSaveEnabled(false);
-    }
-
-    /**
-     * Configures search UI.
-     */
-    private void setupSearchView() {
-        mSearchEditText = (SearchEditText)findViewById(R.id.search_src_text);
-        mSearchEditText.addTextChangedListener(this);
-        mSearchEditText.setOnEditorActionListener(this);
-        mSearchEditText.setText(mInitialFilter);
-    }
-
-    private String getContactDisplayName(long contactId) {
-        String contactName = null;
-        Cursor c = getContentResolver().query(
-                ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId),
-                new String[] {Contacts.DISPLAY_NAME}, null, null, null);
-        try {
-            if (c != null && c.moveToFirst()) {
-                contactName = c.getString(0);
-            }
-        } finally {
-            if (c != null) {
-                c.close();
-            }
-        }
-
-        if (contactName == null) {
-            contactName = "";
-        }
-
-        return contactName;
-    }
-
-    private int getSummaryDisplayNameColumnIndex() {
-        if (mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
-            return SUMMARY_DISPLAY_NAME_PRIMARY_COLUMN_INDEX;
-        } else {
-            return SUMMARY_DISPLAY_NAME_ALTERNATIVE_COLUMN_INDEX;
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View v) {
-        int id = v.getId();
-        switch (id) {
-            // TODO a better way of identifying the button
-            case android.R.id.button1: {
-                final int position = (Integer)v.getTag();
-                Cursor c = mAdapter.getCursor();
-                if (c != null) {
-                    c.moveToPosition(position);
-                    callContact(c);
-                }
-                break;
-            }
-        }
-    }
-
-    private void setEmptyText() {
-        if (mMode == MODE_JOIN_CONTACT || mSearchMode) {
-            return;
-        }
-
-        TextView empty = (TextView) findViewById(R.id.emptyText);
-        if (mDisplayOnlyPhones) {
-            empty.setText(getText(R.string.noContactsWithPhoneNumbers));
-        } else if (mMode == MODE_STREQUENT || mMode == MODE_STARRED) {
-            empty.setText(getText(R.string.noFavoritesHelpText));
-        } else if (mMode == MODE_QUERY || mMode == MODE_QUERY_PICK
-                || mMode == MODE_QUERY_PICK_PHONE || mMode == MODE_QUERY_PICK_TO_VIEW
-                || mMode == MODE_QUERY_PICK_TO_EDIT) {
-            empty.setText(getText(R.string.noMatchingContacts));
-        } else {
-            boolean hasSim = ((TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE))
-                    .hasIccCard();
-            boolean createShortcut = Intent.ACTION_CREATE_SHORTCUT.equals(getIntent().getAction());
-            if (isSyncActive()) {
-                if (createShortcut) {
-                    // Help text is the same no matter whether there is SIM or not.
-                    empty.setText(getText(R.string.noContactsHelpTextWithSyncForCreateShortcut));
-                } else if (hasSim) {
-                    empty.setText(getText(R.string.noContactsHelpTextWithSync));
-                } else {
-                    empty.setText(getText(R.string.noContactsNoSimHelpTextWithSync));
-                }
-            } else {
-                if (createShortcut) {
-                    // Help text is the same no matter whether there is SIM or not.
-                    empty.setText(getText(R.string.noContactsHelpTextForCreateShortcut));
-                } else if (hasSim) {
-                    empty.setText(getText(R.string.noContactsHelpText));
-                } else {
-                    empty.setText(getText(R.string.noContactsNoSimHelpText));
-                }
-            }
-        }
-    }
-
-    private boolean isSyncActive() {
-        Account[] accounts = AccountManager.get(this).getAccounts();
-        if (accounts != null && accounts.length > 0) {
-            IContentService contentService = ContentResolver.getContentService();
-            for (Account account : accounts) {
-                try {
-                    if (contentService.isSyncActive(account, ContactsContract.AUTHORITY)) {
-                        return true;
-                    }
-                } catch (RemoteException e) {
-                    Log.e(TAG, "Could not get the sync status");
-                }
-            }
-        }
-        return false;
-    }
-
-    private void buildUserGroupUri(String group) {
-        mGroupUri = Uri.withAppendedPath(Contacts.CONTENT_GROUP_URI, group);
-    }
-
-    /**
-     * Sets the mode when the request is for "default"
-     */
-    private void setDefaultMode() {
-        // Load the preferences
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
-
-        mDisplayOnlyPhones = prefs.getBoolean(Prefs.DISPLAY_ONLY_PHONES,
-                Prefs.DISPLAY_ONLY_PHONES_DEFAULT);
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        mPhotoLoader.stop();
-    }
-
-    @Override
-    protected void onStart() {
-        super.onStart();
-
-        mContactsPrefs.registerChangeListener(mPreferencesChangeListener);
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        unregisterProviderStatusObserver();
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        registerProviderStatusObserver();
-        mPhotoLoader.resume();
-
-        Activity parent = getParent();
-
-        // Do this before setting the filter. The filter thread relies
-        // on some state that is initialized in setDefaultMode
-        if (mMode == MODE_DEFAULT) {
-            // If we're in default mode we need to possibly reset the mode due to a change
-            // in the preferences activity while we weren't running
-            setDefaultMode();
-        }
-
-        // See if we were invoked with a filter
-        if (mSearchMode) {
-            mSearchEditText.requestFocus();
-        }
-
-        if (!mSearchMode && !checkProviderState(mJustCreated)) {
-            return;
-        }
-
-        if (mJustCreated) {
-            // We need to start a query here the first time the activity is launched, as long
-            // as we aren't doing a filter.
-            startQuery();
-        }
-        mJustCreated = false;
-        mSearchInitiated = false;
-    }
-
-    /**
-     * Obtains the contacts provider status and configures the UI accordingly.
-     *
-     * @param loadData true if the method needs to start a query when the
-     *            provider is in the normal state
-     * @return true if the provider status is normal
-     */
-    private boolean checkProviderState(boolean loadData) {
-        View importFailureView = findViewById(R.id.import_failure);
-        if (importFailureView == null) {
-            return true;
-        }
-
-        TextView messageView = (TextView) findViewById(R.id.emptyText);
-
-        // This query can be performed on the UI thread because
-        // the API explicitly allows such use.
-        Cursor cursor = getContentResolver().query(ProviderStatus.CONTENT_URI, new String[] {
-                ProviderStatus.STATUS, ProviderStatus.DATA1
-        }, null, null, null);
-        try {
-            if (cursor.moveToFirst()) {
-                int status = cursor.getInt(0);
-                if (status != mProviderStatus) {
-                    mProviderStatus = status;
-                    switch (status) {
-                        case ProviderStatus.STATUS_NORMAL:
-                            mAdapter.notifyDataSetInvalidated();
-                            if (loadData) {
-                                startQuery();
-                            }
-                            break;
-
-                        case ProviderStatus.STATUS_CHANGING_LOCALE:
-                            messageView.setText(R.string.locale_change_in_progress);
-                            mAdapter.changeCursor(null);
-                            mAdapter.notifyDataSetInvalidated();
-                            break;
-
-                        case ProviderStatus.STATUS_UPGRADING:
-                            messageView.setText(R.string.upgrade_in_progress);
-                            mAdapter.changeCursor(null);
-                            mAdapter.notifyDataSetInvalidated();
-                            break;
-
-                        case ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY:
-                            long size = cursor.getLong(1);
-                            String message = getResources().getString(
-                                    R.string.upgrade_out_of_memory, new Object[] {size});
-                            messageView.setText(message);
-                            configureImportFailureView(importFailureView);
-                            mAdapter.changeCursor(null);
-                            mAdapter.notifyDataSetInvalidated();
-                            break;
-                    }
-                }
-            }
-        } finally {
-            cursor.close();
-        }
-
-        importFailureView.setVisibility(
-                mProviderStatus == ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY
-                        ? View.VISIBLE
-                        : View.GONE);
-        return mProviderStatus == ProviderStatus.STATUS_NORMAL;
-    }
-
-    private void configureImportFailureView(View importFailureView) {
-
-        OnClickListener listener = new OnClickListener(){
-
-            public void onClick(View v) {
-                switch(v.getId()) {
-                    case R.id.import_failure_uninstall_apps: {
-                        startActivity(new Intent(Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS));
-                        break;
-                    }
-                    case R.id.import_failure_retry_upgrade: {
-                        // Send a provider status update, which will trigger a retry
-                        ContentValues values = new ContentValues();
-                        values.put(ProviderStatus.STATUS, ProviderStatus.STATUS_UPGRADING);
-                        getContentResolver().update(ProviderStatus.CONTENT_URI, values, null, null);
-                        break;
-                    }
-                }
-            }};
-
-        Button uninstallApps = (Button) findViewById(R.id.import_failure_uninstall_apps);
-        uninstallApps.setOnClickListener(listener);
-
-        Button retryUpgrade = (Button) findViewById(R.id.import_failure_retry_upgrade);
-        retryUpgrade.setOnClickListener(listener);
-    }
-
-    private String getTextFilter() {
-        if (mSearchEditText != null) {
-            return mSearchEditText.getText().toString();
-        }
-        return null;
-    }
-
-    @Override
-    protected void onRestart() {
-        super.onRestart();
-
-        if (!checkProviderState(false)) {
-            return;
-        }
-
-        // The cursor was killed off in onStop(), so we need to get a new one here
-        // We do not perform the query if a filter is set on the list because the
-        // filter will cause the query to happen anyway
-        if (TextUtils.isEmpty(getTextFilter())) {
-            startQuery();
-        } else {
-            // Run the filtered query on the adapter
-            mAdapter.onContentChanged();
-        }
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle icicle) {
-        super.onSaveInstanceState(icicle);
-        // Save list state in the bundle so we can restore it after the QueryHandler has run
-        if (mList != null) {
-            icicle.putParcelable(LIST_STATE_KEY, mList.onSaveInstanceState());
-        }
-    }
-
-    @Override
-    protected void onRestoreInstanceState(Bundle icicle) {
-        super.onRestoreInstanceState(icicle);
-        // Retrieve list state. This will be applied after the QueryHandler has run
-        mListState = icicle.getParcelable(LIST_STATE_KEY);
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-
-        mContactsPrefs.unregisterChangeListener();
-        mAdapter.setSuggestionsCursor(null);
-        mAdapter.changeCursor(null);
-
-        if (mMode == MODE_QUERY) {
-            // Make sure the search box is closed
-            SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
-            searchManager.stopSearch();
-        }
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-
-        // If Contacts was invoked by another Activity simply as a way of
-        // picking a contact, don't show the options menu
-        if ((mMode & MODE_MASK_PICKER) == MODE_MASK_PICKER) {
-            return false;
-        }
-
-        MenuInflater inflater = getMenuInflater();
-        inflater.inflate(R.menu.list, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        final boolean defaultMode = (mMode == MODE_DEFAULT);
-        menu.findItem(R.id.menu_display_groups).setVisible(defaultMode);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.menu_display_groups: {
-                final Intent intent = new Intent(this, ContactsPreferencesActivity.class);
-                startActivityForResult(intent, SUBACTIVITY_DISPLAY_GROUP);
-                return true;
-            }
-            case R.id.menu_search: {
-                onSearchRequested();
-                return true;
-            }
-            case R.id.menu_add: {
-                final Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
-                startActivity(intent);
-                return true;
-            }
-            case R.id.menu_import_export: {
-                displayImportExportDialog();
-                return true;
-            }
-            case R.id.menu_accounts: {
-                final Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
-                intent.putExtra(AUTHORITIES_FILTER_KEY, new String[] {
-                    ContactsContract.AUTHORITY
-                });
-                startActivity(intent);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
-            boolean globalSearch) {
-        if (mProviderStatus != ProviderStatus.STATUS_NORMAL) {
-            return;
-        }
-
-        if (globalSearch) {
-            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-        } else {
-            if (!mSearchMode && (mMode & MODE_MASK_NO_FILTER) == 0) {
-                if ((mMode & MODE_MASK_PICKER) != 0) {
-                    ContactsSearchManager.startSearchForResult(this, initialQuery,
-                            SUBACTIVITY_FILTER);
-                } else {
-                    ContactsSearchManager.startSearch(this, initialQuery);
-                }
-            }
-        }
-    }
-
-    /**
-     * Performs filtering of the list based on the search query entered in the
-     * search text edit.
-     */
-    protected void onSearchTextChanged() {
-        // Set the proper empty string
-        setEmptyText();
-
-        Filter filter = mAdapter.getFilter();
-        filter.filter(getTextFilter());
-    }
-
-    /**
-     * Starts a new activity that will run a search query and display search results.
-     */
-    private void doSearch() {
-        String query = getTextFilter();
-        if (TextUtils.isEmpty(query)) {
-            return;
-        }
-
-        Intent intent = new Intent(this, SearchResultsActivity.class);
-        Intent originalIntent = getIntent();
-        Bundle originalExtras = originalIntent.getExtras();
-        if (originalExtras != null) {
-            intent.putExtras(originalExtras);
-        }
-
-        intent.putExtra(SearchManager.QUERY, query);
-        if ((mMode & MODE_MASK_PICKER) != 0) {
-            intent.setAction(ACTION_SEARCH_INTERNAL);
-            intent.putExtra(SHORTCUT_ACTION_KEY, mShortcutAction);
-            if (mShortcutAction != null) {
-                if (Intent.ACTION_CALL.equals(mShortcutAction)
-                        || Intent.ACTION_SENDTO.equals(mShortcutAction)) {
-                    intent.putExtra(Insert.PHONE, query);
-                }
-            } else {
-                switch (mQueryMode) {
-                    case QUERY_MODE_MAILTO:
-                        intent.putExtra(Insert.EMAIL, query);
-                        break;
-                    case QUERY_MODE_TEL:
-                        intent.putExtra(Insert.PHONE, query);
-                        break;
-                }
-            }
-            startActivityForResult(intent, SUBACTIVITY_SEARCH);
-        } else {
-            intent.setAction(Intent.ACTION_SEARCH);
-            startActivity(intent);
-        }
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int id, Bundle bundle) {
-        switch (id) {
-            case R.string.import_from_sim:
-            case R.string.import_from_sdcard: {
-                return AccountSelectionUtil.getSelectAccountDialog(this, id);
-            }
-            case R.id.dialog_sdcard_not_found: {
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.no_sdcard_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.no_sdcard_message)
-                        .setPositiveButton(android.R.string.ok, null).create();
-            }
-            case R.id.dialog_delete_contact_confirmation: {
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.deleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener()).create();
-            }
-            case R.id.dialog_readonly_contact_hide_confirmation: {
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.readOnlyContactWarning)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener()).create();
-            }
-            case R.id.dialog_readonly_contact_delete_confirmation: {
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.readOnlyContactDeleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener()).create();
-            }
-            case R.id.dialog_multiple_contact_delete_confirmation: {
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.multipleContactDeleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener()).create();
-            }
-        }
-        return super.onCreateDialog(id, bundle);
-    }
-
-    /**
-     * Create a {@link Dialog} that allows the user to pick from a bulk import
-     * or bulk export task across all contacts.
-     */
-    private void displayImportExportDialog() {
-        // Wrap our context to inflate list items using correct theme
-        final Context dialogContext = new ContextThemeWrapper(this, android.R.style.Theme_Light);
-        final Resources res = dialogContext.getResources();
-        final LayoutInflater dialogInflater = (LayoutInflater)dialogContext
-                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
-        // Adapter that shows a list of string resources
-        final ArrayAdapter<Integer> adapter = new ArrayAdapter<Integer>(this,
-                android.R.layout.simple_list_item_1) {
-            @Override
-            public View getView(int position, View convertView, ViewGroup parent) {
-                if (convertView == null) {
-                    convertView = dialogInflater.inflate(android.R.layout.simple_list_item_1,
-                            parent, false);
-                }
-
-                final int resId = this.getItem(position);
-                ((TextView)convertView).setText(resId);
-                return convertView;
-            }
-        };
-
-        if (TelephonyManager.getDefault().hasIccCard()) {
-            adapter.add(R.string.import_from_sim);
-        }
-        if (res.getBoolean(R.bool.config_allow_import_from_sdcard)) {
-            adapter.add(R.string.import_from_sdcard);
-        }
-        if (res.getBoolean(R.bool.config_allow_export_to_sdcard)) {
-            adapter.add(R.string.export_to_sdcard);
-        }
-        if (res.getBoolean(R.bool.config_allow_share_visible_contacts)) {
-            adapter.add(R.string.share_visible_contacts);
-        }
-
-        final DialogInterface.OnClickListener clickListener =
-                new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                dialog.dismiss();
-
-                final int resId = adapter.getItem(which);
-                switch (resId) {
-                    case R.string.import_from_sim:
-                    case R.string.import_from_sdcard: {
-                        handleImportRequest(resId);
-                        break;
-                    }
-                    case R.string.export_to_sdcard: {
-                        Context context = ContactsListActivity.this;
-                        Intent exportIntent = new Intent(context, ExportVCardActivity.class);
-                        context.startActivity(exportIntent);
-                        break;
-                    }
-                    case R.string.share_visible_contacts: {
-                        doShareVisibleContacts();
-                        break;
-                    }
-                    default: {
-                        Log.e(TAG, "Unexpected resource: " +
-                                getResources().getResourceEntryName(resId));
-                    }
-                }
-            }
-        };
-
-        new AlertDialog.Builder(this)
-            .setTitle(R.string.dialog_import_export)
-            .setNegativeButton(android.R.string.cancel, null)
-            .setSingleChoiceItems(adapter, -1, clickListener)
-            .show();
-    }
-
-    private void doShareVisibleContacts() {
-        final Cursor cursor = getContentResolver().query(Contacts.CONTENT_URI,
-                sLookupProjection, getContactSelection(), null, null);
-        try {
-            if (!cursor.moveToFirst()) {
-                Toast.makeText(this, R.string.share_error, Toast.LENGTH_SHORT).show();
-                return;
-            }
-
-            StringBuilder uriListBuilder = new StringBuilder();
-            int index = 0;
-            for (;!cursor.isAfterLast(); cursor.moveToNext()) {
-                if (index != 0)
-                    uriListBuilder.append(':');
-                uriListBuilder.append(cursor.getString(0));
-                index++;
-            }
-            Uri uri = Uri.withAppendedPath(
-                    Contacts.CONTENT_MULTI_VCARD_URI,
-                    Uri.encode(uriListBuilder.toString()));
-
-            final Intent intent = new Intent(Intent.ACTION_SEND);
-            intent.setType(Contacts.CONTENT_VCARD_TYPE);
-            intent.putExtra(Intent.EXTRA_STREAM, uri);
-            startActivity(intent);
-        } finally {
-            cursor.close();
-        }
-    }
-
-    private void handleImportRequest(int resId) {
-        // There's three possibilities:
-        // - more than one accounts -> ask the user
-        // - just one account -> use the account without asking the user
-        // - no account -> use phone-local storage without asking the user
-        final Sources sources = Sources.getInstance(this);
-        final List<Account> accountList = sources.getAccounts(true);
-        final int size = accountList.size();
-        if (size > 1) {
-            showDialog(resId);
-            return;
-        }
-
-        AccountSelectionUtil.doImport(this, resId, (size == 1 ? accountList.get(0) : null));
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        switch (requestCode) {
-            case SUBACTIVITY_NEW_CONTACT:
-                if (resultCode == RESULT_OK) {
-                    returnPickerResult(null, data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME),
-                            data.getData(), (mMode & MODE_MASK_PICKER) != 0
-                            ? Intent.FLAG_GRANT_READ_URI_PERMISSION : 0);
-                }
-                break;
-
-            case SUBACTIVITY_VIEW_CONTACT:
-                if (resultCode == RESULT_OK) {
-                    mAdapter.notifyDataSetChanged();
-                }
-                break;
-
-            case SUBACTIVITY_DISPLAY_GROUP:
-                // Mark as just created so we re-run the view query
-                mJustCreated = true;
-                break;
-
-            case SUBACTIVITY_FILTER:
-            case SUBACTIVITY_SEARCH:
-                // Pass through results of filter or search UI
-                if (resultCode == RESULT_OK) {
-                    setResult(RESULT_OK, data);
-                    finish();
-                }
-                break;
-        }
-    }
-
-    @Override
-    public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
-        // If Contacts was invoked by another Activity simply as a way of
-        // picking a contact, don't show the context menu
-        if ((mMode & MODE_MASK_PICKER) == MODE_MASK_PICKER) {
-            return;
-        }
-
-        AdapterView.AdapterContextMenuInfo info;
-        try {
-             info = (AdapterView.AdapterContextMenuInfo) menuInfo;
-        } catch (ClassCastException e) {
-            Log.e(TAG, "bad menuInfo", e);
-            return;
-        }
-
-        Cursor cursor = (Cursor) getListAdapter().getItem(info.position);
-        if (cursor == null) {
-            // For some reason the requested item isn't available, do nothing
-            return;
-        }
-        long id = info.id;
-        Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, id);
-        long rawContactId = ContactsUtils.queryForRawContactId(getContentResolver(), id);
-        Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
-
-        // Setup the menu header
-        menu.setHeaderTitle(cursor.getString(getSummaryDisplayNameColumnIndex()));
-
-        // View contact details
-        final Intent viewContactIntent = new Intent(Intent.ACTION_VIEW, contactUri);
-        StickyTabs.setTab(viewContactIntent, getIntent());
-        menu.add(0, MENU_ITEM_VIEW_CONTACT, 0, R.string.menu_viewContact)
-                .setIntent(viewContactIntent);
-
-        if (cursor.getInt(SUMMARY_HAS_PHONE_COLUMN_INDEX) != 0) {
-            // Calling contact
-            menu.add(0, MENU_ITEM_CALL, 0, getString(R.string.menu_call));
-            // Send SMS item
-            menu.add(0, MENU_ITEM_SEND_SMS, 0, getString(R.string.menu_sendSMS));
-        }
-
-        // Star toggling
-        int starState = cursor.getInt(SUMMARY_STARRED_COLUMN_INDEX);
-        if (starState == 0) {
-            menu.add(0, MENU_ITEM_TOGGLE_STAR, 0, R.string.menu_addStar);
-        } else {
-            menu.add(0, MENU_ITEM_TOGGLE_STAR, 0, R.string.menu_removeStar);
-        }
-
-        // Contact editing
-        menu.add(0, MENU_ITEM_EDIT, 0, R.string.menu_editContact)
-                .setIntent(new Intent(Intent.ACTION_EDIT, rawContactUri));
-        menu.add(0, MENU_ITEM_DELETE, 0, R.string.menu_deleteContact);
-    }
-
-    @Override
-    public boolean onContextItemSelected(MenuItem item) {
-        AdapterView.AdapterContextMenuInfo info;
-        try {
-             info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
-        } catch (ClassCastException e) {
-            Log.e(TAG, "bad menuInfo", e);
-            return false;
-        }
-
-        Cursor cursor = (Cursor) getListAdapter().getItem(info.position);
-
-        switch (item.getItemId()) {
-            case MENU_ITEM_TOGGLE_STAR: {
-                // Toggle the star
-                ContentValues values = new ContentValues(1);
-                values.put(Contacts.STARRED, cursor.getInt(SUMMARY_STARRED_COLUMN_INDEX) == 0 ? 1 : 0);
-                final Uri selectedUri = this.getContactUri(info.position);
-                getContentResolver().update(selectedUri, values, null, null);
-                return true;
-            }
-
-            case MENU_ITEM_CALL: {
-                callContact(cursor);
-                return true;
-            }
-
-            case MENU_ITEM_SEND_SMS: {
-                smsContact(cursor);
-                return true;
-            }
-
-            case MENU_ITEM_DELETE: {
-                doContactDelete(getContactUri(info.position));
-                return true;
-            }
-        }
-
-        return super.onContextItemSelected(item);
-    }
-
-    /**
-     * Event handler for the use case where the user starts typing without
-     * bringing up the search UI first.
-     */
-    public boolean onKey(View v, int keyCode, KeyEvent event) {
-        if (!mSearchMode && (mMode & MODE_MASK_NO_FILTER) == 0 && !mSearchInitiated) {
-            int unicodeChar = event.getUnicodeChar();
-            if (unicodeChar != 0) {
-                mSearchInitiated = true;
-                startSearch(new String(new int[]{unicodeChar}, 0, 1), false, null, false);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Event handler for search UI.
-     */
-    public void afterTextChanged(Editable s) {
-        onSearchTextChanged();
-    }
-
-    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-    }
-
-    public void onTextChanged(CharSequence s, int start, int before, int count) {
-    }
-
-    /**
-     * Event handler for search UI.
-     */
-    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-        if (actionId == EditorInfo.IME_ACTION_DONE) {
-            hideSoftKeyboard();
-            if (TextUtils.isEmpty(getTextFilter())) {
-                finish();
-            }
-            return true;
-        }
-        return false;
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_CALL: {
-                if (callSelection()) {
-                    return true;
-                }
-                break;
-            }
-
-            case KeyEvent.KEYCODE_DEL: {
-                if (deleteSelection()) {
-                    return true;
-                }
-                break;
-            }
-        }
-
-        return super.onKeyDown(keyCode, event);
-    }
-
-    private boolean deleteSelection() {
-        if ((mMode & MODE_MASK_PICKER) != 0) {
-            return false;
-        }
-
-        final int position = getListView().getSelectedItemPosition();
-        if (position != ListView.INVALID_POSITION) {
-            Uri contactUri = getContactUri(position);
-            if (contactUri != null) {
-                doContactDelete(contactUri);
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Prompt the user before deleting the given {@link Contacts} entry.
-     */
-    protected void doContactDelete(Uri contactUri) {
-        mReadOnlySourcesCnt = 0;
-        mWritableSourcesCnt = 0;
-        mWritableRawContactIds.clear();
-
-        Sources sources = Sources.getInstance(ContactsListActivity.this);
-        Cursor c = getContentResolver().query(RawContacts.CONTENT_URI, RAW_CONTACTS_PROJECTION,
-                RawContacts.CONTACT_ID + "=" + ContentUris.parseId(contactUri), null,
-                null);
-        if (c != null) {
-            try {
-                while (c.moveToNext()) {
-                    final String accountType = c.getString(2);
-                    final long rawContactId = c.getLong(0);
-                    ContactsSource contactsSource = sources.getInflatedSource(accountType,
-                            ContactsSource.LEVEL_SUMMARY);
-                    if (contactsSource != null && contactsSource.readOnly) {
-                        mReadOnlySourcesCnt += 1;
-                    } else {
-                        mWritableSourcesCnt += 1;
-                        mWritableRawContactIds.add(rawContactId);
-                    }
-                }
-            } finally {
-                c.close();
-            }
-        }
-
-        mSelectedContactUri = contactUri;
-        if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt > 0) {
-            showDialog(R.id.dialog_readonly_contact_delete_confirmation);
-        } else if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt == 0) {
-            showDialog(R.id.dialog_readonly_contact_hide_confirmation);
-        } else if (mReadOnlySourcesCnt == 0 && mWritableSourcesCnt > 1) {
-            showDialog(R.id.dialog_multiple_contact_delete_confirmation);
-        } else {
-            showDialog(R.id.dialog_delete_contact_confirmation);
-        }
-    }
-
-    /**
-     * Dismisses the soft keyboard when the list takes focus.
-     */
-    public void onFocusChange(View view, boolean hasFocus) {
-        if (view == getListView() && hasFocus) {
-            hideSoftKeyboard();
-        }
-    }
-
-    /**
-     * Dismisses the soft keyboard when the list takes focus.
-     */
-    public boolean onTouch(View view, MotionEvent event) {
-        if (view == getListView()) {
-            hideSoftKeyboard();
-        }
-        return false;
-    }
-
-    /**
-     * Dismisses the search UI along with the keyboard if the filter text is empty.
-     */
-    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
-        if (mSearchMode && keyCode == KeyEvent.KEYCODE_BACK && TextUtils.isEmpty(getTextFilter())) {
-            hideSoftKeyboard();
-            onBackPressed();
-            return true;
-        }
-        return false;
-    }
-
-    @Override
-    protected void onListItemClick(ListView l, View v, int position, long id) {
-        hideSoftKeyboard();
-
-        if (mSearchMode && mAdapter.isSearchAllContactsItemPosition(position)) {
-            doSearch();
-        } else if (mMode == MODE_INSERT_OR_EDIT_CONTACT || mMode == MODE_QUERY_PICK_TO_EDIT) {
-            Intent intent;
-            if (position == 0 && !mSearchMode && mMode != MODE_QUERY_PICK_TO_EDIT) {
-                intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
-            } else {
-                intent = new Intent(Intent.ACTION_EDIT, getSelectedUri(position));
-            }
-            intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
-            Bundle extras = getIntent().getExtras();
-            if (extras != null) {
-                intent.putExtras(extras);
-            }
-            intent.putExtra(KEY_PICKER_MODE, (mMode & MODE_MASK_PICKER) == MODE_MASK_PICKER);
-
-            startActivity(intent);
-            finish();
-        } else if ((mMode & MODE_MASK_CREATE_NEW) == MODE_MASK_CREATE_NEW
-                && position == 0) {
-            Intent newContact = new Intent(Intents.Insert.ACTION, Contacts.CONTENT_URI);
-            startActivityForResult(newContact, SUBACTIVITY_NEW_CONTACT);
-        } else if (mMode == MODE_JOIN_CONTACT && id == JOIN_MODE_SHOW_ALL_CONTACTS_ID) {
-            mJoinModeShowAllContacts = false;
-            startQuery();
-        } else if (id > 0) {
-            final Uri uri = getSelectedUri(position);
-            if ((mMode & MODE_MASK_PICKER) == 0) {
-                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                StickyTabs.setTab(intent, getIntent());
-                startActivityForResult(intent, SUBACTIVITY_VIEW_CONTACT);
-            } else if (mMode == MODE_JOIN_CONTACT) {
-                returnPickerResult(null, null, uri, 0);
-            } else if (mMode == MODE_QUERY_PICK_TO_VIEW) {
-                // Started with query that should launch to view contact
-                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                startActivity(intent);
-                finish();
-            } else if (mMode == MODE_PICK_PHONE || mMode == MODE_QUERY_PICK_PHONE) {
-                Cursor c = (Cursor) mAdapter.getItem(position);
-                returnPickerResult(c, c.getString(PHONE_DISPLAY_NAME_COLUMN_INDEX), uri,
-                        Intent.FLAG_GRANT_READ_URI_PERMISSION);
-            } else if ((mMode & MODE_MASK_PICKER) != 0) {
-                Cursor c = (Cursor) mAdapter.getItem(position);
-                returnPickerResult(c, c.getString(getSummaryDisplayNameColumnIndex()), uri,
-                        Intent.FLAG_GRANT_READ_URI_PERMISSION);
-            } else if (mMode == MODE_PICK_POSTAL
-                    || mMode == MODE_LEGACY_PICK_POSTAL
-                    || mMode == MODE_LEGACY_PICK_PHONE) {
-                returnPickerResult(null, null, uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
-            }
-        } else {
-            signalError();
-        }
-    }
-
-    private void hideSoftKeyboard() {
-        // Hide soft keyboard, if visible
-        InputMethodManager inputMethodManager = (InputMethodManager)
-                getSystemService(Context.INPUT_METHOD_SERVICE);
-        inputMethodManager.hideSoftInputFromWindow(mList.getWindowToken(), 0);
-    }
-
-    /**
-     * @param selectedUri In most cases, this should be a lookup {@link Uri}, possibly
-     *            generated through {@link Contacts#getLookupUri(long, String)}.
-     */
-    private void returnPickerResult(Cursor c, String name, Uri selectedUri, int uriPerms) {
-        final Intent intent = new Intent();
-
-        if (mShortcutAction != null) {
-            Intent shortcutIntent;
-            if (Intent.ACTION_VIEW.equals(mShortcutAction)) {
-                // This is a simple shortcut to view a contact.
-                shortcutIntent = new Intent(ContactsContract.QuickContact.ACTION_QUICK_CONTACT);
-                shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
-                        Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
-
-                shortcutIntent.setData(selectedUri);
-                shortcutIntent.putExtra(ContactsContract.QuickContact.EXTRA_MODE,
-                        ContactsContract.QuickContact.MODE_LARGE);
-                shortcutIntent.putExtra(ContactsContract.QuickContact.EXTRA_EXCLUDE_MIMES,
-                        (String[]) null);
-
-                final Bitmap icon = framePhoto(loadContactPhoto(selectedUri, null));
-                if (icon != null) {
-                    intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, scaleToAppIconSize(icon));
-                } else {
-                    intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
-                            Intent.ShortcutIconResource.fromContext(this,
-                                    R.drawable.ic_launcher_shortcut_contact));
-                }
-            } else {
-                // This is a direct dial or sms shortcut.
-                String number = c.getString(PHONE_NUMBER_COLUMN_INDEX);
-                int type = c.getInt(PHONE_TYPE_COLUMN_INDEX);
-                String scheme;
-                int resid;
-                if (Intent.ACTION_CALL.equals(mShortcutAction)) {
-                    scheme = Constants.SCHEME_TEL;
-                    resid = R.drawable.badge_action_call;
-                } else {
-                    scheme = Constants.SCHEME_SMSTO;
-                    resid = R.drawable.badge_action_sms;
-                }
-
-                // Make the URI a direct tel: URI so that it will always continue to work
-                Uri phoneUri = Uri.fromParts(scheme, number, null);
-                shortcutIntent = new Intent(mShortcutAction, phoneUri);
-
-                intent.putExtra(Intent.EXTRA_SHORTCUT_ICON,
-                        generatePhoneNumberIcon(selectedUri, type, resid));
-            }
-            shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-            intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
-            intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);
-            setResult(RESULT_OK, intent);
-        } else {
-            intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, name);
-            intent.addFlags(uriPerms);
-            setResult(RESULT_OK, intent.setData(selectedUri));
-        }
-        finish();
-    }
-
-    private Bitmap framePhoto(Bitmap photo) {
-        final Resources r = getResources();
-        final Drawable frame = r.getDrawable(com.android.internal.R.drawable.quickcontact_badge);
-
-        final int width = r.getDimensionPixelSize(R.dimen.contact_shortcut_frame_width);
-        final int height = r.getDimensionPixelSize(R.dimen.contact_shortcut_frame_height);
-
-        frame.setBounds(0, 0, width, height);
-
-        final Rect padding = new Rect();
-        frame.getPadding(padding);
-
-        final Rect source = new Rect(0, 0, photo.getWidth(), photo.getHeight());
-        final Rect destination = new Rect(padding.left, padding.top,
-                width - padding.right, height - padding.bottom);
-
-        final int d = Math.max(width, height);
-        final Bitmap b = Bitmap.createBitmap(d, d, Bitmap.Config.ARGB_8888);
-        final Canvas c = new Canvas(b);
-
-        c.translate((d - width) / 2.0f, (d - height) / 2.0f);
-        frame.draw(c);
-        c.drawBitmap(photo, source, destination, new Paint(Paint.FILTER_BITMAP_FLAG));
-
-        return b;
-    }
-
-    /**
-     * Generates a phone number shortcut icon. Adds an overlay describing the type of the phone
-     * number, and if there is a photo also adds the call action icon.
-     *
-     * @param lookupUri The person the phone number belongs to
-     * @param type The type of the phone number
-     * @param actionResId The ID for the action resource
-     * @return The bitmap for the icon
-     */
-    private Bitmap generatePhoneNumberIcon(Uri lookupUri, int type, int actionResId) {
-        final Resources r = getResources();
-        boolean drawPhoneOverlay = true;
-        final float scaleDensity = getResources().getDisplayMetrics().scaledDensity;
-
-        Bitmap photo = loadContactPhoto(lookupUri, null);
-        if (photo == null) {
-            // If there isn't a photo use the generic phone action icon instead
-            Bitmap phoneIcon = getPhoneActionIcon(r, actionResId);
-            if (phoneIcon != null) {
-                photo = phoneIcon;
-                drawPhoneOverlay = false;
-            } else {
-                return null;
-            }
-        }
-
-        // Setup the drawing classes
-        Bitmap icon = createShortcutBitmap();
-        Canvas canvas = new Canvas(icon);
-
-        // Copy in the photo
-        Paint photoPaint = new Paint();
-        photoPaint.setDither(true);
-        photoPaint.setFilterBitmap(true);
-        Rect src = new Rect(0,0, photo.getWidth(),photo.getHeight());
-        Rect dst = new Rect(0,0, mIconSize, mIconSize);
-        canvas.drawBitmap(photo, src, dst, photoPaint);
-
-        // Create an overlay for the phone number type
-        String overlay = null;
-        switch (type) {
-            case Phone.TYPE_HOME:
-                overlay = getString(R.string.type_short_home);
-                break;
-
-            case Phone.TYPE_MOBILE:
-                overlay = getString(R.string.type_short_mobile);
-                break;
-
-            case Phone.TYPE_WORK:
-                overlay = getString(R.string.type_short_work);
-                break;
-
-            case Phone.TYPE_PAGER:
-                overlay = getString(R.string.type_short_pager);
-                break;
-
-            case Phone.TYPE_OTHER:
-                overlay = getString(R.string.type_short_other);
-                break;
-        }
-        if (overlay != null) {
-            Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DEV_KERN_TEXT_FLAG);
-            textPaint.setTextSize(20.0f * scaleDensity);
-            textPaint.setTypeface(Typeface.DEFAULT_BOLD);
-            textPaint.setColor(r.getColor(R.color.textColorIconOverlay));
-            textPaint.setShadowLayer(3f, 1, 1, r.getColor(R.color.textColorIconOverlayShadow));
-            canvas.drawText(overlay, 2 * scaleDensity, 16 * scaleDensity, textPaint);
-        }
-
-        // Draw the phone action icon as an overlay
-        if (ENABLE_ACTION_ICON_OVERLAYS && drawPhoneOverlay) {
-            Bitmap phoneIcon = getPhoneActionIcon(r, actionResId);
-            if (phoneIcon != null) {
-                src.set(0, 0, phoneIcon.getWidth(), phoneIcon.getHeight());
-                int iconWidth = icon.getWidth();
-                dst.set(iconWidth - ((int) (20 * scaleDensity)), -1,
-                        iconWidth, ((int) (19 * scaleDensity)));
-                canvas.drawBitmap(phoneIcon, src, dst, photoPaint);
-            }
-        }
-
-        return icon;
-    }
-
-    private Bitmap scaleToAppIconSize(Bitmap photo) {
-        // Setup the drawing classes
-        Bitmap icon = createShortcutBitmap();
-        Canvas canvas = new Canvas(icon);
-
-        // Copy in the photo
-        Paint photoPaint = new Paint();
-        photoPaint.setDither(true);
-        photoPaint.setFilterBitmap(true);
-        Rect src = new Rect(0,0, photo.getWidth(),photo.getHeight());
-        Rect dst = new Rect(0,0, mIconSize, mIconSize);
-        canvas.drawBitmap(photo, src, dst, photoPaint);
-
-        return icon;
-    }
-
-    private Bitmap createShortcutBitmap() {
-        return Bitmap.createBitmap(mIconSize, mIconSize, Bitmap.Config.ARGB_8888);
-    }
-
-    /**
-     * Returns the icon for the phone call action.
-     *
-     * @param r The resources to load the icon from
-     * @param resId The resource ID to load
-     * @return the icon for the phone call action
-     */
-    private Bitmap getPhoneActionIcon(Resources r, int resId) {
-        Drawable phoneIcon = r.getDrawable(resId);
-        if (phoneIcon instanceof BitmapDrawable) {
-            BitmapDrawable bd = (BitmapDrawable) phoneIcon;
-            return bd.getBitmap();
-        } else {
-            return null;
-        }
-    }
-
-    private Uri getUriToQuery() {
-        switch(mMode) {
-            case MODE_JOIN_CONTACT:
-                return getJoinSuggestionsUri(null);
-            case MODE_FREQUENT:
-            case MODE_STARRED:
-                return Contacts.CONTENT_URI;
-
-            case MODE_DEFAULT:
-            case MODE_CUSTOM:
-            case MODE_INSERT_OR_EDIT_CONTACT:
-            case MODE_PICK_CONTACT:
-            case MODE_PICK_OR_CREATE_CONTACT:{
-                return CONTACTS_CONTENT_URI_WITH_LETTER_COUNTS;
-            }
-            case MODE_STREQUENT: {
-                return Contacts.CONTENT_STREQUENT_URI;
-            }
-            case MODE_LEGACY_PICK_PERSON:
-            case MODE_LEGACY_PICK_OR_CREATE_PERSON: {
-                return People.CONTENT_URI;
-            }
-            case MODE_PICK_PHONE: {
-                return buildSectionIndexerUri(Phone.CONTENT_URI);
-            }
-            case MODE_LEGACY_PICK_PHONE: {
-                return Phones.CONTENT_URI;
-            }
-            case MODE_PICK_POSTAL: {
-                return buildSectionIndexerUri(StructuredPostal.CONTENT_URI);
-            }
-            case MODE_LEGACY_PICK_POSTAL: {
-                return ContactMethods.CONTENT_URI;
-            }
-            case MODE_QUERY_PICK_TO_VIEW: {
-                if (mQueryMode == QUERY_MODE_MAILTO) {
-                    return Uri.withAppendedPath(Email.CONTENT_FILTER_URI,
-                            Uri.encode(mInitialFilter));
-                } else if (mQueryMode == QUERY_MODE_TEL) {
-                    return Uri.withAppendedPath(Phone.CONTENT_FILTER_URI,
-                            Uri.encode(mInitialFilter));
-                }
-                return CONTACTS_CONTENT_URI_WITH_LETTER_COUNTS;
-            }
-            case MODE_QUERY:
-            case MODE_QUERY_PICK:
-            case MODE_QUERY_PICK_TO_EDIT: {
-                return getContactFilterUri(mInitialFilter);
-            }
-            case MODE_QUERY_PICK_PHONE: {
-                return Uri.withAppendedPath(Phone.CONTENT_FILTER_URI,
-                        Uri.encode(mInitialFilter));
-            }
-            case MODE_GROUP: {
-                return mGroupUri;
-            }
-            default: {
-                throw new IllegalStateException("Can't generate URI: Unsupported Mode.");
-            }
-        }
-    }
-
-    /**
-     * Build the {@link Contacts#CONTENT_LOOKUP_URI} for the given
-     * {@link ListView} position, using {@link #mAdapter}.
-     */
-    private Uri getContactUri(int position) {
-        if (position == ListView.INVALID_POSITION) {
-            throw new IllegalArgumentException("Position not in list bounds");
-        }
-
-        final Cursor cursor = (Cursor)mAdapter.getItem(position);
-        if (cursor == null) {
-            return null;
-        }
-
-        switch(mMode) {
-            case MODE_LEGACY_PICK_PERSON:
-            case MODE_LEGACY_PICK_OR_CREATE_PERSON: {
-                final long personId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX);
-                return ContentUris.withAppendedId(People.CONTENT_URI, personId);
-            }
-
-            default: {
-                // Build and return soft, lookup reference
-                final long contactId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX);
-                final String lookupKey = cursor.getString(SUMMARY_LOOKUP_KEY_COLUMN_INDEX);
-                return Contacts.getLookupUri(contactId, lookupKey);
-            }
-        }
-    }
-
-    /**
-     * Build the {@link Uri} for the given {@link ListView} position, which can
-     * be used as result when in {@link #MODE_MASK_PICKER} mode.
-     */
-    private Uri getSelectedUri(int position) {
-        if (position == ListView.INVALID_POSITION) {
-            throw new IllegalArgumentException("Position not in list bounds");
-        }
-
-        final long id = mAdapter.getItemId(position);
-        switch(mMode) {
-            case MODE_LEGACY_PICK_PERSON:
-            case MODE_LEGACY_PICK_OR_CREATE_PERSON: {
-                return ContentUris.withAppendedId(People.CONTENT_URI, id);
-            }
-            case MODE_PICK_PHONE:
-            case MODE_QUERY_PICK_PHONE: {
-                return ContentUris.withAppendedId(Data.CONTENT_URI, id);
-            }
-            case MODE_LEGACY_PICK_PHONE: {
-                return ContentUris.withAppendedId(Phones.CONTENT_URI, id);
-            }
-            case MODE_PICK_POSTAL: {
-                return ContentUris.withAppendedId(Data.CONTENT_URI, id);
-            }
-            case MODE_LEGACY_PICK_POSTAL: {
-                return ContentUris.withAppendedId(ContactMethods.CONTENT_URI, id);
-            }
-            default: {
-                return getContactUri(position);
-            }
-        }
-    }
-
-    String[] getProjectionForQuery() {
-        switch(mMode) {
-            case MODE_JOIN_CONTACT:
-            case MODE_STREQUENT:
-            case MODE_FREQUENT:
-            case MODE_STARRED:
-            case MODE_DEFAULT:
-            case MODE_CUSTOM:
-            case MODE_INSERT_OR_EDIT_CONTACT:
-            case MODE_GROUP:
-            case MODE_PICK_CONTACT:
-            case MODE_PICK_OR_CREATE_CONTACT: {
-                return mSearchMode
-                        ? CONTACTS_SUMMARY_FILTER_PROJECTION
-                        : CONTACTS_SUMMARY_PROJECTION;
-            }
-            case MODE_QUERY:
-            case MODE_QUERY_PICK:
-            case MODE_QUERY_PICK_TO_EDIT: {
-                return CONTACTS_SUMMARY_FILTER_PROJECTION;
-            }
-            case MODE_LEGACY_PICK_PERSON:
-            case MODE_LEGACY_PICK_OR_CREATE_PERSON: {
-                return LEGACY_PEOPLE_PROJECTION ;
-            }
-            case MODE_QUERY_PICK_PHONE:
-            case MODE_PICK_PHONE: {
-                return PHONES_PROJECTION;
-            }
-            case MODE_LEGACY_PICK_PHONE: {
-                return LEGACY_PHONES_PROJECTION;
-            }
-            case MODE_PICK_POSTAL: {
-                return POSTALS_PROJECTION;
-            }
-            case MODE_LEGACY_PICK_POSTAL: {
-                return LEGACY_POSTALS_PROJECTION;
-            }
-            case MODE_QUERY_PICK_TO_VIEW: {
-                if (mQueryMode == QUERY_MODE_MAILTO) {
-                    return CONTACTS_SUMMARY_PROJECTION_FROM_EMAIL;
-                } else if (mQueryMode == QUERY_MODE_TEL) {
-                    return PHONES_PROJECTION;
-                }
-                break;
-            }
-        }
-
-        // Default to normal aggregate projection
-        return CONTACTS_SUMMARY_PROJECTION;
-    }
-
-    private Bitmap loadContactPhoto(Uri selectedUri, BitmapFactory.Options options) {
-        Uri contactUri = null;
-        if (Contacts.CONTENT_ITEM_TYPE.equals(getContentResolver().getType(selectedUri))) {
-            // TODO we should have a "photo" directory under the lookup URI itself
-            contactUri = Contacts.lookupContact(getContentResolver(), selectedUri);
-        } else {
-
-            Cursor cursor = getContentResolver().query(selectedUri,
-                    new String[] { Data.CONTACT_ID }, null, null, null);
-            try {
-                if (cursor != null && cursor.moveToFirst()) {
-                    final long contactId = cursor.getLong(0);
-                    contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
-                }
-            } finally {
-                if (cursor != null) cursor.close();
-            }
-        }
-
-        Cursor cursor = null;
-        Bitmap bm = null;
-
-        try {
-            Uri photoUri = Uri.withAppendedPath(contactUri, Contacts.Photo.CONTENT_DIRECTORY);
-            cursor = getContentResolver().query(photoUri, new String[] {Photo.PHOTO},
-                    null, null, null);
-            if (cursor != null && cursor.moveToFirst()) {
-                bm = ContactsUtils.loadContactPhoto(cursor, 0, options);
-            }
-        } finally {
-            if (cursor != null) {
-                cursor.close();
-            }
-        }
-
-        if (bm == null) {
-            final int[] fallbacks = {
-                R.drawable.ic_contact_picture,
-                R.drawable.ic_contact_picture_2,
-                R.drawable.ic_contact_picture_3
-            };
-            bm = BitmapFactory.decodeResource(getResources(),
-                    fallbacks[new Random().nextInt(fallbacks.length)]);
-        }
-
-        return bm;
-    }
-
-    /**
-     * Return the selection arguments for a default query based on the
-     * {@link #mDisplayOnlyPhones} flag.
-     */
-    private String getContactSelection() {
-        if (mDisplayOnlyPhones) {
-            return CLAUSE_ONLY_VISIBLE + " AND " + CLAUSE_ONLY_PHONES;
-        } else {
-            return CLAUSE_ONLY_VISIBLE;
-        }
-    }
-
-    private Uri getContactFilterUri(String filter) {
-        Uri baseUri;
-        if (!TextUtils.isEmpty(filter)) {
-            baseUri = Uri.withAppendedPath(Contacts.CONTENT_FILTER_URI, Uri.encode(filter));
-        } else {
-            baseUri = Contacts.CONTENT_URI;
-        }
-
-        if (mAdapter.getDisplaySectionHeadersEnabled()) {
-            return buildSectionIndexerUri(baseUri);
-        } else {
-            return baseUri;
-        }
-    }
-
-    private Uri getPeopleFilterUri(String filter) {
-        if (!TextUtils.isEmpty(filter)) {
-            return Uri.withAppendedPath(People.CONTENT_FILTER_URI, Uri.encode(filter));
-        } else {
-            return People.CONTENT_URI;
-        }
-    }
-
-    private static Uri buildSectionIndexerUri(Uri uri) {
-        return uri.buildUpon()
-                .appendQueryParameter(ContactCounts.ADDRESS_BOOK_INDEX_EXTRAS, "true").build();
-    }
-
-    private Uri getJoinSuggestionsUri(String filter) {
-        Builder builder = Contacts.CONTENT_URI.buildUpon();
-        builder.appendEncodedPath(String.valueOf(mQueryAggregateId));
-        builder.appendEncodedPath(AggregationSuggestions.CONTENT_DIRECTORY);
-        if (!TextUtils.isEmpty(filter)) {
-            builder.appendEncodedPath(Uri.encode(filter));
-        }
-        builder.appendQueryParameter("limit", String.valueOf(MAX_SUGGESTIONS));
-        return builder.build();
-    }
-
-    private String getSortOrder(String[] projectionType) {
-        if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY) {
-            return Contacts.SORT_KEY_PRIMARY;
-        } else {
-            return Contacts.SORT_KEY_ALTERNATIVE;
-        }
-    }
-
-    void startQuery() {
-        // Set the proper empty string
-        setEmptyText();
-
-        if (mSearchResultsMode) {
-            TextView foundContactsText = (TextView)findViewById(R.id.search_results_found);
-            foundContactsText.setText(R.string.search_results_searching);
-        }
-
-        mAdapter.setLoading(true);
-
-        // Cancel any pending queries
-        mQueryHandler.cancelOperation(QUERY_TOKEN);
-        mQueryHandler.setLoadingJoinSuggestions(false);
-
-        mSortOrder = mContactsPrefs.getSortOrder();
-        mDisplayOrder = mContactsPrefs.getDisplayOrder();
-
-        // When sort order and display order contradict each other, we want to
-        // highlight the part of the name used for sorting.
-        mHighlightWhenScrolling = false;
-        if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY &&
-                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE) {
-            mHighlightWhenScrolling = true;
-        } else if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE &&
-                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
-            mHighlightWhenScrolling = true;
-        }
-
-        String[] projection = getProjectionForQuery();
-        if (mSearchMode && TextUtils.isEmpty(getTextFilter())) {
-            mAdapter.changeCursor(new MatrixCursor(projection));
-            return;
-        }
-
-        String callingPackage = getCallingPackage();
-        Uri uri = getUriToQuery();
-        if (!TextUtils.isEmpty(callingPackage)) {
-            uri = uri.buildUpon()
-                    .appendQueryParameter(ContactsContract.REQUESTING_PACKAGE_PARAM_KEY,
-                            callingPackage)
-                    .build();
-        }
-
-        // Kick off the new query
-        switch (mMode) {
-            case MODE_GROUP:
-            case MODE_DEFAULT:
-            case MODE_CUSTOM:
-            case MODE_PICK_CONTACT:
-            case MODE_PICK_OR_CREATE_CONTACT:
-            case MODE_INSERT_OR_EDIT_CONTACT:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri, projection, getContactSelection(),
-                        null, getSortOrder(projection));
-                break;
-
-            case MODE_LEGACY_PICK_PERSON:
-            case MODE_LEGACY_PICK_OR_CREATE_PERSON: {
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri, projection, null, null,
-                        People.DISPLAY_NAME);
-                break;
-            }
-            case MODE_PICK_POSTAL:
-            case MODE_QUERY:
-            case MODE_QUERY_PICK:
-            case MODE_QUERY_PICK_PHONE:
-            case MODE_QUERY_PICK_TO_VIEW:
-            case MODE_QUERY_PICK_TO_EDIT: {
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri, projection, null, null,
-                        getSortOrder(projection));
-                break;
-            }
-
-            case MODE_STARRED:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri,
-                        projection, Contacts.STARRED + "=1", null,
-                        getSortOrder(projection));
-                break;
-
-            case MODE_FREQUENT:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri,
-                        projection,
-                        Contacts.TIMES_CONTACTED + " > 0", null,
-                        Contacts.TIMES_CONTACTED + " DESC, "
-                        + getSortOrder(projection));
-                break;
-
-            case MODE_STREQUENT:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri, projection, null, null, null);
-                break;
-
-            case MODE_PICK_PHONE:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri,
-                        projection, CLAUSE_ONLY_VISIBLE, null, getSortOrder(projection));
-                break;
-
-            case MODE_LEGACY_PICK_PHONE:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri,
-                        projection, null, null, Phones.DISPLAY_NAME);
-                break;
-
-            case MODE_LEGACY_PICK_POSTAL:
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri,
-                        projection,
-                        ContactMethods.KIND + "=" + android.provider.Contacts.KIND_POSTAL, null,
-                        ContactMethods.DISPLAY_NAME);
-                break;
-
-            case MODE_JOIN_CONTACT:
-                mQueryHandler.setLoadingJoinSuggestions(true);
-                mQueryHandler.startQuery(QUERY_TOKEN, null, uri, projection,
-                        null, null, null);
-                break;
-        }
-    }
-
-    /**
-     * Called from a background thread to do the filter and return the resulting cursor.
-     *
-     * @param filter the text that was entered to filter on
-     * @return a cursor with the results of the filter
-     */
-    Cursor doFilter(String filter) {
-        String[] projection = getProjectionForQuery();
-        if (mSearchMode && TextUtils.isEmpty(getTextFilter())) {
-            return new MatrixCursor(projection);
-        }
-
-        final ContentResolver resolver = getContentResolver();
-        switch (mMode) {
-            case MODE_DEFAULT:
-            case MODE_CUSTOM:
-            case MODE_PICK_CONTACT:
-            case MODE_PICK_OR_CREATE_CONTACT:
-            case MODE_INSERT_OR_EDIT_CONTACT: {
-                return resolver.query(getContactFilterUri(filter), projection,
-                        getContactSelection(), null, getSortOrder(projection));
-            }
-
-            case MODE_LEGACY_PICK_PERSON:
-            case MODE_LEGACY_PICK_OR_CREATE_PERSON: {
-                return resolver.query(getPeopleFilterUri(filter), projection, null, null,
-                        People.DISPLAY_NAME);
-            }
-
-            case MODE_STARRED: {
-                return resolver.query(getContactFilterUri(filter), projection,
-                        Contacts.STARRED + "=1", null,
-                        getSortOrder(projection));
-            }
-
-            case MODE_FREQUENT: {
-                return resolver.query(getContactFilterUri(filter), projection,
-                        Contacts.TIMES_CONTACTED + " > 0", null,
-                        Contacts.TIMES_CONTACTED + " DESC, "
-                        + getSortOrder(projection));
-            }
-
-            case MODE_STREQUENT: {
-                Uri uri;
-                if (!TextUtils.isEmpty(filter)) {
-                    uri = Uri.withAppendedPath(Contacts.CONTENT_STREQUENT_FILTER_URI,
-                            Uri.encode(filter));
-                } else {
-                    uri = Contacts.CONTENT_STREQUENT_URI;
-                }
-                return resolver.query(uri, projection, null, null, null);
-            }
-
-            case MODE_PICK_PHONE: {
-                Uri uri = getUriToQuery();
-                if (!TextUtils.isEmpty(filter)) {
-                    uri = Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, Uri.encode(filter));
-                }
-                return resolver.query(uri, projection, CLAUSE_ONLY_VISIBLE, null,
-                        getSortOrder(projection));
-            }
-
-            case MODE_LEGACY_PICK_PHONE: {
-                //TODO: Support filtering here (bug 2092503)
-                break;
-            }
-
-            case MODE_JOIN_CONTACT: {
-
-                // We are on a background thread. Run queries one after the other synchronously
-                Cursor cursor = resolver.query(getJoinSuggestionsUri(filter), projection, null,
-                        null, null);
-                mAdapter.setSuggestionsCursor(cursor);
-                mJoinModeShowAllContacts = false;
-                return resolver.query(getContactFilterUri(filter), projection,
-                        Contacts._ID + " != " + mQueryAggregateId + " AND " + CLAUSE_ONLY_VISIBLE,
-                        null, getSortOrder(projection));
-            }
-        }
-        throw new UnsupportedOperationException("filtering not allowed in mode " + mMode);
-    }
-
-    private Cursor getShowAllContactsLabelCursor(String[] projection) {
-        MatrixCursor matrixCursor = new MatrixCursor(projection);
-        Object[] row = new Object[projection.length];
-        // The only columns we care about is the id
-        row[SUMMARY_ID_COLUMN_INDEX] = JOIN_MODE_SHOW_ALL_CONTACTS_ID;
-        matrixCursor.addRow(row);
-        return matrixCursor;
-    }
-
-    /**
-     * Calls the currently selected list item.
-     * @return true if the call was initiated, false otherwise
-     */
-    boolean callSelection() {
-        ListView list = getListView();
-        if (list.hasFocus()) {
-            Cursor cursor = (Cursor) list.getSelectedItem();
-            return callContact(cursor);
-        }
-        return false;
-    }
-
-    boolean callContact(Cursor cursor) {
-        return callOrSmsContact(cursor, false /*call*/);
-    }
-
-    boolean smsContact(Cursor cursor) {
-        return callOrSmsContact(cursor, true /*sms*/);
-    }
-
-    /**
-     * Calls the contact which the cursor is point to.
-     * @return true if the call was initiated, false otherwise
-     */
-    boolean callOrSmsContact(Cursor cursor, boolean sendSms) {
-        if (cursor == null) {
-            return false;
-        }
-
-        switch (mMode) {
-            case MODE_PICK_PHONE:
-            case MODE_LEGACY_PICK_PHONE:
-            case MODE_QUERY_PICK_PHONE: {
-                String phone = cursor.getString(PHONE_NUMBER_COLUMN_INDEX);
-                if (sendSms) {
-                    ContactsUtils.initiateSms(this, phone);
-                } else {
-                    ContactsUtils.initiateCall(this, phone);
-                }
-                return true;
-            }
-
-            case MODE_PICK_POSTAL:
-            case MODE_LEGACY_PICK_POSTAL: {
-                return false;
-            }
-
-            default: {
-
-                boolean hasPhone = cursor.getInt(SUMMARY_HAS_PHONE_COLUMN_INDEX) != 0;
-                if (!hasPhone) {
-                    // There is no phone number.
-                    signalError();
-                    return false;
-                }
-
-                String phone = null;
-                Cursor phonesCursor = null;
-                phonesCursor = queryPhoneNumbers(cursor.getLong(SUMMARY_ID_COLUMN_INDEX));
-                if (phonesCursor == null || phonesCursor.getCount() == 0) {
-                    // No valid number
-                    signalError();
-                    return false;
-                } else if (phonesCursor.getCount() == 1) {
-                    // only one number, call it.
-                    phone = phonesCursor.getString(phonesCursor.getColumnIndex(Phone.NUMBER));
-                } else {
-                    phonesCursor.moveToPosition(-1);
-                    while (phonesCursor.moveToNext()) {
-                        if (phonesCursor.getInt(phonesCursor.
-                                getColumnIndex(Phone.IS_SUPER_PRIMARY)) != 0) {
-                            // Found super primary, call it.
-                            phone = phonesCursor.
-                            getString(phonesCursor.getColumnIndex(Phone.NUMBER));
-                            break;
-                        }
-                    }
-                }
-
-                if (phone == null) {
-                    // Display dialog to choose a number to call.
-                    PhoneDisambigDialog phoneDialog = new PhoneDisambigDialog(
-                            this, phonesCursor, sendSms, StickyTabs.getTab(getIntent()));
-                    phoneDialog.show();
-                } else {
-                    if (sendSms) {
-                        ContactsUtils.initiateSms(this, phone);
-                    } else {
-                        StickyTabs.saveTab(this, getIntent());
-                        ContactsUtils.initiateCall(this, phone);
-                    }
-                }
-            }
-        }
-        return true;
-    }
-
-    private Cursor queryPhoneNumbers(long contactId) {
-        Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
-        Uri dataUri = Uri.withAppendedPath(baseUri, Contacts.Data.CONTENT_DIRECTORY);
-
-        Cursor c = getContentResolver().query(dataUri,
-                new String[] {Phone._ID, Phone.NUMBER, Phone.IS_SUPER_PRIMARY,
-                        RawContacts.ACCOUNT_TYPE, Phone.TYPE, Phone.LABEL},
-                Data.MIMETYPE + "=?", new String[] {Phone.CONTENT_ITEM_TYPE}, null);
-        if (c != null) {
-            if (c.moveToFirst()) {
-                return c;
-            }
-            c.close();
-        }
-        return null;
-    }
-
-    // TODO: fix PluralRules to handle zero correctly and use Resources.getQuantityText directly
-    protected String getQuantityText(int count, int zeroResourceId, int pluralResourceId) {
-        if (count == 0) {
-            return getString(zeroResourceId);
-        } else {
-            String format = getResources().getQuantityText(pluralResourceId, count).toString();
-            return String.format(format, count);
-        }
-    }
-
-    /**
-     * Signal an error to the user.
-     */
-    void signalError() {
-        //TODO play an error beep or something...
-    }
-
-    Cursor getItemForView(View view) {
-        ListView listView = getListView();
-        int index = listView.getPositionForView(view);
-        if (index < 0) {
-            return null;
-        }
-        return (Cursor) listView.getAdapter().getItem(index);
-    }
-
-    private static class QueryHandler extends AsyncQueryHandler {
-        protected final WeakReference<ContactsListActivity> mActivity;
-        protected boolean mLoadingJoinSuggestions = false;
-
-        public QueryHandler(Context context) {
-            super(context.getContentResolver());
-            mActivity = new WeakReference<ContactsListActivity>((ContactsListActivity) context);
-        }
-
-        public void setLoadingJoinSuggestions(boolean flag) {
-            mLoadingJoinSuggestions = flag;
-        }
-
-        @Override
-        protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
-            final ContactsListActivity activity = mActivity.get();
-            if (activity != null && !activity.isFinishing()) {
-
-                // Whenever we get a suggestions cursor, we need to immediately kick off
-                // another query for the complete list of contacts
-                if (cursor != null && mLoadingJoinSuggestions) {
-                    mLoadingJoinSuggestions = false;
-                    if (cursor.getCount() > 0) {
-                        activity.mAdapter.setSuggestionsCursor(cursor);
-                    } else {
-                        cursor.close();
-                        activity.mAdapter.setSuggestionsCursor(null);
-                    }
-
-                    if (activity.mAdapter.mSuggestionsCursorCount == 0
-                            || !activity.mJoinModeShowAllContacts) {
-                        startQuery(QUERY_TOKEN, null, activity.getContactFilterUri(
-                                        activity.getTextFilter()),
-                                CONTACTS_SUMMARY_PROJECTION,
-                                Contacts._ID + " != " + activity.mQueryAggregateId
-                                        + " AND " + CLAUSE_ONLY_VISIBLE, null,
-                                activity.getSortOrder(CONTACTS_SUMMARY_PROJECTION));
-                        return;
-                    }
-
-                    cursor = activity.getShowAllContactsLabelCursor(CONTACTS_SUMMARY_PROJECTION);
-                }
-
-                activity.mAdapter.changeCursor(cursor);
-
-                // Now that the cursor is populated again, it's possible to restore the list state
-                if (activity.mListState != null) {
-                    activity.mList.onRestoreInstanceState(activity.mListState);
-                    activity.mListState = null;
-                }
-            } else {
-                if (cursor != null) {
-                    cursor.close();
-                }
-            }
-        }
-    }
-
-    final static class ContactListItemCache {
-        public CharArrayBuffer nameBuffer = new CharArrayBuffer(128);
-        public CharArrayBuffer dataBuffer = new CharArrayBuffer(128);
-        public CharArrayBuffer highlightedTextBuffer = new CharArrayBuffer(128);
-        public TextWithHighlighting textWithHighlighting;
-        public CharArrayBuffer phoneticNameBuffer = new CharArrayBuffer(128);
-    }
-
-    final static class PinnedHeaderCache {
-        public TextView titleView;
-        public ColorStateList textColor;
-        public Drawable background;
-    }
-
-    private final class ContactItemListAdapter extends CursorAdapter
-            implements SectionIndexer, OnScrollListener, PinnedHeaderListView.PinnedHeaderAdapter {
-        private SectionIndexer mIndexer;
-        private boolean mLoading = true;
-        private CharSequence mUnknownNameText;
-        private boolean mDisplayPhotos = false;
-        private boolean mDisplayCallButton = false;
-        private boolean mDisplayAdditionalData = true;
-        private int mFrequentSeparatorPos = ListView.INVALID_POSITION;
-        private boolean mDisplaySectionHeaders = true;
-        private Cursor mSuggestionsCursor;
-        private int mSuggestionsCursorCount;
-
-        public ContactItemListAdapter(Context context) {
-            super(context, null, false);
-
-            mUnknownNameText = context.getText(android.R.string.unknownName);
-            switch (mMode) {
-                case MODE_LEGACY_PICK_POSTAL:
-                case MODE_PICK_POSTAL:
-                case MODE_LEGACY_PICK_PHONE:
-                case MODE_PICK_PHONE:
-                case MODE_STREQUENT:
-                case MODE_FREQUENT:
-                    mDisplaySectionHeaders = false;
-                    break;
-            }
-
-            if (mSearchMode) {
-                mDisplaySectionHeaders = false;
-            }
-
-            // Do not display the second line of text if in a specific SEARCH query mode, usually for
-            // matching a specific E-mail or phone number. Any contact details
-            // shown would be identical, and columns might not even be present
-            // in the returned cursor.
-            if (mMode != MODE_QUERY_PICK_PHONE && mQueryMode != QUERY_MODE_NONE) {
-                mDisplayAdditionalData = false;
-            }
-
-            if ((mMode & MODE_MASK_NO_DATA) == MODE_MASK_NO_DATA) {
-                mDisplayAdditionalData = false;
-            }
-
-            if ((mMode & MODE_MASK_SHOW_CALL_BUTTON) == MODE_MASK_SHOW_CALL_BUTTON) {
-                mDisplayCallButton = true;
-            }
-
-            if ((mMode & MODE_MASK_SHOW_PHOTOS) == MODE_MASK_SHOW_PHOTOS) {
-                mDisplayPhotos = true;
-            }
-        }
-
-        public boolean getDisplaySectionHeadersEnabled() {
-            return mDisplaySectionHeaders;
-        }
-
-        public void setSuggestionsCursor(Cursor cursor) {
-            if (mSuggestionsCursor != null) {
-                mSuggestionsCursor.close();
-            }
-            mSuggestionsCursor = cursor;
-            mSuggestionsCursorCount = cursor == null ? 0 : cursor.getCount();
-        }
-
-        /**
-         * Callback on the UI thread when the content observer on the backing cursor fires.
-         * Instead of calling requery we need to do an async query so that the requery doesn't
-         * block the UI thread for a long time.
-         */
-        @Override
-        protected void onContentChanged() {
-            CharSequence constraint = getTextFilter();
-            if (!TextUtils.isEmpty(constraint)) {
-                // Reset the filter state then start an async filter operation
-                Filter filter = getFilter();
-                filter.filter(constraint);
-            } else {
-                // Start an async query
-                startQuery();
-            }
-        }
-
-        public void setLoading(boolean loading) {
-            mLoading = loading;
-        }
-
-        @Override
-        public boolean isEmpty() {
-            if (mProviderStatus != ProviderStatus.STATUS_NORMAL) {
-                return true;
-            }
-
-            if (mSearchMode) {
-                return TextUtils.isEmpty(getTextFilter());
-            } else if ((mMode & MODE_MASK_CREATE_NEW) == MODE_MASK_CREATE_NEW) {
-                // This mode mask adds a header and we always want it to show up, even
-                // if the list is empty, so always claim the list is not empty.
-                return false;
-            } else {
-                if (mCursor == null || mLoading) {
-                    // We don't want the empty state to show when loading.
-                    return false;
-                } else {
-                    return super.isEmpty();
-                }
-            }
-        }
-
-        @Override
-        public int getItemViewType(int position) {
-            if (position == 0 && (mShowNumberOfContacts || (mMode & MODE_MASK_CREATE_NEW) != 0)) {
-                return IGNORE_ITEM_VIEW_TYPE;
-            }
-
-            if (isShowAllContactsItemPosition(position)) {
-                return IGNORE_ITEM_VIEW_TYPE;
-            }
-
-            if (isSearchAllContactsItemPosition(position)) {
-                return IGNORE_ITEM_VIEW_TYPE;
-            }
-
-            if (getSeparatorId(position) != 0) {
-                // We don't want the separator view to be recycled.
-                return IGNORE_ITEM_VIEW_TYPE;
-            }
-
-            return super.getItemViewType(position);
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup parent) {
-            if (!mDataValid) {
-                throw new IllegalStateException(
-                        "this should only be called when the cursor is valid");
-            }
-
-            // handle the total contacts item
-            if (position == 0 && mShowNumberOfContacts) {
-                return getTotalContactCountView(parent);
-            }
-
-            if (position == 0 && (mMode & MODE_MASK_CREATE_NEW) != 0) {
-                // Add the header for creating a new contact
-                return getLayoutInflater().inflate(R.layout.create_new_contact, parent, false);
-            }
-
-            if (isShowAllContactsItemPosition(position)) {
-                return getLayoutInflater().
-                        inflate(R.layout.contacts_list_show_all_item, parent, false);
-            }
-
-            if (isSearchAllContactsItemPosition(position)) {
-                return getLayoutInflater().
-                        inflate(R.layout.contacts_list_search_all_item, parent, false);
-            }
-
-            // Handle the separator specially
-            int separatorId = getSeparatorId(position);
-            if (separatorId != 0) {
-                TextView view = (TextView) getLayoutInflater().
-                        inflate(R.layout.list_separator, parent, false);
-                view.setText(separatorId);
-                return view;
-            }
-
-            boolean showingSuggestion;
-            Cursor cursor;
-            if (mSuggestionsCursorCount != 0 && position < mSuggestionsCursorCount + 2) {
-                showingSuggestion = true;
-                cursor = mSuggestionsCursor;
-            } else {
-                showingSuggestion = false;
-                cursor = mCursor;
-            }
-
-            int realPosition = getRealPosition(position);
-            if (!cursor.moveToPosition(realPosition)) {
-                throw new IllegalStateException("couldn't move cursor to position " + position);
-            }
-
-            boolean newView;
-            View v;
-            if (convertView == null || convertView.getTag() == null) {
-                newView = true;
-                v = newView(mContext, cursor, parent);
-            } else {
-                newView = false;
-                v = convertView;
-            }
-            bindView(v, mContext, cursor);
-            bindSectionHeader(v, realPosition, mDisplaySectionHeaders && !showingSuggestion);
-            return v;
-        }
-
-        private View getTotalContactCountView(ViewGroup parent) {
-            final LayoutInflater inflater = getLayoutInflater();
-            View view = inflater.inflate(R.layout.total_contacts, parent, false);
-
-            TextView totalContacts = (TextView) view.findViewById(R.id.totalContactsText);
-
-            String text;
-            int count = getRealCount();
-
-            if (mSearchMode && !TextUtils.isEmpty(getTextFilter())) {
-                text = getQuantityText(count, R.string.listFoundAllContactsZero,
-                        R.plurals.searchFoundContacts);
-            } else {
-                if (mDisplayOnlyPhones) {
-                    text = getQuantityText(count, R.string.listTotalPhoneContactsZero,
-                            R.plurals.listTotalPhoneContacts);
-                } else {
-                    text = getQuantityText(count, R.string.listTotalAllContactsZero,
-                            R.plurals.listTotalAllContacts);
-                }
-            }
-            totalContacts.setText(text);
-            return view;
-        }
-
-        private boolean isShowAllContactsItemPosition(int position) {
-            return mMode == MODE_JOIN_CONTACT && mJoinModeShowAllContacts
-                    && mSuggestionsCursorCount != 0 && position == mSuggestionsCursorCount + 2;
-        }
-
-        private boolean isSearchAllContactsItemPosition(int position) {
-            return mSearchMode && position == getCount() - 1;
-        }
-
-        private int getSeparatorId(int position) {
-            int separatorId = 0;
-            if (position == mFrequentSeparatorPos) {
-                separatorId = R.string.favoritesFrquentSeparator;
-            }
-            if (mSuggestionsCursorCount != 0) {
-                if (position == 0) {
-                    separatorId = R.string.separatorJoinAggregateSuggestions;
-                } else if (position == mSuggestionsCursorCount + 1) {
-                    separatorId = R.string.separatorJoinAggregateAll;
-                }
-            }
-            return separatorId;
-        }
-
-        @Override
-        public View newView(Context context, Cursor cursor, ViewGroup parent) {
-            final ContactListItemView view = new ContactListItemView(context, null);
-            view.setOnCallButtonClickListener(ContactsListActivity.this);
-            view.setTag(new ContactListItemCache());
-            return view;
-        }
-
-        @Override
-        public void bindView(View itemView, Context context, Cursor cursor) {
-            final ContactListItemView view = (ContactListItemView)itemView;
-            final ContactListItemCache cache = (ContactListItemCache) view.getTag();
-
-            int typeColumnIndex;
-            int dataColumnIndex;
-            int labelColumnIndex;
-            int defaultType;
-            int nameColumnIndex;
-            int phoneticNameColumnIndex;
-            boolean displayAdditionalData = mDisplayAdditionalData;
-            boolean highlightingEnabled = false;
-            switch(mMode) {
-                case MODE_PICK_PHONE:
-                case MODE_LEGACY_PICK_PHONE:
-                case MODE_QUERY_PICK_PHONE: {
-                    nameColumnIndex = PHONE_DISPLAY_NAME_COLUMN_INDEX;
-                    phoneticNameColumnIndex = -1;
-                    dataColumnIndex = PHONE_NUMBER_COLUMN_INDEX;
-                    typeColumnIndex = PHONE_TYPE_COLUMN_INDEX;
-                    labelColumnIndex = PHONE_LABEL_COLUMN_INDEX;
-                    defaultType = Phone.TYPE_HOME;
-                    break;
-                }
-                case MODE_PICK_POSTAL:
-                case MODE_LEGACY_PICK_POSTAL: {
-                    nameColumnIndex = POSTAL_DISPLAY_NAME_COLUMN_INDEX;
-                    phoneticNameColumnIndex = -1;
-                    dataColumnIndex = POSTAL_ADDRESS_COLUMN_INDEX;
-                    typeColumnIndex = POSTAL_TYPE_COLUMN_INDEX;
-                    labelColumnIndex = POSTAL_LABEL_COLUMN_INDEX;
-                    defaultType = StructuredPostal.TYPE_HOME;
-                    break;
-                }
-                default: {
-                    nameColumnIndex = getSummaryDisplayNameColumnIndex();
-                    if (mMode == MODE_LEGACY_PICK_PERSON
-                            || mMode == MODE_LEGACY_PICK_OR_CREATE_PERSON) {
-                        phoneticNameColumnIndex = -1;
-                    } else {
-                        phoneticNameColumnIndex = SUMMARY_PHONETIC_NAME_COLUMN_INDEX;
-                    }
-                    dataColumnIndex = -1;
-                    typeColumnIndex = -1;
-                    labelColumnIndex = -1;
-                    defaultType = Phone.TYPE_HOME;
-                    displayAdditionalData = false;
-                    highlightingEnabled = mHighlightWhenScrolling && mMode != MODE_STREQUENT;
-                }
-            }
-
-            // Set the name
-            cursor.copyStringToBuffer(nameColumnIndex, cache.nameBuffer);
-            TextView nameView = view.getNameTextView();
-            int size = cache.nameBuffer.sizeCopied;
-            if (size != 0) {
-                if (highlightingEnabled) {
-                    if (cache.textWithHighlighting == null) {
-                        cache.textWithHighlighting =
-                                mHighlightingAnimation.createTextWithHighlighting();
-                    }
-                    buildDisplayNameWithHighlighting(nameView, cursor, cache.nameBuffer,
-                            cache.highlightedTextBuffer, cache.textWithHighlighting);
-                } else {
-                    nameView.setText(cache.nameBuffer.data, 0, size);
-                }
-            } else {
-                nameView.setText(mUnknownNameText);
-            }
-
-            boolean hasPhone = cursor.getColumnCount() >= SUMMARY_HAS_PHONE_COLUMN_INDEX
-                    && cursor.getInt(SUMMARY_HAS_PHONE_COLUMN_INDEX) != 0;
-
-            // Make the call button visible if requested.
-            if (mDisplayCallButton && hasPhone) {
-                int pos = cursor.getPosition();
-                view.showCallButton(android.R.id.button1, pos);
-            } else {
-                view.hideCallButton();
-            }
-
-            // Set the photo, if requested
-            if (mDisplayPhotos) {
-                boolean useQuickContact = (mMode & MODE_MASK_DISABLE_QUIKCCONTACT) == 0;
-
-                long photoId = 0;
-                if (!cursor.isNull(SUMMARY_PHOTO_ID_COLUMN_INDEX)) {
-                    photoId = cursor.getLong(SUMMARY_PHOTO_ID_COLUMN_INDEX);
-                }
-
-                ImageView viewToUse;
-                if (useQuickContact) {
-                    // Build soft lookup reference
-                    final long contactId = cursor.getLong(SUMMARY_ID_COLUMN_INDEX);
-                    final String lookupKey = cursor.getString(SUMMARY_LOOKUP_KEY_COLUMN_INDEX);
-                    QuickContactBadge quickContact = view.getQuickContact();
-                    quickContact.assignContactUri(Contacts.getLookupUri(contactId, lookupKey));
-                    quickContact.setSelectedContactsAppTabIndex(StickyTabs.getTab(getIntent()));
-                    viewToUse = quickContact;
-                } else {
-                    viewToUse = view.getPhotoView();
-                }
-
-                final int position = cursor.getPosition();
-                mPhotoLoader.loadPhoto(viewToUse, photoId);
-            }
-
-            if ((mMode & MODE_MASK_NO_PRESENCE) == 0) {
-                // Set the proper icon (star or presence or nothing)
-                int serverStatus;
-                if (!cursor.isNull(SUMMARY_PRESENCE_STATUS_COLUMN_INDEX)) {
-                    serverStatus = cursor.getInt(SUMMARY_PRESENCE_STATUS_COLUMN_INDEX);
-                    Drawable icon = ContactPresenceIconUtil.getPresenceIcon(mContext, serverStatus);
-                    if (icon != null) {
-                        view.setPresence(icon);
-                    } else {
-                        view.setPresence(null);
-                    }
-                } else {
-                    view.setPresence(null);
-                }
-            } else {
-                view.setPresence(null);
-            }
-
-            if (mShowSearchSnippets) {
-                boolean showSnippet = false;
-                String snippetMimeType = cursor.getString(SUMMARY_SNIPPET_MIMETYPE_COLUMN_INDEX);
-                if (Email.CONTENT_ITEM_TYPE.equals(snippetMimeType)) {
-                    String email = cursor.getString(SUMMARY_SNIPPET_DATA1_COLUMN_INDEX);
-                    if (!TextUtils.isEmpty(email)) {
-                        view.setSnippet(email);
-                        showSnippet = true;
-                    }
-                } else if (Organization.CONTENT_ITEM_TYPE.equals(snippetMimeType)) {
-                    String company = cursor.getString(SUMMARY_SNIPPET_DATA1_COLUMN_INDEX);
-                    String title = cursor.getString(SUMMARY_SNIPPET_DATA4_COLUMN_INDEX);
-                    if (!TextUtils.isEmpty(company)) {
-                        if (!TextUtils.isEmpty(title)) {
-                            view.setSnippet(company + " / " + title);
-                        } else {
-                            view.setSnippet(company);
-                        }
-                        showSnippet = true;
-                    } else if (!TextUtils.isEmpty(title)) {
-                        view.setSnippet(title);
-                        showSnippet = true;
-                    }
-                } else if (Nickname.CONTENT_ITEM_TYPE.equals(snippetMimeType)) {
-                    String nickname = cursor.getString(SUMMARY_SNIPPET_DATA1_COLUMN_INDEX);
-                    if (!TextUtils.isEmpty(nickname)) {
-                        view.setSnippet(nickname);
-                        showSnippet = true;
-                    }
-                }
-
-                if (!showSnippet) {
-                    view.setSnippet(null);
-                }
-            }
-
-            if (!displayAdditionalData) {
-                if (phoneticNameColumnIndex != -1) {
-
-                    // Set the name
-                    cursor.copyStringToBuffer(phoneticNameColumnIndex, cache.phoneticNameBuffer);
-                    int phoneticNameSize = cache.phoneticNameBuffer.sizeCopied;
-                    if (phoneticNameSize != 0) {
-                        view.setLabel(cache.phoneticNameBuffer.data, phoneticNameSize);
-                    } else {
-                        view.setLabel(null);
-                    }
-                } else {
-                    view.setLabel(null);
-                }
-                return;
-            }
-
-            // Set the data.
-            cursor.copyStringToBuffer(dataColumnIndex, cache.dataBuffer);
-
-            size = cache.dataBuffer.sizeCopied;
-            view.setData(cache.dataBuffer.data, size);
-
-            // Set the label.
-            if (!cursor.isNull(typeColumnIndex)) {
-                final int type = cursor.getInt(typeColumnIndex);
-                final String label = cursor.getString(labelColumnIndex);
-
-                if (mMode == MODE_LEGACY_PICK_POSTAL || mMode == MODE_PICK_POSTAL) {
-                    // TODO cache
-                    view.setLabel(StructuredPostal.getTypeLabel(context.getResources(), type,
-                            label));
-                } else {
-                    // TODO cache
-                    view.setLabel(Phone.getTypeLabel(context.getResources(), type, label));
-                }
-            } else {
-                view.setLabel(null);
-            }
-        }
-
-        /**
-         * Computes the span of the display name that has highlighted parts and configures
-         * the display name text view accordingly.
-         */
-        private void buildDisplayNameWithHighlighting(TextView textView, Cursor cursor,
-                CharArrayBuffer buffer1, CharArrayBuffer buffer2,
-                TextWithHighlighting textWithHighlighting) {
-            int oppositeDisplayOrderColumnIndex;
-            if (mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
-                oppositeDisplayOrderColumnIndex = SUMMARY_DISPLAY_NAME_ALTERNATIVE_COLUMN_INDEX;
-            } else {
-                oppositeDisplayOrderColumnIndex = SUMMARY_DISPLAY_NAME_PRIMARY_COLUMN_INDEX;
-            }
-            cursor.copyStringToBuffer(oppositeDisplayOrderColumnIndex, buffer2);
-
-            textWithHighlighting.setText(buffer1, buffer2);
-            textView.setText(textWithHighlighting);
-        }
-
-        private void bindSectionHeader(View itemView, int position, boolean displaySectionHeaders) {
-            final ContactListItemView view = (ContactListItemView)itemView;
-            final ContactListItemCache cache = (ContactListItemCache) view.getTag();
-            if (!displaySectionHeaders) {
-                view.setSectionHeader(null);
-                view.setDividerVisible(true);
-            } else {
-                final int section = getSectionForPosition(position);
-                if (getPositionForSection(section) == position) {
-                    String title = (String)mIndexer.getSections()[section];
-                    view.setSectionHeader(title);
-                } else {
-                    view.setDividerVisible(false);
-                    view.setSectionHeader(null);
-                }
-
-                // move the divider for the last item in a section
-                if (getPositionForSection(section + 1) - 1 == position) {
-                    view.setDividerVisible(false);
-                } else {
-                    view.setDividerVisible(true);
-                }
-            }
-        }
-
-        @Override
-        public void changeCursor(Cursor cursor) {
-            if (cursor != null) {
-                setLoading(false);
-            }
-
-            // Get the split between starred and frequent items, if the mode is strequent
-            mFrequentSeparatorPos = ListView.INVALID_POSITION;
-            int cursorCount = 0;
-            if (cursor != null && (cursorCount = cursor.getCount()) > 0
-                    && mMode == MODE_STREQUENT) {
-                cursor.move(-1);
-                for (int i = 0; cursor.moveToNext(); i++) {
-                    int starred = cursor.getInt(SUMMARY_STARRED_COLUMN_INDEX);
-                    if (starred == 0) {
-                        if (i > 0) {
-                            // Only add the separator when there are starred items present
-                            mFrequentSeparatorPos = i;
-                        }
-                        break;
-                    }
-                }
-            }
-
-            if (cursor != null && mSearchResultsMode) {
-                TextView foundContactsText = (TextView)findViewById(R.id.search_results_found);
-                String text = getQuantityText(cursor.getCount(), R.string.listFoundAllContactsZero,
-                        R.plurals.listFoundAllContacts);
-                foundContactsText.setText(text);
-            }
-
-            super.changeCursor(cursor);
-            // Update the indexer for the fast scroll widget
-            updateIndexer(cursor);
-        }
-
-        private void updateIndexer(Cursor cursor) {
-            if (cursor == null) {
-                mIndexer = null;
-                return;
-            }
-
-            Bundle bundle = cursor.getExtras();
-            if (bundle.containsKey(ContactCounts.EXTRA_ADDRESS_BOOK_INDEX_TITLES)) {
-                String sections[] =
-                    bundle.getStringArray(ContactCounts.EXTRA_ADDRESS_BOOK_INDEX_TITLES);
-                int counts[] = bundle.getIntArray(ContactCounts.EXTRA_ADDRESS_BOOK_INDEX_COUNTS);
-                mIndexer = new ContactsSectionIndexer(sections, counts);
-            } else {
-                mIndexer = null;
-            }
-        }
-
-        /**
-         * Run the query on a helper thread. Beware that this code does not run
-         * on the main UI thread!
-         */
-        @Override
-        public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-            return doFilter(constraint.toString());
-        }
-
-        public Object [] getSections() {
-            if (mIndexer == null) {
-                return new String[] { " " };
-            } else {
-                return mIndexer.getSections();
-            }
-        }
-
-        public int getPositionForSection(int sectionIndex) {
-            if (mIndexer == null) {
-                return -1;
-            }
-
-            return mIndexer.getPositionForSection(sectionIndex);
-        }
-
-        public int getSectionForPosition(int position) {
-            if (mIndexer == null) {
-                return -1;
-            }
-
-            return mIndexer.getSectionForPosition(position);
-        }
-
-        @Override
-        public boolean areAllItemsEnabled() {
-            return mMode != MODE_STARRED
-                && !mShowNumberOfContacts
-                && mSuggestionsCursorCount == 0;
-        }
-
-        @Override
-        public boolean isEnabled(int position) {
-            if (mShowNumberOfContacts) {
-                if (position == 0) {
-                    return false;
-                }
-                position--;
-            }
-
-            if (mSuggestionsCursorCount > 0) {
-                return position != 0 && position != mSuggestionsCursorCount + 1;
-            }
-            return position != mFrequentSeparatorPos;
-        }
-
-        @Override
-        public int getCount() {
-            if (!mDataValid) {
-                return 0;
-            }
-            int superCount = super.getCount();
-
-            if (mShowNumberOfContacts && (mSearchMode || superCount > 0)) {
-                // We don't want to count this header if it's the only thing visible, so that
-                // the empty text will display.
-                superCount++;
-            }
-
-            if (mSearchMode) {
-                // Last element in the list is the "Find
-                superCount++;
-            }
-
-            // We do not show the "Create New" button in Search mode
-            if ((mMode & MODE_MASK_CREATE_NEW) != 0 && !mSearchMode) {
-                // Count the "Create new contact" line
-                superCount++;
-            }
-
-            if (mSuggestionsCursorCount != 0) {
-                // When showing suggestions, we have 2 additional list items: the "Suggestions"
-                // and "All contacts" headers.
-                return mSuggestionsCursorCount + superCount + 2;
-            }
-            else if (mFrequentSeparatorPos != ListView.INVALID_POSITION) {
-                // When showing strequent list, we have an additional list item - the separator.
-                return superCount + 1;
-            } else {
-                return superCount;
-            }
-        }
-
-        /**
-         * Gets the actual count of contacts and excludes all the headers.
-         */
-        public int getRealCount() {
-            return super.getCount();
-        }
-
-        private int getRealPosition(int pos) {
-            if (mShowNumberOfContacts) {
-                pos--;
-            }
-
-            if ((mMode & MODE_MASK_CREATE_NEW) != 0 && !mSearchMode) {
-                return pos - 1;
-            } else if (mSuggestionsCursorCount != 0) {
-                // When showing suggestions, we have 2 additional list items: the "Suggestions"
-                // and "All contacts" separators.
-                if (pos < mSuggestionsCursorCount + 2) {
-                    // We are in the upper partition (Suggestions). Adjusting for the "Suggestions"
-                    // separator.
-                    return pos - 1;
-                } else {
-                    // We are in the lower partition (All contacts). Adjusting for the size
-                    // of the upper partition plus the two separators.
-                    return pos - mSuggestionsCursorCount - 2;
-                }
-            } else if (mFrequentSeparatorPos == ListView.INVALID_POSITION) {
-                // No separator, identity map
-                return pos;
-            } else if (pos <= mFrequentSeparatorPos) {
-                // Before or at the separator, identity map
-                return pos;
-            } else {
-                // After the separator, remove 1 from the pos to get the real underlying pos
-                return pos - 1;
-            }
-        }
-
-        @Override
-        public Object getItem(int pos) {
-            if (mSuggestionsCursorCount != 0 && pos <= mSuggestionsCursorCount) {
-                mSuggestionsCursor.moveToPosition(getRealPosition(pos));
-                return mSuggestionsCursor;
-            } else if (isSearchAllContactsItemPosition(pos)){
-                return null;
-            } else {
-                int realPosition = getRealPosition(pos);
-                if (realPosition < 0) {
-                    return null;
-                }
-                return super.getItem(realPosition);
-            }
-        }
-
-        @Override
-        public long getItemId(int pos) {
-            if (mSuggestionsCursorCount != 0 && pos < mSuggestionsCursorCount + 2) {
-                if (mSuggestionsCursor.moveToPosition(pos - 1)) {
-                    return mSuggestionsCursor.getLong(mRowIDColumn);
-                } else {
-                    return 0;
-                }
-            } else if (isSearchAllContactsItemPosition(pos)) {
-                return 0;
-            }
-            int realPosition = getRealPosition(pos);
-            if (realPosition < 0) {
-                return 0;
-            }
-            return super.getItemId(realPosition);
-        }
-
-        public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
-                int totalItemCount) {
-            if (view instanceof PinnedHeaderListView) {
-                ((PinnedHeaderListView)view).configureHeaderView(firstVisibleItem);
-            }
-        }
-
-        public void onScrollStateChanged(AbsListView view, int scrollState) {
-            if (mHighlightWhenScrolling) {
-                if (scrollState != OnScrollListener.SCROLL_STATE_IDLE) {
-                    mHighlightingAnimation.startHighlighting();
-                } else {
-                    mHighlightingAnimation.stopHighlighting();
-                }
-            }
-
-            if (scrollState == OnScrollListener.SCROLL_STATE_FLING) {
-                mPhotoLoader.pause();
-            } else if (mDisplayPhotos) {
-                mPhotoLoader.resume();
-            }
-        }
-
-        /**
-         * Computes the state of the pinned header.  It can be invisible, fully
-         * visible or partially pushed up out of the view.
-         */
-        public int getPinnedHeaderState(int position) {
-            if (mIndexer == null || mCursor == null || mCursor.getCount() == 0) {
-                return PINNED_HEADER_GONE;
-            }
-
-            int realPosition = getRealPosition(position);
-            if (realPosition < 0) {
-                return PINNED_HEADER_GONE;
-            }
-
-            // The header should get pushed up if the top item shown
-            // is the last item in a section for a particular letter.
-            int section = getSectionForPosition(realPosition);
-            int nextSectionPosition = getPositionForSection(section + 1);
-            if (nextSectionPosition != -1 && realPosition == nextSectionPosition - 1) {
-                return PINNED_HEADER_PUSHED_UP;
-            }
-
-            return PINNED_HEADER_VISIBLE;
-        }
-
-        /**
-         * Configures the pinned header by setting the appropriate text label
-         * and also adjusting color if necessary.  The color needs to be
-         * adjusted when the pinned header is being pushed up from the view.
-         */
-        public void configurePinnedHeader(View header, int position, int alpha) {
-            PinnedHeaderCache cache = (PinnedHeaderCache)header.getTag();
-            if (cache == null) {
-                cache = new PinnedHeaderCache();
-                cache.titleView = (TextView)header.findViewById(R.id.header_text);
-                cache.textColor = cache.titleView.getTextColors();
-                cache.background = header.getBackground();
-                header.setTag(cache);
-            }
-
-            int realPosition = getRealPosition(position);
-            int section = getSectionForPosition(realPosition);
-
-            String title = (String)mIndexer.getSections()[section];
-            cache.titleView.setText(title);
-
-            if (alpha == 255) {
-                // Opaque: use the default background, and the original text color
-                header.setBackgroundDrawable(cache.background);
-                cache.titleView.setTextColor(cache.textColor);
-            } else {
-                // Faded: use a solid color approximation of the background, and
-                // a translucent text color
-                header.setBackgroundColor(Color.rgb(
-                        Color.red(mPinnedHeaderBackgroundColor) * alpha / 255,
-                        Color.green(mPinnedHeaderBackgroundColor) * alpha / 255,
-                        Color.blue(mPinnedHeaderBackgroundColor) * alpha / 255));
-
-                int textColor = cache.textColor.getDefaultColor();
-                cache.titleView.setTextColor(Color.argb(alpha,
-                        Color.red(textColor), Color.green(textColor), Color.blue(textColor)));
-            }
-        }
-    }
-
-    private ContactsPreferences.ChangeListener mPreferencesChangeListener =
-            new ContactsPreferences.ChangeListener() {
-        @Override
-        public void onChange() {
-            // When returning from DisplayOptions, onActivityResult ensures that we reload the list,
-            // so we do not have to do anything here. However, ContactsPreferences requires a change
-            // listener, otherwise it would not reload its settings.
-        }
-    };
-}
diff --git a/src/com/android/contacts/ContactsSearchManager.java b/src/com/android/contacts/ContactsSearchManager.java
index d65e079..edb2016 100644
--- a/src/com/android/contacts/ContactsSearchManager.java
+++ b/src/com/android/contacts/ContactsSearchManager.java
@@ -16,6 +16,8 @@
 
 package com.android.contacts;
 
+import com.android.contacts.list.ContactsRequest;
+
 import android.app.Activity;
 import android.content.Intent;
 import android.os.Bundle;
@@ -31,27 +33,28 @@
      * An extra that provides context for search UI and defines the scope for
      * the search queries.
      */
-    public static final String ORIGINAL_ACTION_EXTRA_KEY = "originalAction";
-
-    /**
-     * An extra that provides context for search UI and defines the scope for
-     * the search queries.
-     */
-    public static final String ORIGINAL_COMPONENT_EXTRA_KEY = "originalComponent";
+    public static final String ORIGINAL_REQUEST_KEY = "originalRequest";
 
     /**
      * Starts the contact list activity in the search mode.
      */
     public static void startSearch(Activity context, String initialQuery) {
-        context.startActivity(buildIntent(context, initialQuery));
+        context.startActivity(buildIntent(context, initialQuery, null));
     }
 
     public static void startSearchForResult(Activity context, String initialQuery,
-            int requestCode) {
-        context.startActivityForResult(buildIntent(context, initialQuery), requestCode);
+            int requestCode, ContactsRequest originalRequest) {
+        context.startActivityForResult(
+                buildIntent(context, initialQuery, originalRequest), requestCode);
     }
 
-    private static Intent buildIntent(Activity context, String initialQuery) {
+    public static void startSearch(Activity context, String initialQuery,
+            ContactsRequest originalRequest) {
+        context.startActivity(buildIntent(context, initialQuery, originalRequest));
+    }
+
+    private static Intent buildIntent(
+            Activity context, String initialQuery, ContactsRequest originalRequest) {
         Intent intent = new Intent();
         intent.setData(ContactsContract.Contacts.CONTENT_URI);
         intent.setAction(UI.FILTER_CONTACTS_ACTION);
@@ -62,8 +65,9 @@
             intent.putExtras(originalExtras);
         }
         intent.putExtra(UI.FILTER_TEXT_EXTRA_KEY, initialQuery);
-        intent.putExtra(ORIGINAL_ACTION_EXTRA_KEY, originalIntent.getAction());
-        intent.putExtra(ORIGINAL_COMPONENT_EXTRA_KEY, originalIntent.getComponent().getClassName());
+        if (originalRequest != null) {
+            intent.putExtra(ORIGINAL_REQUEST_KEY, originalRequest);
+        }
         return intent;
     }
 }
diff --git a/src/com/android/contacts/ContactsSectionIndexer.java b/src/com/android/contacts/ContactsSectionIndexer.java
deleted file mode 100644
index 01d461f..0000000
--- a/src/com/android/contacts/ContactsSectionIndexer.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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;
-
-import android.widget.SectionIndexer;
-
-import java.util.Arrays;
-
-/**
- * A section indexer that is configured with precomputed section titles and
- * their respective counts.
- */
-public class ContactsSectionIndexer implements SectionIndexer {
-
-    private final String[] mSections;
-    private final int[] mPositions;
-    private final int mCount;
-
-    /**
-     * Constructor.
-     *
-     * @param sections a non-null array
-     * @param counts a non-null array of the same size as <code>sections</code>
-     */
-    public ContactsSectionIndexer(String[] sections, int[] counts) {
-        if (sections == null || counts == null) {
-            throw new NullPointerException();
-        }
-
-        if (sections.length != counts.length) {
-            throw new IllegalArgumentException(
-                    "The sections and counts arrays must have the same length");
-        }
-
-        // TODO process sections/counts based on current locale and/or specific section titles
-
-        this.mSections = sections;
-        mPositions = new int[counts.length];
-        int position = 0;
-        for (int i = 0; i < counts.length; i++) {
-            if (mSections[i] == null) {
-                mSections[i] = " ";
-            } else {
-                mSections[i] = mSections[i].trim();
-            }
-
-            mPositions[i] = position;
-            position += counts[i];
-        }
-        mCount = position;
-    }
-
-    public Object[] getSections() {
-        return mSections;
-    }
-
-    public int getPositionForSection(int section) {
-        if (section < 0 || section >= mSections.length) {
-            return -1;
-        }
-
-        return mPositions[section];
-    }
-
-    public int getSectionForPosition(int position) {
-        if (position < 0 || position >= mCount) {
-            return -1;
-        }
-
-        int index = Arrays.binarySearch(mPositions, position);
-
-        /*
-         * Consider this example: section positions are 0, 3, 5; the supplied
-         * position is 4. The section corresponding to position 4 starts at
-         * position 3, so the expected return value is 1. Binary search will not
-         * find 4 in the array and thus will return -insertPosition-1, i.e. -3.
-         * To get from that number to the expected value of 1 we need to negate
-         * and subtract 2.
-         */
-        return index >= 0 ? index : -index - 2;
-    }
-}
diff --git a/src/com/android/contacts/ContactsUtils.java b/src/com/android/contacts/ContactsUtils.java
index 94dabba..fd9eb58 100644
--- a/src/com/android/contacts/ContactsUtils.java
+++ b/src/com/android/contacts/ContactsUtils.java
@@ -16,8 +16,7 @@
 
 package com.android.contacts;
 
-
-import com.android.contacts.model.ContactsSource;
+import com.android.contacts.model.BaseAccountType;
 import com.android.contacts.util.Constants;
 
 import android.content.ContentResolver;
@@ -29,6 +28,7 @@
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.drawable.Drawable;
+import android.location.CountryDetector;
 import android.net.Uri;
 import android.provider.ContactsContract.Contacts;
 import android.provider.ContactsContract.Data;
@@ -236,33 +236,104 @@
         return null;
     }
 
+    public static final class ImActions {
+        private final Intent mPrimaryIntent;
+        private final Intent mSecondaryIntent;
+        private final int mPrimaryActionIcon;
+        private final int mSecondaryActionIcon;
+
+        private ImActions(Intent primaryIntent, Intent secondaryIntent, int primaryActionIcon,
+                int secondaryActionIcon) {
+            mPrimaryIntent = primaryIntent;
+            mSecondaryIntent = secondaryIntent;
+            mPrimaryActionIcon = primaryActionIcon;
+            mSecondaryActionIcon = secondaryActionIcon;
+        }
+
+        public Intent getPrimaryIntent() {
+            return mPrimaryIntent;
+        }
+
+        public Intent getSecondaryIntent() {
+            return mSecondaryIntent;
+        }
+
+        public int getPrimaryActionIcon() {
+            return mPrimaryActionIcon;
+        }
+
+        public int getSecondaryActionIcon() {
+            return mSecondaryActionIcon;
+        }
+    }
+
     /**
      * Build {@link Intent} to launch an action for the given {@link Im} or
-     * {@link Email} row. Returns null when missing protocol or data.
+     * {@link Email} row. If the result is non-null, it either contains one or two Intents
+     * (e.g. [Text, Videochat] or just [Text])
+     * Returns null when missing protocol or data.
      */
-    public static Intent buildImIntent(ContentValues values) {
+    public static ImActions buildImActions(ContentValues values) {
         final boolean isEmail = Email.CONTENT_ITEM_TYPE.equals(values.getAsString(Data.MIMETYPE));
 
         if (!isEmail && !isProtocolValid(values)) {
             return null;
         }
 
+        final String data = values.getAsString(isEmail ? Email.DATA : Im.DATA);
+        if (TextUtils.isEmpty(data)) return null;
+
         final int protocol = isEmail ? Im.PROTOCOL_GOOGLE_TALK : values.getAsInteger(Im.PROTOCOL);
 
-        String host = values.getAsString(Im.CUSTOM_PROTOCOL);
-        String data = values.getAsString(isEmail ? Email.DATA : Im.DATA);
-        if (protocol != Im.PROTOCOL_CUSTOM) {
-            // Try bringing in a well-known host for specific protocols
-            host = ContactsUtils.lookupProviderNameFromId(protocol);
-        }
-
-        if (!TextUtils.isEmpty(host) && !TextUtils.isEmpty(data)) {
-            final String authority = host.toLowerCase();
-            final Uri imUri = new Uri.Builder().scheme(Constants.SCHEME_IMTO).authority(
-                    authority).appendPath(data).build();
-            return new Intent(Intent.ACTION_SENDTO, imUri);
+        if (protocol == Im.PROTOCOL_GOOGLE_TALK) {
+            final Integer chatCapabilityObj = values.getAsInteger(Im.CHAT_CAPABILITY);
+            final int chatCapability = chatCapabilityObj == null ? 0 : chatCapabilityObj;
+            if ((chatCapability & Im.CAPABILITY_HAS_CAMERA) != 0) {
+                // Allow Video chat and Texting
+                return new ImActions(
+                        new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?message")),
+                        new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?call")),
+                        android.R.drawable.sym_action_chat,
+                        R.drawable.sym_action_videochat
+                        );
+            } else if ((chatCapability & Im.CAPABILITY_HAS_VOICE) != 0) {
+                // Allow Talking and Texting
+                return new ImActions(
+                        new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?message")),
+                        new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?call")),
+                        android.R.drawable.sym_action_chat,
+                        R.drawable.sym_action_audiochat
+                        );
+            } else {
+                return new ImActions(
+                        new Intent(Intent.ACTION_SENDTO, Uri.parse("xmpp:" + data + "?message")),
+                        null,
+                        android.R.drawable.sym_action_chat,
+                        -1
+                        );
+            }
         } else {
-            return null;
+            // Build an IM Intent
+            String host = values.getAsString(Im.CUSTOM_PROTOCOL);
+
+            if (protocol != Im.PROTOCOL_CUSTOM) {
+                // Try bringing in a well-known host for specific protocols
+                host = ContactsUtils.lookupProviderNameFromId(protocol);
+            }
+
+            if (!TextUtils.isEmpty(host)) {
+                final String authority = host.toLowerCase();
+                final Uri imUri = new Uri.Builder().scheme(Constants.SCHEME_IMTO).authority(
+                        authority).appendPath(data).build();
+                return new ImActions(
+                        new Intent(Intent.ACTION_SENDTO, imUri),
+                        null,
+                        android.R.drawable.sym_action_chat,
+                        -1
+                        );
+            } else {
+                return null;
+            }
         }
     }
 
@@ -388,10 +459,10 @@
      * Utility for creating a standard tab indicator view.
      *
      * @param parent The parent ViewGroup to attach the new view to.
-     * @param source The {@link ContactsSource} to build the tab view from.
+     * @param source The {@link BaseAccountType} to build the tab view from.
      * @return The tab indicator View.
      */
-    public static View createTabIndicatorView(ViewGroup parent, ContactsSource source) {
+    public static View createTabIndicatorView(ViewGroup parent, BaseAccountType source) {
         Drawable icon = null;
         if (source != null) {
             icon = source.getDisplayIcon(parent.getContext());
@@ -490,4 +561,14 @@
         }
         return TextUtils.equals(a.getAction(), b.getAction());
     }
+
+    /**
+     * @return The ISO 3166-1 two letters country code of the country the user
+     *         is in.
+     */
+    public static final String getCurrentCountryIso(Context context) {
+        CountryDetector detector =
+                (CountryDetector) context.getSystemService(Context.COUNTRY_DETECTOR);
+        return detector.detectCountry().getCountryIso();
+    }
 }
diff --git a/src/com/android/contacts/DialtactsActivity.java b/src/com/android/contacts/DialtactsActivity.java
index ef183c5..ce8d3f4 100644
--- a/src/com/android/contacts/DialtactsActivity.java
+++ b/src/com/android/contacts/DialtactsActivity.java
@@ -16,6 +16,8 @@
 
 package com.android.contacts;
 
+import com.android.contacts.activities.ContactsFrontDoor;
+import com.android.contacts.activities.ContactBrowserActivity;
 import com.android.internal.telephony.ITelephony;
 
 import android.app.Activity;
@@ -44,6 +46,10 @@
     private static final String FAVORITES_ENTRY_COMPONENT =
             "com.android.contacts.DialtactsFavoritesEntryActivity";
 
+    /** Opens the Contacts app in the state the user has last set it to */
+    private static final String CONTACTS_LAUNCH_ACTIVITY =
+            "com.android.contacts.ContactsLaunchActivity";
+
     private static final int TAB_INDEX_DIALER = 0;
     private static final int TAB_INDEX_CALL_LOG = 1;
     private static final int TAB_INDEX_CONTACTS = 2;
@@ -51,19 +57,32 @@
 
     static final String EXTRA_IGNORE_STATE = "ignore-state";
 
+    /** Name of the dialtacts shared preferences */
+    static final String PREFS_DIALTACTS = "dialtacts";
     /** If true, when handling the contacts intent the favorites tab will be shown instead */
-    private static final String PREF_FAVORITES_AS_CONTACTS = "favorites_as_contacts";
-    private static final boolean PREF_FAVORITES_AS_CONTACTS_DEFAULT = false;
+    static final String PREF_FAVORITES_AS_CONTACTS = "favorites_as_contacts";
+    static final boolean PREF_FAVORITES_AS_CONTACTS_DEFAULT = false;
+
+    /** Last manually selected tab index */
+    private static final String PREF_LAST_MANUALLY_SELECTED_TAB = "last_manually_selected_tab";
+    private static final int PREF_LAST_MANUALLY_SELECTED_TAB_DEFAULT = TAB_INDEX_DIALER;
 
     private TabHost mTabHost;
     private String mFilterText;
     private Uri mDialUri;
 
+    /**
+     * The index of the tab that has last been manually selected (the user clicked on a tab).
+     * This value does not keep track of programmatically set Tabs (e.g. Call Log after a Call)
+     */
+    private int mLastManuallySelectedTab;
+
     @Override
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
         final Intent intent = getIntent();
+        fixIntent(intent);
 
         requestWindowFeature(Window.FEATURE_NO_TITLE);
         setContentView(R.layout.dialer_activity);
@@ -77,9 +96,14 @@
         setupContactsTab();
         setupFavoritesTab();
 
+        // Load the last manually loaded tab
+        final SharedPreferences prefs = getSharedPreferences(PREFS_DIALTACTS, MODE_PRIVATE);
+        mLastManuallySelectedTab = prefs.getInt(PREF_LAST_MANUALLY_SELECTED_TAB,
+                PREF_LAST_MANUALLY_SELECTED_TAB_DEFAULT);
+
         setCurrentTab(intent);
 
-        if (intent.getAction().equals(UI.FILTER_CONTACTS_ACTION)
+        if (UI.FILTER_CONTACTS_ACTION.equals(intent.getAction())
                 && icicle == null) {
             setupFilterText(intent);
         }
@@ -91,19 +115,30 @@
 
         final int currentTabIndex = mTabHost.getCurrentTab();
         final SharedPreferences.Editor editor =
-                getSharedPreferences(StickyTabs.PREFERENCES_NAME, MODE_PRIVATE).edit();
+                getSharedPreferences(PREFS_DIALTACTS, MODE_PRIVATE).edit();
         if (currentTabIndex == TAB_INDEX_CONTACTS || currentTabIndex == TAB_INDEX_FAVORITES) {
             editor.putBoolean(PREF_FAVORITES_AS_CONTACTS, currentTabIndex == TAB_INDEX_FAVORITES);
         }
+        editor.putInt(PREF_LAST_MANUALLY_SELECTED_TAB, mLastManuallySelectedTab);
 
         editor.apply();
     }
 
+    private void fixIntent(Intent intent) {
+        // This should be cleaned up: the call key used to send an Intent
+        // that just said to go to the recent calls list.  It now sends this
+        // abstract action, but this class hasn't been rewritten to deal with it.
+        if (Intent.ACTION_CALL_BUTTON.equals(intent.getAction())) {
+            intent.setDataAndType(Calls.CONTENT_URI, Calls.CONTENT_TYPE);
+            intent.putExtra("call_key", true);
+            setIntent(intent);
+        }
+    }
+
     private void setupCallLogTab() {
         // Force the class since overriding tab entries doesn't work
         Intent intent = new Intent("com.android.phone.action.RECENT_CALLS");
         intent.setClass(this, RecentCallsListActivity.class);
-        StickyTabs.setTab(intent, TAB_INDEX_CALL_LOG);
 
         mTabHost.addTab(mTabHost.newTabSpec("call_log")
                 .setIndicator(getString(R.string.recentCallsIconLabel),
@@ -114,7 +149,6 @@
     private void setupDialerTab() {
         Intent intent = new Intent("com.android.phone.action.TOUCH_DIALER");
         intent.setClass(this, TwelveKeyDialer.class);
-        StickyTabs.setTab(intent, TAB_INDEX_DIALER);
 
         mTabHost.addTab(mTabHost.newTabSpec("dialer")
                 .setIndicator(getString(R.string.dialerIconLabel),
@@ -124,8 +158,7 @@
 
     private void setupContactsTab() {
         Intent intent = new Intent(UI.LIST_DEFAULT);
-        intent.setClass(this, ContactsListActivity.class);
-        StickyTabs.setTab(intent, TAB_INDEX_CONTACTS);
+        intent.setClass(this, ContactBrowserActivity.class);
 
         mTabHost.addTab(mTabHost.newTabSpec("contacts")
                 .setIndicator(getText(R.string.contactsIconLabel),
@@ -135,8 +168,7 @@
 
     private void setupFavoritesTab() {
         Intent intent = new Intent(UI.LIST_STREQUENT_ACTION);
-        intent.setClass(this, ContactsListActivity.class);
-        StickyTabs.setTab(intent, TAB_INDEX_FAVORITES);
+        intent.setClass(this, ContactBrowserActivity.class);
 
         mTabHost.addTab(mTabHost.newTabSpec("favorites")
                 .setIndicator(getString(R.string.contactsFavoritesLabel),
@@ -145,11 +177,43 @@
     }
 
     /**
+     * Returns true if the intent is due to hitting the green send key while in a call.
+     *
+     * @param intent the intent that launched this activity
+     * @param recentCallsRequest true if the intent is requesting to view recent calls
+     * @return true if the intent is due to hitting the green send key while in a call
+     */
+    private boolean isSendKeyWhileInCall(final Intent intent, final boolean recentCallsRequest) {
+        // If there is a call in progress go to the call screen
+        if (recentCallsRequest) {
+            final boolean callKey = intent.getBooleanExtra("call_key", false);
+
+            try {
+                ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
+                if (callKey && phone != null && phone.showCallScreen()) {
+                    return true;
+                }
+            } catch (RemoteException e) {
+                Log.e(TAG, "Failed to handle send while in call", e);
+            }
+        }
+
+        return false;
+    }
+
+    /**
      * Sets the current tab based on the intent's request type
      *
      * @param intent Intent that contains information about which tab should be selected
      */
     private void setCurrentTab(Intent intent) {
+        // If we got here by hitting send and we're in call forward along to the in-call activity
+        final boolean recentCallsRequest = Calls.CONTENT_TYPE.equals(intent.getType());
+        if (isSendKeyWhileInCall(intent, recentCallsRequest)) {
+            finish();
+            return;
+        }
+
         // Dismiss menu provided by any children activities
         Activity activity = getLocalActivityManager().
                 getActivity(mTabHost.getCurrentTabTag());
@@ -161,52 +225,58 @@
         // state and instead reload their state from the parent's intent
         intent.putExtra(EXTRA_IGNORE_STATE, true);
 
+        // Remember the old manually selected tab index so that it can be restored if it is
+        // overwritten by one of the programmatic tab selections
+        final int savedTabIndex = mLastManuallySelectedTab;
+
         // Choose the tab based on the inbound intent
-        String componentName = intent.getComponent().getClassName();
-        if (getClass().getName().equals(componentName)) {
-            if (phoneIsInUse()) {
-                // We are in a call, show the dialer tab (which allows going back to the call)
-                mTabHost.setCurrentTab(TAB_INDEX_DIALER);
-            } else if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
-                // launched from history (long-press home) --> nothing to change
-            } else if (isDialIntent(intent)) {
-                // The dialer was explicitly requested
-                mTabHost.setCurrentTab(TAB_INDEX_DIALER);
-            } else if (Calls.CONTENT_TYPE.equals(intent.getType())) {
-                // After a call, show the call log
-                mTabHost.setCurrentTab(TAB_INDEX_CALL_LOG);
-            } else {
-                // Load the last tab used to make a phone call. default to the dialer in
-                // first launch
-                mTabHost.setCurrentTab(StickyTabs.loadTab(this, TAB_INDEX_DIALER));
-            }
-        } else if (FAVORITES_ENTRY_COMPONENT.equals(componentName)) {
-            mTabHost.setCurrentTab(TAB_INDEX_FAVORITES);
+        if (intent.getBooleanExtra(ContactsFrontDoor.EXTRA_FRONT_DOOR, false)) {
+            // Launched through the contacts front door, set the proper contacts tab
+            setContactsTab();
         } else {
-            // Launched as "Contacts" --> Go either to favorites or contacts, whichever is more
-            // recent
-            final SharedPreferences prefs = getSharedPreferences(StickyTabs.PREFERENCES_NAME,
-                    MODE_PRIVATE);
-            final boolean favoritesAsContacts = prefs.getBoolean(PREF_FAVORITES_AS_CONTACTS,
-                    PREF_FAVORITES_AS_CONTACTS_DEFAULT);
-            if (favoritesAsContacts) {
+            // Not launched through the front door, look at the component to determine the tab
+            String componentName = intent.getComponent().getClassName();
+            if (getClass().getName().equals(componentName)) {
+                if (recentCallsRequest) {
+                    mTabHost.setCurrentTab(TAB_INDEX_CALL_LOG);
+                } else {
+                    mTabHost.setCurrentTab(TAB_INDEX_DIALER);
+                }
+            } else if (FAVORITES_ENTRY_COMPONENT.equals(componentName)) {
                 mTabHost.setCurrentTab(TAB_INDEX_FAVORITES);
+            } else if (CONTACTS_LAUNCH_ACTIVITY.equals(componentName)) {
+                mTabHost.setCurrentTab(mLastManuallySelectedTab);
             } else {
-                mTabHost.setCurrentTab(TAB_INDEX_CONTACTS);
+                setContactsTab();
             }
         }
 
+        // Restore to the previous manual selection
+        mLastManuallySelectedTab = savedTabIndex;
+
         // Tell the children activities that they should honor their saved states
         // instead of the state from the parent's intent
         intent.putExtra(EXTRA_IGNORE_STATE, false);
     }
 
+    private void setContactsTab() {
+        SharedPreferences prefs = getSharedPreferences(PREFS_DIALTACTS, MODE_PRIVATE);
+        boolean favoritesAsContacts = prefs.getBoolean(PREF_FAVORITES_AS_CONTACTS,
+                PREF_FAVORITES_AS_CONTACTS_DEFAULT);
+        if (favoritesAsContacts) {
+            mTabHost.setCurrentTab(TAB_INDEX_FAVORITES);
+        } else {
+            mTabHost.setCurrentTab(TAB_INDEX_CONTACTS);
+        }
+    }
+
     @Override
     public void onNewIntent(Intent newIntent) {
         setIntent(newIntent);
+        fixIntent(newIntent);
         setCurrentTab(newIntent);
         final String action = newIntent.getAction();
-        if (action.equals(UI.FILTER_CONTACTS_ACTION)) {
+        if (UI.FILTER_CONTACTS_ACTION.equals(action)) {
             setupFilterText(newIntent);
         } else if (isDialIntent(newIntent)) {
             setupDialUri(newIntent);
@@ -300,7 +370,6 @@
     }
 
     /** {@inheritDoc} */
-    @Override
     public void onTabChanged(String tabId) {
         // Because we're using Activities as our tab children, we trigger
         // onWindowFocusChanged() to let them know when they're active.  This may
@@ -310,20 +379,9 @@
         if (activity != null) {
             activity.onWindowFocusChanged(true);
         }
-    }
 
-    /**
-     * @return true if the phone is "in use", meaning that at least one line
-     *              is active (ie. off hook or ringing or dialing).
-     */
-    private boolean phoneIsInUse() {
-        boolean phoneInUse = false;
-        try {
-            ITelephony phone = ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
-            if (phone != null) phoneInUse = !phone.isIdle();
-        } catch (RemoteException e) {
-            Log.w(TAG, "phone.isIdle() failed", e);
-        }
-        return phoneInUse;
+        // Remember this tab index. This function is also called, if the tab is set automatically
+        // in which case the setter (setCurrentTab) has to set this to its old value afterwards
+        mLastManuallySelectedTab = mTabHost.getCurrentTab();
     }
 }
diff --git a/src/com/android/contacts/ExportVCardActivity.java b/src/com/android/contacts/ExportVCardActivity.java
deleted file mode 100644
index ceeecfc..0000000
--- a/src/com/android/contacts/ExportVCardActivity.java
+++ /dev/null
@@ -1,458 +0,0 @@
-/*
- * Copyright (C) 2009 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.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ProgressDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.res.Resources;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.pim.vcard.VCardComposer;
-import android.pim.vcard.VCardConfig;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Class for exporting vCard.
- *
- * Note that this Activity assumes that the instance is a "one-shot Activity", which will be
- * finished (with the method {@link Activity#finish()}) after the export and never reuse
- * any Dialog in the instance. So this code is careless about the management around managed
- * dialogs stuffs (like how onCreateDialog() is used).
- */
-public class ExportVCardActivity extends Activity {
-    private static final String LOG_TAG = "ExportVCardActivity";
-
-    // If true, VCardExporter is able to emits files longer than 8.3 format.
-    private static final boolean ALLOW_LONG_FILE_NAME = false;
-    private String mTargetDirectory;
-    private String mFileNamePrefix;
-    private String mFileNameSuffix;
-    private int mFileIndexMinimum;
-    private int mFileIndexMaximum;
-    private String mFileNameExtension;
-    private String mVCardTypeStr;
-    private Set<String> mExtensionsToConsider;
-
-    private ProgressDialog mProgressDialog;
-    private String mExportingFileName;
-
-    private Handler mHandler = new Handler();
-
-    // Used temporaly when asking users to confirm the file name
-    private String mTargetFileName;
-
-    // String for storing error reason temporaly.
-    private String mErrorReason;
-
-    private ActualExportThread mActualExportThread;
-
-    private class CancelListener
-            implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
-        public void onClick(DialogInterface dialog, int which) {
-            finish();
-        }
-        public void onCancel(DialogInterface dialog) {
-            finish();
-        }
-    }
-
-    private CancelListener mCancelListener = new CancelListener();
-
-    private class ErrorReasonDisplayer implements Runnable {
-        private final int mResId;
-        public ErrorReasonDisplayer(int resId) {
-            mResId = resId;
-        }
-        public ErrorReasonDisplayer(String errorReason) {
-            mResId = R.id.dialog_fail_to_export_with_reason;
-            mErrorReason = errorReason;
-        }
-        public void run() {
-            // Show the Dialog only when the parent Activity is still alive.
-            if (!ExportVCardActivity.this.isFinishing()) {
-                showDialog(mResId);
-            }
-        }
-    }
-
-    private class ExportConfirmationListener implements DialogInterface.OnClickListener {
-        private final String mFileName;
-
-        public ExportConfirmationListener(String fileName) {
-            mFileName = fileName;
-        }
-
-        public void onClick(DialogInterface dialog, int which) {
-            if (which == DialogInterface.BUTTON_POSITIVE) {
-                mActualExportThread = new ActualExportThread(mFileName);
-                showDialog(R.id.dialog_exporting_vcard);
-            }
-        }
-    }
-
-    private class ActualExportThread extends Thread
-            implements DialogInterface.OnCancelListener {
-        private PowerManager.WakeLock mWakeLock;
-        private boolean mCanceled = false;
-
-        public ActualExportThread(String fileName) {
-            mExportingFileName = fileName;
-            PowerManager powerManager = (PowerManager)getSystemService(Context.POWER_SERVICE);
-            mWakeLock = powerManager.newWakeLock(
-                    PowerManager.SCREEN_DIM_WAKE_LOCK |
-                    PowerManager.ON_AFTER_RELEASE, LOG_TAG);
-        }
-
-        @Override
-        public void run() {
-            boolean shouldCallFinish = true;
-            mWakeLock.acquire();
-            VCardComposer composer = null;
-            try {
-                OutputStream outputStream = null;
-                try {
-                    outputStream = new FileOutputStream(mExportingFileName);
-                } catch (FileNotFoundException e) {
-                    final String errorReason =
-                        getString(R.string.fail_reason_could_not_open_file,
-                                mExportingFileName, e.getMessage());
-                    shouldCallFinish = false;
-                    mHandler.post(new ErrorReasonDisplayer(errorReason));
-                    return;
-                }
-
-                // composer = new VCardComposer(ExportVCardActivity.this, mVCardTypeStr, true);
-                int vcardType = VCardConfig.VCARD_TYPE_V30_GENERIC;
-                composer = new VCardComposer(ExportVCardActivity.this, vcardType, true);
-
-                composer.addHandler(composer.new HandlerForOutputStream(outputStream));
-
-                if (!composer.init()) {
-                    final String errorReason = composer.getErrorReason();
-                    Log.e(LOG_TAG, "initialization of vCard composer failed: " + errorReason);
-                    final String translatedErrorReason =
-                            translateComposerError(errorReason);
-                    mHandler.post(new ErrorReasonDisplayer(
-                            getString(R.string.fail_reason_could_not_initialize_exporter,
-                                    translatedErrorReason)));
-                    shouldCallFinish = false;
-                    return;
-                }
-
-                int size = composer.getCount();
-
-                if (size == 0) {
-                    mHandler.post(new ErrorReasonDisplayer(
-                            getString(R.string.fail_reason_no_exportable_contact)));
-                    shouldCallFinish = false;
-                    return;
-                }
-
-                mProgressDialog.setProgressNumberFormat(
-                        getString(R.string.exporting_contact_list_progress));
-                mProgressDialog.setMax(size);
-                mProgressDialog.setProgress(0);
-
-                while (!composer.isAfterLast()) {
-                    if (mCanceled) {
-                        return;
-                    }
-                    if (!composer.createOneEntry()) {
-                        final String errorReason = composer.getErrorReason();
-                        Log.e(LOG_TAG, "Failed to read a contact: " + errorReason);
-                        final String translatedErrorReason =
-                            translateComposerError(errorReason);
-                        mHandler.post(new ErrorReasonDisplayer(
-                                getString(R.string.fail_reason_error_occurred_during_export,
-                                        translatedErrorReason)));
-                        shouldCallFinish = false;
-                        return;
-                    }
-                    mProgressDialog.incrementProgressBy(1);
-                }
-            } finally {
-                if (composer != null) {
-                    composer.terminate();
-                }
-                mWakeLock.release();
-                mProgressDialog.dismiss();
-                if (shouldCallFinish && !isFinishing()) {
-                    finish();
-                }
-            }
-        }
-
-        @Override
-        public void finalize() {
-            if (mWakeLock != null && mWakeLock.isHeld()) {
-                mWakeLock.release();
-            }
-        }
-
-        public void cancel() {
-            mCanceled = true;
-        }
-
-        public void onCancel(DialogInterface dialog) {
-            cancel();
-        }
-    }
-
-    private String translateComposerError(String errorMessage) {
-        Resources resources = getResources();
-        if (VCardComposer.FAILURE_REASON_FAILED_TO_GET_DATABASE_INFO.equals(errorMessage)) {
-            return resources.getString(R.string.composer_failed_to_get_database_infomation);
-        } else if (VCardComposer.FAILURE_REASON_NO_ENTRY.equals(errorMessage)) {
-            return resources.getString(R.string.composer_has_no_exportable_contact);
-        } else if (VCardComposer.FAILURE_REASON_NOT_INITIALIZED.equals(errorMessage)) {
-            return resources.getString(R.string.composer_not_initialized);
-        } else {
-            return errorMessage;
-        }
-    }
-
-    @Override
-    protected void onCreate(Bundle bundle) {
-        super.onCreate(bundle);
-
-        mTargetDirectory = getString(R.string.config_export_dir);
-        mFileNamePrefix = getString(R.string.config_export_file_prefix);
-        mFileNameSuffix = getString(R.string.config_export_file_suffix);
-        mFileNameExtension = getString(R.string.config_export_file_extension);
-        mVCardTypeStr = getString(R.string.config_export_vcard_type);
-
-        mExtensionsToConsider = new HashSet<String>();
-        mExtensionsToConsider.add(mFileNameExtension);
-
-        final String additionalExtensions =
-            getString(R.string.config_export_extensions_to_consider);
-        if (!TextUtils.isEmpty(additionalExtensions)) {
-            for (String extension : additionalExtensions.split(",")) {
-                String trimed = extension.trim();
-                if (trimed.length() > 0) {
-                    mExtensionsToConsider.add(trimed);
-                }
-            }
-        }
-
-        final Resources resources = getResources();
-        mFileIndexMinimum = resources.getInteger(R.integer.config_export_file_min_index);
-        mFileIndexMaximum = resources.getInteger(R.integer.config_export_file_max_index);
-
-        startExportVCardToSdCard();
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int id) {
-        switch (id) {
-            case R.id.dialog_export_confirmation: {
-                return getExportConfirmationDialog();
-            }
-            case R.string.fail_reason_too_many_vcard: {
-                return new AlertDialog.Builder(this)
-                    .setTitle(R.string.exporting_contact_failed_title)
-                    .setMessage(getString(R.string.exporting_contact_failed_message,
-                                getString(R.string.fail_reason_too_many_vcard)))
-                                .setPositiveButton(android.R.string.ok, mCancelListener)
-                                .create();
-            }
-            case R.id.dialog_fail_to_export_with_reason: {
-                return getErrorDialogWithReason();
-            }
-            case R.id.dialog_sdcard_not_found: {
-                AlertDialog.Builder builder = new AlertDialog.Builder(this)
-                .setTitle(R.string.no_sdcard_title)
-                .setIcon(android.R.drawable.ic_dialog_alert)
-                .setMessage(R.string.no_sdcard_message)
-                .setPositiveButton(android.R.string.ok, mCancelListener);
-                return builder.create();
-            }
-            case R.id.dialog_exporting_vcard: {
-                if (mProgressDialog == null) {
-                    String title = getString(R.string.exporting_contact_list_title);
-                    String message = getString(R.string.exporting_contact_list_message,
-                            mExportingFileName);
-                    mProgressDialog = new ProgressDialog(ExportVCardActivity.this);
-                    mProgressDialog.setTitle(title);
-                    mProgressDialog.setMessage(message);
-                    mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
-                    mProgressDialog.setOnCancelListener(mActualExportThread);
-                    mActualExportThread.start();
-                }
-                return mProgressDialog;
-            }
-        }
-        return super.onCreateDialog(id);
-    }
-
-    @Override
-    protected void onPrepareDialog(int id, Dialog dialog) {
-        if (id == R.id.dialog_fail_to_export_with_reason) {
-            ((AlertDialog)dialog).setMessage(getErrorReason());
-        } else if (id == R.id.dialog_export_confirmation) {
-            ((AlertDialog)dialog).setMessage(
-                    getString(R.string.confirm_export_message, mTargetFileName));
-        } else {
-            super.onPrepareDialog(id, dialog);
-        }
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        if (mActualExportThread != null) {
-            // The Activity is no longer visible. Stop the thread.
-            mActualExportThread.cancel();
-            mActualExportThread = null;
-        }
-
-        if (!isFinishing()) {
-            finish();
-        }
-    }
-
-    /**
-     * Tries to start exporting VCard. If there's no SDCard available,
-     * an error dialog is shown.
-     */
-    public void startExportVCardToSdCard() {
-        File targetDirectory = new File(mTargetDirectory);
-
-        if (!(targetDirectory.exists() &&
-                targetDirectory.isDirectory() &&
-                targetDirectory.canRead()) &&
-                !targetDirectory.mkdirs()) {
-            showDialog(R.id.dialog_sdcard_not_found);
-        } else {
-            mTargetFileName = getAppropriateFileName(mTargetDirectory);
-            if (TextUtils.isEmpty(mTargetFileName)) {
-                mTargetFileName = null;
-                // finish() is called via the error dialog. Do not call the method here.
-                return;
-            }
-
-            showDialog(R.id.dialog_export_confirmation);
-        }
-    }
-
-    /**
-     * Tries to get an appropriate filename. Returns null if it fails.
-     */
-    private String getAppropriateFileName(final String destDirectory) {
-        int fileNumberStringLength = 0;
-        {
-            // Calling Math.Log10() is costly.
-            int tmp;
-            for (fileNumberStringLength = 0, tmp = mFileIndexMaximum; tmp > 0;
-                fileNumberStringLength++, tmp /= 10) {
-            }
-        }
-        String bodyFormat = "%s%0" + fileNumberStringLength + "d%s";
-
-        if (!ALLOW_LONG_FILE_NAME) {
-            String possibleBody = String.format(bodyFormat,mFileNamePrefix, 1, mFileNameSuffix);
-            if (possibleBody.length() > 8 || mFileNameExtension.length() > 3) {
-                Log.e(LOG_TAG, "This code does not allow any long file name.");
-                mErrorReason = getString(R.string.fail_reason_too_long_filename,
-                        String.format("%s.%s", possibleBody, mFileNameExtension));
-                showDialog(R.id.dialog_fail_to_export_with_reason);
-                // finish() is called via the error dialog. Do not call the method here.
-                return null;
-            }
-        }
-
-        // Note that this logic assumes that the target directory is case insensitive.
-        // As of 2009-07-16, it is true since the external storage is only sdcard, and
-        // it is formated as FAT/VFAT.
-        // TODO: fix this.
-        for (int i = mFileIndexMinimum; i <= mFileIndexMaximum; i++) {
-            boolean numberIsAvailable = true;
-            // SD Association's specification seems to require this feature, though we cannot
-            // have the specification since it is proprietary...
-            String body = null;
-            for (String possibleExtension : mExtensionsToConsider) {
-                body = String.format(bodyFormat, mFileNamePrefix, i, mFileNameSuffix);
-                File file = new File(String.format("%s/%s.%s",
-                        destDirectory, body, possibleExtension));
-                if (file.exists()) {
-                    numberIsAvailable = false;
-                    break;
-                }
-            }
-            if (numberIsAvailable) {
-                return String.format("%s/%s.%s", destDirectory, body, mFileNameExtension);
-            }
-        }
-        showDialog(R.string.fail_reason_too_many_vcard);
-        return null;
-    }
-
-    public Dialog getExportConfirmationDialog() {
-        if (TextUtils.isEmpty(mTargetFileName)) {
-            Log.e(LOG_TAG, "Target file name is empty, which must not be!");
-            // This situation is not acceptable (probably a bug!), but we don't have no reason to
-            // show...
-            mErrorReason = null;
-            return getErrorDialogWithReason();
-        }
-
-        return new AlertDialog.Builder(this)
-            .setTitle(R.string.confirm_export_title)
-            .setMessage(getString(R.string.confirm_export_message, mTargetFileName))
-            .setPositiveButton(android.R.string.ok,
-                    new ExportConfirmationListener(mTargetFileName))
-            .setNegativeButton(android.R.string.cancel, mCancelListener)
-            .setOnCancelListener(mCancelListener)
-            .create();
-    }
-
-    public Dialog getErrorDialogWithReason() {
-        if (mErrorReason == null) {
-            Log.e(LOG_TAG, "Error reason must have been set.");
-            mErrorReason = getString(R.string.fail_reason_unknown);
-        }
-        return new AlertDialog.Builder(this)
-            .setTitle(R.string.exporting_contact_failed_title)
-                .setMessage(getString(R.string.exporting_contact_failed_message, mErrorReason))
-            .setPositiveButton(android.R.string.ok, mCancelListener)
-            .setOnCancelListener(mCancelListener)
-            .create();
-    }
-
-    public void cancelExport() {
-        if (mActualExportThread != null) {
-            mActualExportThread.cancel();
-            mActualExportThread = null;
-        }
-    }
-
-    public String getErrorReason() {
-        return mErrorReason;
-    }
-}
\ No newline at end of file
diff --git a/src/com/android/contacts/GroupingListAdapter.java b/src/com/android/contacts/GroupingListAdapter.java
deleted file mode 100644
index 5937a6d..0000000
--- a/src/com/android/contacts/GroupingListAdapter.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/*
- * 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;
-
-import com.android.internal.util.ArrayUtils;
-
-import android.content.Context;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.database.DataSetObserver;
-import android.os.Handler;
-import android.util.SparseIntArray;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-
-/**
- * Maintains a list that groups adjacent items sharing the same value of
- * a "group-by" field.  The list has three types of elements: stand-alone, group header and group
- * child. Groups are collapsible and collapsed by default.
- */
-public abstract class GroupingListAdapter extends BaseAdapter {
-
-    private static final int GROUP_METADATA_ARRAY_INITIAL_SIZE = 16;
-    private static final int GROUP_METADATA_ARRAY_INCREMENT = 128;
-    private static final long GROUP_OFFSET_MASK    = 0x00000000FFFFFFFFL;
-    private static final long GROUP_SIZE_MASK     = 0x7FFFFFFF00000000L;
-    private static final long EXPANDED_GROUP_MASK = 0x8000000000000000L;
-
-    public static final int ITEM_TYPE_STANDALONE = 0;
-    public static final int ITEM_TYPE_GROUP_HEADER = 1;
-    public static final int ITEM_TYPE_IN_GROUP = 2;
-
-    /**
-     * Information about a specific list item: is it a group, if so is it expanded.
-     * Otherwise, is it a stand-alone item or a group member.
-     */
-    protected static class PositionMetadata {
-        int itemType;
-        boolean isExpanded;
-        int cursorPosition;
-        int childCount;
-        private int groupPosition;
-        private int listPosition = -1;
-    }
-
-    private Context mContext;
-    private Cursor mCursor;
-
-    /**
-     * Count of list items.
-     */
-    private int mCount;
-
-    private int mRowIdColumnIndex;
-
-    /**
-     * Count of groups in the list.
-     */
-    private int mGroupCount;
-
-    /**
-     * Information about where these groups are located in the list, how large they are
-     * and whether they are expanded.
-     */
-    private long[] mGroupMetadata;
-
-    private SparseIntArray mPositionCache = new SparseIntArray();
-    private int mLastCachedListPosition;
-    private int mLastCachedCursorPosition;
-    private int mLastCachedGroup;
-
-    /**
-     * A reusable temporary instance of PositionMetadata
-     */
-    private PositionMetadata mPositionMetadata = new PositionMetadata();
-
-    protected ContentObserver mChangeObserver = new ContentObserver(new Handler()) {
-
-        @Override
-        public boolean deliverSelfNotifications() {
-            return true;
-        }
-
-        @Override
-        public void onChange(boolean selfChange) {
-            onContentChanged();
-        }
-    };
-
-    protected DataSetObserver mDataSetObserver = new DataSetObserver() {
-
-        @Override
-        public void onChanged() {
-            notifyDataSetChanged();
-        }
-
-        @Override
-        public void onInvalidated() {
-            notifyDataSetInvalidated();
-        }
-    };
-
-    public GroupingListAdapter(Context context) {
-        mContext = context;
-        resetCache();
-    }
-
-    /**
-     * Finds all groups of adjacent items in the cursor and calls {@link #addGroup} for
-     * each of them.
-     */
-    protected abstract void addGroups(Cursor cursor);
-
-    protected abstract View newStandAloneView(Context context, ViewGroup parent);
-    protected abstract void bindStandAloneView(View view, Context context, Cursor cursor);
-
-    protected abstract View newGroupView(Context context, ViewGroup parent);
-    protected abstract void bindGroupView(View view, Context context, Cursor cursor, int groupSize,
-            boolean expanded);
-
-    protected abstract View newChildView(Context context, ViewGroup parent);
-    protected abstract void bindChildView(View view, Context context, Cursor cursor);
-
-    /**
-     * Cache should be reset whenever the cursor changes or groups are expanded or collapsed.
-     */
-    private void resetCache() {
-        mCount = -1;
-        mLastCachedListPosition = -1;
-        mLastCachedCursorPosition = -1;
-        mLastCachedGroup = -1;
-        mPositionMetadata.listPosition = -1;
-        mPositionCache.clear();
-    }
-
-    protected void onContentChanged() {
-    }
-
-    public void changeCursor(Cursor cursor) {
-        if (cursor == mCursor) {
-            return;
-        }
-
-        if (mCursor != null) {
-            mCursor.unregisterContentObserver(mChangeObserver);
-            mCursor.unregisterDataSetObserver(mDataSetObserver);
-            mCursor.close();
-        }
-        mCursor = cursor;
-        resetCache();
-        findGroups();
-
-        if (cursor != null) {
-            cursor.registerContentObserver(mChangeObserver);
-            cursor.registerDataSetObserver(mDataSetObserver);
-            mRowIdColumnIndex = cursor.getColumnIndexOrThrow("_id");
-            notifyDataSetChanged();
-        } else {
-            // notify the observers about the lack of a data set
-            notifyDataSetInvalidated();
-        }
-
-    }
-
-    public Cursor getCursor() {
-        return mCursor;
-    }
-
-    /**
-     * Scans over the entire cursor looking for duplicate phone numbers that need
-     * to be collapsed.
-     */
-    private void findGroups() {
-        mGroupCount = 0;
-        mGroupMetadata = new long[GROUP_METADATA_ARRAY_INITIAL_SIZE];
-
-        if (mCursor == null) {
-            return;
-        }
-
-        addGroups(mCursor);
-    }
-
-    /**
-     * Records information about grouping in the list.  Should be called by the overridden
-     * {@link #addGroups} method.
-     */
-    protected void addGroup(int cursorPosition, int size, boolean expanded) {
-        if (mGroupCount >= mGroupMetadata.length) {
-            int newSize = ArrayUtils.idealLongArraySize(
-                    mGroupMetadata.length + GROUP_METADATA_ARRAY_INCREMENT);
-            long[] array = new long[newSize];
-            System.arraycopy(mGroupMetadata, 0, array, 0, mGroupCount);
-            mGroupMetadata = array;
-        }
-
-        long metadata = ((long)size << 32) | cursorPosition;
-        if (expanded) {
-            metadata |= EXPANDED_GROUP_MASK;
-        }
-        mGroupMetadata[mGroupCount++] = metadata;
-    }
-
-    public int getCount() {
-        if (mCursor == null) {
-            return 0;
-        }
-
-        if (mCount != -1) {
-            return mCount;
-        }
-
-        int cursorPosition = 0;
-        int count = 0;
-        for (int i = 0; i < mGroupCount; i++) {
-            long metadata = mGroupMetadata[i];
-            int offset = (int)(metadata & GROUP_OFFSET_MASK);
-            boolean expanded = (metadata & EXPANDED_GROUP_MASK) != 0;
-            int size = (int)((metadata & GROUP_SIZE_MASK) >> 32);
-
-            count += (offset - cursorPosition);
-
-            if (expanded) {
-                count += size + 1;
-            } else {
-                count++;
-            }
-
-            cursorPosition = offset + size;
-        }
-
-        mCount = count + mCursor.getCount() - cursorPosition;
-        return mCount;
-    }
-
-    /**
-     * Figures out whether the item at the specified position represents a
-     * stand-alone element, a group or a group child. Also computes the
-     * corresponding cursor position.
-     */
-    public void obtainPositionMetadata(PositionMetadata metadata, int position) {
-
-        // If the description object already contains requested information, just return
-        if (metadata.listPosition == position) {
-            return;
-        }
-
-        int listPosition = 0;
-        int cursorPosition = 0;
-        int firstGroupToCheck = 0;
-
-        // Check cache for the supplied position.  What we are looking for is
-        // the group descriptor immediately preceding the supplied position.
-        // Once we have that, we will be able to tell whether the position
-        // is the header of the group, a member of the group or a standalone item.
-        if (mLastCachedListPosition != -1) {
-            if (position <= mLastCachedListPosition) {
-
-                // Have SparceIntArray do a binary search for us.
-                int index = mPositionCache.indexOfKey(position);
-
-                // If we get back a positive number, the position corresponds to
-                // a group header.
-                if (index < 0) {
-
-                    // We had a cache miss, but we did obtain valuable information anyway.
-                    // The negative number will allow us to compute the location of
-                    // the group header immediately preceding the supplied position.
-                    index = ~index - 1;
-
-                    if (index >= mPositionCache.size()) {
-                        index--;
-                    }
-                }
-
-                // A non-negative index gives us the position of the group header
-                // corresponding or preceding the position, so we can
-                // search for the group information at the supplied position
-                // starting with the cached group we just found
-                if (index >= 0) {
-                    listPosition = mPositionCache.keyAt(index);
-                    firstGroupToCheck = mPositionCache.valueAt(index);
-                    long descriptor = mGroupMetadata[firstGroupToCheck];
-                    cursorPosition = (int)(descriptor & GROUP_OFFSET_MASK);
-                }
-            } else {
-
-                // If we haven't examined groups beyond the supplied position,
-                // we will start where we left off previously
-                firstGroupToCheck = mLastCachedGroup;
-                listPosition = mLastCachedListPosition;
-                cursorPosition = mLastCachedCursorPosition;
-            }
-        }
-
-        for (int i = firstGroupToCheck; i < mGroupCount; i++) {
-            long group = mGroupMetadata[i];
-            int offset = (int)(group & GROUP_OFFSET_MASK);
-
-            // Move pointers to the beginning of the group
-            listPosition += (offset - cursorPosition);
-            cursorPosition = offset;
-
-            if (i > mLastCachedGroup) {
-                mPositionCache.append(listPosition, i);
-                mLastCachedListPosition = listPosition;
-                mLastCachedCursorPosition = cursorPosition;
-                mLastCachedGroup = i;
-            }
-
-            // Now we have several possibilities:
-            // A) The requested position precedes the group
-            if (position < listPosition) {
-                metadata.itemType = ITEM_TYPE_STANDALONE;
-                metadata.cursorPosition = cursorPosition - (listPosition - position);
-                return;
-            }
-
-            boolean expanded = (group & EXPANDED_GROUP_MASK) != 0;
-            int size = (int) ((group & GROUP_SIZE_MASK) >> 32);
-
-            // B) The requested position is a group header
-            if (position == listPosition) {
-                metadata.itemType = ITEM_TYPE_GROUP_HEADER;
-                metadata.groupPosition = i;
-                metadata.isExpanded = expanded;
-                metadata.childCount = size;
-                metadata.cursorPosition = offset;
-                return;
-            }
-
-            if (expanded) {
-                // C) The requested position is an element in the expanded group
-                if (position < listPosition + size + 1) {
-                    metadata.itemType = ITEM_TYPE_IN_GROUP;
-                    metadata.cursorPosition = cursorPosition + (position - listPosition) - 1;
-                    return;
-                }
-
-                // D) The element is past the expanded group
-                listPosition += size + 1;
-            } else {
-
-                // E) The element is past the collapsed group
-                listPosition++;
-            }
-
-            // Move cursor past the group
-            cursorPosition += size;
-        }
-
-        // The required item is past the last group
-        metadata.itemType = ITEM_TYPE_STANDALONE;
-        metadata.cursorPosition = cursorPosition + (position - listPosition);
-    }
-
-    /**
-     * Returns true if the specified position in the list corresponds to a
-     * group header.
-     */
-    public boolean isGroupHeader(int position) {
-        obtainPositionMetadata(mPositionMetadata, position);
-        return mPositionMetadata.itemType == ITEM_TYPE_GROUP_HEADER;
-    }
-
-    /**
-     * Given a position of a groups header in the list, returns the size of
-     * the corresponding group.
-     */
-    public int getGroupSize(int position) {
-        obtainPositionMetadata(mPositionMetadata, position);
-        return mPositionMetadata.childCount;
-    }
-
-    /**
-     * Mark group as expanded if it is collapsed and vice versa.
-     */
-    public void toggleGroup(int position) {
-        obtainPositionMetadata(mPositionMetadata, position);
-        if (mPositionMetadata.itemType != ITEM_TYPE_GROUP_HEADER) {
-            throw new IllegalArgumentException("Not a group at position " + position);
-        }
-
-
-        if (mPositionMetadata.isExpanded) {
-            mGroupMetadata[mPositionMetadata.groupPosition] &= ~EXPANDED_GROUP_MASK;
-        } else {
-            mGroupMetadata[mPositionMetadata.groupPosition] |= EXPANDED_GROUP_MASK;
-        }
-        resetCache();
-        notifyDataSetChanged();
-    }
-
-    @Override
-    public int getViewTypeCount() {
-        return 3;
-    }
-
-    @Override
-    public int getItemViewType(int position) {
-        obtainPositionMetadata(mPositionMetadata, position);
-        return mPositionMetadata.itemType;
-    }
-
-    public Object getItem(int position) {
-        if (mCursor == null) {
-            return null;
-        }
-
-        obtainPositionMetadata(mPositionMetadata, position);
-        if (mCursor.moveToPosition(mPositionMetadata.cursorPosition)) {
-            return mCursor;
-        } else {
-            return null;
-        }
-    }
-
-    public long getItemId(int position) {
-        Object item = getItem(position);
-        if (item != null) {
-            return mCursor.getLong(mRowIdColumnIndex);
-        } else {
-            return -1;
-        }
-    }
-
-    public View getView(int position, View convertView, ViewGroup parent) {
-        obtainPositionMetadata(mPositionMetadata, position);
-        View view = convertView;
-        if (view == null) {
-            switch (mPositionMetadata.itemType) {
-                case ITEM_TYPE_STANDALONE:
-                    view = newStandAloneView(mContext, parent);
-                    break;
-                case ITEM_TYPE_GROUP_HEADER:
-                    view = newGroupView(mContext, parent);
-                    break;
-                case ITEM_TYPE_IN_GROUP:
-                    view = newChildView(mContext, parent);
-                    break;
-            }
-        }
-
-        mCursor.moveToPosition(mPositionMetadata.cursorPosition);
-        switch (mPositionMetadata.itemType) {
-            case ITEM_TYPE_STANDALONE:
-                bindStandAloneView(view, mContext, mCursor);
-                break;
-            case ITEM_TYPE_GROUP_HEADER:
-                bindGroupView(view, mContext, mCursor, mPositionMetadata.childCount,
-                        mPositionMetadata.isExpanded);
-                break;
-            case ITEM_TYPE_IN_GROUP:
-                bindChildView(view, mContext, mCursor);
-                break;
-
-        }
-        return view;
-    }
-}
diff --git a/src/com/android/contacts/ImportVCardActivity.java b/src/com/android/contacts/ImportVCardActivity.java
deleted file mode 100644
index 46cdf32..0000000
--- a/src/com/android/contacts/ImportVCardActivity.java
+++ /dev/null
@@ -1,1002 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.contacts.model.Sources;
-import com.android.contacts.util.AccountSelectionUtil;
-
-import android.accounts.Account;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ProgressDialog;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnCancelListener;
-import android.content.DialogInterface.OnClickListener;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Environment;
-import android.os.Handler;
-import android.os.PowerManager;
-import android.pim.vcard.VCardConfig;
-import android.pim.vcard.VCardEntryCommitter;
-import android.pim.vcard.VCardEntryConstructor;
-import android.pim.vcard.VCardEntryCounter;
-import android.pim.vcard.VCardInterpreter;
-import android.pim.vcard.VCardInterpreterCollection;
-import android.pim.vcard.VCardParser;
-import android.pim.vcard.VCardParser_V21;
-import android.pim.vcard.VCardParser_V30;
-import android.pim.vcard.VCardSourceDetector;
-import android.pim.vcard.exception.VCardException;
-import android.pim.vcard.exception.VCardNestedException;
-import android.pim.vcard.exception.VCardNotSupportedException;
-import android.pim.vcard.exception.VCardVersionException;
-import android.provider.ContactsContract.RawContacts;
-import android.text.SpannableStringBuilder;
-import android.text.Spanned;
-import android.text.TextUtils;
-import android.text.style.RelativeSizeSpan;
-import android.util.Log;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Set;
-import java.util.Vector;
-
-class VCardFile {
-    private String mName;
-    private String mCanonicalPath;
-    private long mLastModified;
-
-    public VCardFile(String name, String canonicalPath, long lastModified) {
-        mName = name;
-        mCanonicalPath = canonicalPath;
-        mLastModified = lastModified;
-    }
-
-    public String getName() {
-        return mName;
-    }
-
-    public String getCanonicalPath() {
-        return mCanonicalPath;
-    }
-
-    public long getLastModified() {
-        return mLastModified;
-    }
-}
-
-/**
- * Class for importing vCard. Several user interaction will be required while reading
- * (selecting a file, waiting a moment, etc.)
- *
- * Note that this Activity assumes that the instance is a "one-shot Activity", which will be
- * finished (with the method {@link Activity#finish()}) after the import and never reuse
- * any Dialog in the instance. So this code is careless about the management around managed
- * dialogs stuffs (like how onCreateDialog() is used).
- */
-public class ImportVCardActivity extends Activity {
-    private static final String LOG_TAG = "ImportVCardActivity";
-    private static final boolean DO_PERFORMANCE_PROFILE = false;
-
-    private final static int VCARD_VERSION_V21 = 1;
-    private final static int VCARD_VERSION_V30 = 2;
-    private final static int VCARD_VERSION_V40 = 3;
-
-    // Run on the UI thread. Must not be null except after onDestroy().
-    private Handler mHandler = new Handler();
-
-    private AccountSelectionUtil.AccountSelectedListener mAccountSelectionListener;
-    private Account mAccount;
-
-    private ProgressDialog mProgressDialogForScanVCard;
-
-    private List<VCardFile> mAllVCardFileList;
-    private VCardScanThread mVCardScanThread;
-    private VCardReadThread mVCardReadThread;
-    private ProgressDialog mProgressDialogForReadVCard;
-
-    private String mErrorMessage;
-
-    private boolean mNeedReview = false;
-
-    // Runs on the UI thread.
-    private class DialogDisplayer implements Runnable {
-        private final int mResId;
-        public DialogDisplayer(int resId) {
-            mResId = resId;
-        }
-        public DialogDisplayer(String errorMessage) {
-            mResId = R.id.dialog_error_with_message;
-            mErrorMessage = errorMessage;
-        }
-        public void run() {
-            showDialog(mResId);
-        }
-    }
-
-    private class CancelListener
-        implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
-        public void onClick(DialogInterface dialog, int which) {
-            finish();
-        }
-
-        public void onCancel(DialogInterface dialog) {
-            finish();
-        }
-    }
-
-    private CancelListener mCancelListener = new CancelListener();
-
-    private class VCardReadThread extends Thread
-            implements DialogInterface.OnCancelListener {
-        private ContentResolver mResolver;
-        private VCardParser mVCardParser;
-        private boolean mCanceled;
-        private PowerManager.WakeLock mWakeLock;
-        private Uri mUri;
-        private File mTempFile;
-
-        private List<VCardFile> mSelectedVCardFileList;
-        private List<String> mErrorFileNameList;
-
-        public VCardReadThread(Uri uri) {
-            mUri = uri;
-            init();
-        }
-
-        public VCardReadThread(final List<VCardFile> selectedVCardFileList) {
-            mSelectedVCardFileList = selectedVCardFileList;
-            mErrorFileNameList = new ArrayList<String>();
-            init();
-        }
-
-        private void init() {
-            Context context = ImportVCardActivity.this;
-            mResolver = context.getContentResolver();
-            PowerManager powerManager = (PowerManager)context.getSystemService(
-                    Context.POWER_SERVICE);
-            mWakeLock = powerManager.newWakeLock(
-                    PowerManager.SCREEN_DIM_WAKE_LOCK |
-                    PowerManager.ON_AFTER_RELEASE, LOG_TAG);
-        }
-
-        @Override
-        public void finalize() {
-            if (mWakeLock != null && mWakeLock.isHeld()) {
-                mWakeLock.release();
-            }
-        }
-
-        @Override
-        public void run() {
-            boolean shouldCallFinish = true;
-            mWakeLock.acquire();
-            Uri createdUri = null;
-            mTempFile = null;
-            // Some malicious vCard data may make this thread broken
-            // (e.g. OutOfMemoryError).
-            // Even in such cases, some should be done.
-            try {
-                if (mUri != null) {  // Read one vCard expressed by mUri
-                    final Uri targetUri = mUri;
-                    mProgressDialogForReadVCard.setProgressNumberFormat("");
-                    mProgressDialogForReadVCard.setProgress(0);
-
-                    // Count the number of VCard entries
-                    mProgressDialogForReadVCard.setIndeterminate(true);
-                    long start;
-                    if (DO_PERFORMANCE_PROFILE) {
-                        start = System.currentTimeMillis();
-                    }
-                    final VCardEntryCounter counter = new VCardEntryCounter();
-                    final VCardSourceDetector detector = new VCardSourceDetector();
-                    final VCardInterpreterCollection builderCollection =
-                            new VCardInterpreterCollection(Arrays.asList(counter, detector));
-                    boolean result;
-                    try {
-                        // We don't know which type should be useld to parse the Uri.
-                        // It is possble to misinterpret the vCard, but we expect the parser
-                        // lets VCardSourceDetector detect the type before the misinterpretation.
-                        result = readOneVCardFile(targetUri, VCardConfig.VCARD_TYPE_UNKNOWN,
-                                builderCollection, true, null);
-                    } catch (VCardNestedException e) {
-                        try {
-                            final int estimatedVCardType = detector.getEstimatedType();
-                            final String estimatedCharset = detector.getEstimatedCharset();
-                            // Assume that VCardSourceDetector was able to detect the source.
-                            // Try again with the detector.
-                            result = readOneVCardFile(targetUri, estimatedVCardType,
-                                    counter, false, null);
-                        } catch (VCardNestedException e2) {
-                            result = false;
-                            Log.e(LOG_TAG, "Must not reach here. " + e2);
-                        }
-                    }
-                    if (DO_PERFORMANCE_PROFILE) {
-                        long time = System.currentTimeMillis() - start;
-                        Log.d(LOG_TAG, "time for counting the number of vCard entries: " +
-                                time + " ms");
-                    }
-                    if (!result) {
-                        shouldCallFinish = false;
-                        return;
-                    }
-
-                    mProgressDialogForReadVCard.setProgressNumberFormat(
-                            getString(R.string.reading_vcard_contacts));
-                    mProgressDialogForReadVCard.setIndeterminate(false);
-                    mProgressDialogForReadVCard.setMax(counter.getCount());
-                    String charset = detector.getEstimatedCharset();
-                    createdUri = doActuallyReadOneVCard(targetUri, mAccount, true, detector,
-                            mErrorFileNameList);
-                } else {  // Read multiple files.
-                    mProgressDialogForReadVCard.setProgressNumberFormat(
-                            getString(R.string.reading_vcard_files));
-                    mProgressDialogForReadVCard.setMax(mSelectedVCardFileList.size());
-                    mProgressDialogForReadVCard.setProgress(0);
-
-                    for (VCardFile vcardFile : mSelectedVCardFileList) {
-                        if (mCanceled) {
-                            return;
-                        }
-                        // TODO: detect scheme!
-                        final Uri targetUri = Uri.parse("file://" + vcardFile.getCanonicalPath());
-                        VCardSourceDetector detector = new VCardSourceDetector();
-                        try {
-                            if (!readOneVCardFile(targetUri, VCardConfig.VCARD_TYPE_UNKNOWN,
-                                    detector, true, mErrorFileNameList)) {
-                                continue;
-                            }
-                        } catch (VCardNestedException e) {
-                            // Assume that VCardSourceDetector was able to detect the source.
-                        }
-                        String charset = detector.getEstimatedCharset();
-                        doActuallyReadOneVCard(targetUri, mAccount,
-                                false, detector, mErrorFileNameList);
-                        mProgressDialogForReadVCard.incrementProgressBy(1);
-                    }
-                }
-            } finally {
-                mWakeLock.release();
-                mProgressDialogForReadVCard.dismiss();
-                if (mTempFile != null) {
-                    if (!mTempFile.delete()) {
-                        Log.w(LOG_TAG, "Failed to delete a cache file.");
-                    }
-                    mTempFile = null;
-                }
-                // finish() is called via mCancelListener, which is used in DialogDisplayer.
-                if (shouldCallFinish && !isFinishing()) {
-                    if (mErrorFileNameList == null || mErrorFileNameList.isEmpty()) {
-                        finish();
-                        if (mNeedReview) {
-                            mNeedReview = false;
-                            Log.v("importVCardActivity", "Prepare to review the imported contact");
-
-                            if (createdUri != null) {
-                                // get contact_id of this raw_contact
-                                final long rawContactId = ContentUris.parseId(createdUri);
-                                Uri contactUri = RawContacts.getContactLookupUri(
-                                        getContentResolver(), ContentUris.withAppendedId(
-                                                RawContacts.CONTENT_URI, rawContactId));
-
-                                Intent viewIntent = new Intent(Intent.ACTION_VIEW, contactUri);
-                                startActivity(viewIntent);
-                            }
-                        }
-                    } else {
-                        StringBuilder builder = new StringBuilder();
-                        boolean first = true;
-                        for (String fileName : mErrorFileNameList) {
-                            if (first) {
-                                first = false;
-                            } else {
-                                builder.append(", ");
-                            }
-                            builder.append(fileName);
-                        }
-
-                        runOnUIThread(new DialogDisplayer(
-                                getString(R.string.fail_reason_failed_to_read_files,
-                                        builder.toString())));
-                    }
-                }
-            }
-        }
-
-        private Uri doActuallyReadOneVCard(Uri uri, Account account,
-                boolean showEntryParseProgress,
-                VCardSourceDetector detector, List<String> errorFileNameList) {
-            final Context context = ImportVCardActivity.this;
-            int vcardType = detector.getEstimatedType();
-            if (vcardType == VCardConfig.VCARD_TYPE_UNKNOWN) {
-                vcardType = VCardConfig.getVCardTypeFromString(
-                        context.getString(R.string.config_import_vcard_type));
-            }
-            final String estimatedCharset = detector.getEstimatedCharset();
-            final String currentLanguage = Locale.getDefault().getLanguage();
-            VCardEntryConstructor builder;
-            builder = new VCardEntryConstructor(vcardType, mAccount, estimatedCharset);
-            final VCardEntryCommitter committer = new VCardEntryCommitter(mResolver);
-            builder.addEntryHandler(committer);
-            if (showEntryParseProgress) {
-                builder.addEntryHandler(new ProgressShower(mProgressDialogForReadVCard,
-                        context.getString(R.string.reading_vcard_message),
-                        ImportVCardActivity.this,
-                        mHandler));
-            }
-
-            try {
-                if (!readOneVCardFile(uri, vcardType, builder, false, null)) {
-                    return null;
-                }
-            } catch (VCardNestedException e) {
-                Log.e(LOG_TAG, "Never reach here.");
-            }
-            final ArrayList<Uri> createdUris = committer.getCreatedUris();
-            return (createdUris == null || createdUris.size() != 1) ? null : createdUris.get(0);
-        }
-
-        /**
-         * Charset should be handled by {@link VCardEntryConstructor}. 
-         */
-        private boolean readOneVCardFile(Uri uri, int vcardType,
-                VCardInterpreter interpreter,
-                boolean throwNestedException, List<String> errorFileNameList)
-                throws VCardNestedException {
-            InputStream is;
-            try {
-                is = mResolver.openInputStream(uri);
-                mVCardParser = new VCardParser_V21(vcardType);
-
-                try {
-                    mVCardParser.parse(is, interpreter);
-                } catch (VCardVersionException e1) {
-                    try {
-                        is.close();
-                    } catch (IOException e) {
-                    }
-                    if (interpreter instanceof VCardEntryConstructor) {
-                        // Let the object clean up internal temporal objects,
-                        ((VCardEntryConstructor)interpreter).clear();
-                    } else if (interpreter instanceof VCardInterpreterCollection) {
-                        for (VCardInterpreter elem :
-                            ((VCardInterpreterCollection) interpreter).getCollection()) {
-                            if (elem instanceof VCardEntryConstructor) {
-                                ((VCardEntryConstructor)elem).clear();
-                            }
-                        }
-                    }
-
-                    is = mResolver.openInputStream(uri);
-
-                    try {
-                        mVCardParser = new VCardParser_V30(vcardType);
-                        mVCardParser.parse(is, interpreter);
-                    } catch (VCardVersionException e2) {
-                        throw new VCardException("vCard with unspported version.");
-                    }
-                } finally {
-                    if (is != null) {
-                        try {
-                            is.close();
-                        } catch (IOException e) {
-                        }
-                    }
-                }
-            } catch (IOException e) {
-                Log.e(LOG_TAG, "IOException was emitted: " + e.getMessage());
-
-                mProgressDialogForReadVCard.dismiss();
-
-                if (errorFileNameList != null) {
-                    errorFileNameList.add(uri.toString());
-                } else {
-                    runOnUIThread(new DialogDisplayer(
-                            getString(R.string.fail_reason_io_error) +
-                                    ": " + e.getLocalizedMessage()));
-                }
-                return false;
-            } catch (VCardNotSupportedException e) {
-                if ((e instanceof VCardNestedException) && throwNestedException) {
-                    throw (VCardNestedException)e;
-                }
-                if (errorFileNameList != null) {
-                    errorFileNameList.add(uri.toString());
-                } else {
-                    runOnUIThread(new DialogDisplayer(
-                            getString(R.string.fail_reason_vcard_not_supported_error) +
-                            " (" + e.getMessage() + ")"));
-                }
-                return false;
-            } catch (VCardException e) {
-                if (errorFileNameList != null) {
-                    errorFileNameList.add(uri.toString());
-                } else {
-                    runOnUIThread(new DialogDisplayer(
-                            getString(R.string.fail_reason_vcard_parse_error) +
-                            " (" + e.getMessage() + ")"));
-                }
-                return false;
-            }
-            return true;
-        }
-
-        public void cancel() {
-            mCanceled = true;
-            if (mVCardParser != null) {
-                mVCardParser.cancel();
-            }
-        }
-
-        public void onCancel(DialogInterface dialog) {
-            cancel();
-        }
-    }
-
-    private class ImportTypeSelectedListener implements
-            DialogInterface.OnClickListener {
-        public static final int IMPORT_ONE = 0;
-        public static final int IMPORT_MULTIPLE = 1;
-        public static final int IMPORT_ALL = 2;
-        public static final int IMPORT_TYPE_SIZE = 3;
-
-        private int mCurrentIndex;
-
-        public void onClick(DialogInterface dialog, int which) {
-            if (which == DialogInterface.BUTTON_POSITIVE) {
-                switch (mCurrentIndex) {
-                case IMPORT_ALL:
-                    importMultipleVCardFromSDCard(mAllVCardFileList);
-                    break;
-                case IMPORT_MULTIPLE:
-                    showDialog(R.id.dialog_select_multiple_vcard);
-                    break;
-                default:
-                    showDialog(R.id.dialog_select_one_vcard);
-                    break;
-                }
-            } else if (which == DialogInterface.BUTTON_NEGATIVE) {
-                finish();
-            } else {
-                mCurrentIndex = which;
-            }
-        }
-    }
-
-    private class VCardSelectedListener implements
-            DialogInterface.OnClickListener, DialogInterface.OnMultiChoiceClickListener {
-        private int mCurrentIndex;
-        private Set<Integer> mSelectedIndexSet;
-
-        public VCardSelectedListener(boolean multipleSelect) {
-            mCurrentIndex = 0;
-            if (multipleSelect) {
-                mSelectedIndexSet = new HashSet<Integer>();
-            }
-        }
-
-        public void onClick(DialogInterface dialog, int which) {
-            if (which == DialogInterface.BUTTON_POSITIVE) {
-                if (mSelectedIndexSet != null) {
-                    List<VCardFile> selectedVCardFileList = new ArrayList<VCardFile>();
-                    int size = mAllVCardFileList.size();
-                    // We'd like to sort the files by its index, so we do not use Set iterator.
-                    for (int i = 0; i < size; i++) {
-                        if (mSelectedIndexSet.contains(i)) {
-                            selectedVCardFileList.add(mAllVCardFileList.get(i));
-                        }
-                    }
-                    importMultipleVCardFromSDCard(selectedVCardFileList);
-                } else {
-                    String canonicalPath = mAllVCardFileList.get(mCurrentIndex).getCanonicalPath();
-                    final Uri uri = Uri.parse("file://" + canonicalPath);
-                    importOneVCardFromSDCard(uri);
-                }
-            } else if (which == DialogInterface.BUTTON_NEGATIVE) {
-                finish();
-            } else {
-                // Some file is selected.
-                mCurrentIndex = which;
-                if (mSelectedIndexSet != null) {
-                    if (mSelectedIndexSet.contains(which)) {
-                        mSelectedIndexSet.remove(which);
-                    } else {
-                        mSelectedIndexSet.add(which);
-                    }
-                }
-            }
-        }
-
-        public void onClick(DialogInterface dialog, int which, boolean isChecked) {
-            if (mSelectedIndexSet == null || (mSelectedIndexSet.contains(which) == isChecked)) {
-                Log.e(LOG_TAG, String.format("Inconsist state in index %d (%s)", which,
-                        mAllVCardFileList.get(which).getCanonicalPath()));
-            } else {
-                onClick(dialog, which);
-            }
-        }
-    }
-
-    /**
-     * Thread scanning VCard from SDCard. After scanning, the dialog which lets a user select
-     * a vCard file is shown. After the choice, VCardReadThread starts running.
-     */
-    private class VCardScanThread extends Thread implements OnCancelListener, OnClickListener {
-        private boolean mCanceled;
-        private boolean mGotIOException;
-        private File mRootDirectory;
-
-        // To avoid recursive link.
-        private Set<String> mCheckedPaths;
-        private PowerManager.WakeLock mWakeLock;
-
-        private class CanceledException extends Exception {
-        }
-
-        public VCardScanThread(File sdcardDirectory) {
-            mCanceled = false;
-            mGotIOException = false;
-            mRootDirectory = sdcardDirectory;
-            mCheckedPaths = new HashSet<String>();
-            PowerManager powerManager = (PowerManager)ImportVCardActivity.this.getSystemService(
-                    Context.POWER_SERVICE);
-            mWakeLock = powerManager.newWakeLock(
-                    PowerManager.SCREEN_DIM_WAKE_LOCK |
-                    PowerManager.ON_AFTER_RELEASE, LOG_TAG);
-        }
-
-        @Override
-        public void run() {
-            mAllVCardFileList = new Vector<VCardFile>();
-            try {
-                mWakeLock.acquire();
-                getVCardFileRecursively(mRootDirectory);
-            } catch (CanceledException e) {
-                mCanceled = true;
-            } catch (IOException e) {
-                mGotIOException = true;
-            } finally {
-                mWakeLock.release();
-            }
-
-            if (mCanceled) {
-                mAllVCardFileList = null;
-            }
-
-            mProgressDialogForScanVCard.dismiss();
-            mProgressDialogForScanVCard = null;
-
-            if (mGotIOException) {
-                runOnUIThread(new DialogDisplayer(R.id.dialog_io_exception));
-            } else if (mCanceled) {
-                finish();
-            } else {
-                int size = mAllVCardFileList.size();
-                final Context context = ImportVCardActivity.this;
-                if (size == 0) {
-                    runOnUIThread(new DialogDisplayer(R.id.dialog_vcard_not_found));
-                } else {
-                    startVCardSelectAndImport();
-                }
-            }
-        }
-
-        private void getVCardFileRecursively(File directory)
-                throws CanceledException, IOException {
-            if (mCanceled) {
-                throw new CanceledException();
-            }
-
-            // e.g. secured directory may return null toward listFiles().
-            final File[] files = directory.listFiles();
-            if (files == null) {
-                Log.w(LOG_TAG, "listFiles() returned null (directory: " + directory + ")");
-                return;
-            }
-            for (File file : directory.listFiles()) {
-                if (mCanceled) {
-                    throw new CanceledException();
-                }
-                String canonicalPath = file.getCanonicalPath();
-                if (mCheckedPaths.contains(canonicalPath)) {
-                    continue;
-                }
-
-                mCheckedPaths.add(canonicalPath);
-
-                if (file.isDirectory()) {
-                    getVCardFileRecursively(file);
-                } else if (canonicalPath.toLowerCase().endsWith(".vcf") &&
-                        file.canRead()){
-                    String fileName = file.getName();
-                    VCardFile vcardFile = new VCardFile(
-                            fileName, canonicalPath, file.lastModified());
-                    mAllVCardFileList.add(vcardFile);
-                }
-            }
-        }
-
-        public void onCancel(DialogInterface dialog) {
-            mCanceled = true;
-        }
-
-        public void onClick(DialogInterface dialog, int which) {
-            if (which == DialogInterface.BUTTON_NEGATIVE) {
-                mCanceled = true;
-            }
-        }
-    }
-
-    private void startVCardSelectAndImport() {
-        int size = mAllVCardFileList.size();
-        if (getResources().getBoolean(R.bool.config_import_all_vcard_from_sdcard_automatically)) {
-            importMultipleVCardFromSDCard(mAllVCardFileList);
-        } else if (size == 1) {
-            String canonicalPath = mAllVCardFileList.get(0).getCanonicalPath();
-            Uri uri = Uri.parse("file://" + canonicalPath);
-            importOneVCardFromSDCard(uri);
-        } else if (getResources().getBoolean(R.bool.config_allow_users_select_all_vcard_import)) {
-            runOnUIThread(new DialogDisplayer(R.id.dialog_select_import_type));
-        } else {
-            runOnUIThread(new DialogDisplayer(R.id.dialog_select_one_vcard));
-        }
-    }
-
-    private void importMultipleVCardFromSDCard(final List<VCardFile> selectedVCardFileList) {
-        runOnUIThread(new Runnable() {
-            public void run() {
-                mVCardReadThread = new VCardReadThread(selectedVCardFileList);
-                showDialog(R.id.dialog_reading_vcard);
-            }
-        });
-    }
-
-    private void importOneVCardFromSDCard(final Uri uri) {
-        runOnUIThread(new Runnable() {
-            public void run() {
-                mVCardReadThread = new VCardReadThread(uri);
-                showDialog(R.id.dialog_reading_vcard);
-            }
-        });
-    }
-
-    private Dialog getSelectImportTypeDialog() {
-        DialogInterface.OnClickListener listener =
-            new ImportTypeSelectedListener();
-        AlertDialog.Builder builder = new AlertDialog.Builder(this)
-            .setTitle(R.string.select_vcard_title)
-            .setPositiveButton(android.R.string.ok, listener)
-            .setOnCancelListener(mCancelListener)
-            .setNegativeButton(android.R.string.cancel, mCancelListener);
-
-        String[] items = new String[ImportTypeSelectedListener.IMPORT_TYPE_SIZE];
-        items[ImportTypeSelectedListener.IMPORT_ONE] =
-            getString(R.string.import_one_vcard_string);
-        items[ImportTypeSelectedListener.IMPORT_MULTIPLE] =
-            getString(R.string.import_multiple_vcard_string);
-        items[ImportTypeSelectedListener.IMPORT_ALL] =
-            getString(R.string.import_all_vcard_string);
-        builder.setSingleChoiceItems(items, ImportTypeSelectedListener.IMPORT_ONE, listener);
-        return builder.create();
-    }
-
-    private Dialog getVCardFileSelectDialog(boolean multipleSelect) {
-        int size = mAllVCardFileList.size();
-        VCardSelectedListener listener = new VCardSelectedListener(multipleSelect);
-        AlertDialog.Builder builder =
-            new AlertDialog.Builder(this)
-                .setTitle(R.string.select_vcard_title)
-                .setPositiveButton(android.R.string.ok, listener)
-                .setOnCancelListener(mCancelListener)
-                .setNegativeButton(android.R.string.cancel, mCancelListener);
-
-        CharSequence[] items = new CharSequence[size];
-        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        for (int i = 0; i < size; i++) {
-            VCardFile vcardFile = mAllVCardFileList.get(i);
-            SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
-            stringBuilder.append(vcardFile.getName());
-            stringBuilder.append('\n');
-            int indexToBeSpanned = stringBuilder.length();
-            // Smaller date text looks better, since each file name becomes easier to read.
-            // The value set to RelativeSizeSpan is arbitrary. You can change it to any other
-            // value (but the value bigger than 1.0f would not make nice appearance :)
-            stringBuilder.append(
-                        "(" + dateFormat.format(new Date(vcardFile.getLastModified())) + ")");
-            stringBuilder.setSpan(
-                    new RelativeSizeSpan(0.7f), indexToBeSpanned, stringBuilder.length(),
-                    Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
-            items[i] = stringBuilder;
-        }
-        if (multipleSelect) {
-            builder.setMultiChoiceItems(items, (boolean[])null, listener);
-        } else {
-            builder.setSingleChoiceItems(items, 0, listener);
-        }
-        return builder.create();
-    }
-
-    @Override
-    protected void onCreate(Bundle bundle) {
-        super.onCreate(bundle);
-
-        final Intent intent = getIntent();
-        if (intent != null) {
-            final String accountName = intent.getStringExtra("account_name");
-            final String accountType = intent.getStringExtra("account_type");
-            if (!TextUtils.isEmpty(accountName) && !TextUtils.isEmpty(accountType)) {
-                mAccount = new Account(accountName, accountType);
-            }
-        } else {
-            Log.e(LOG_TAG, "intent does not exist");
-        }
-
-        // The caller often does not know account information at all, so we show the UI instead.
-        if (mAccount == null) {
-            // There's three possibilities:
-            // - more than one accounts -> ask the user
-            // - just one account -> use the account without asking the user
-            // - no account -> use phone-local storage without asking the user
-            final Sources sources = Sources.getInstance(this);
-            final List<Account> accountList = sources.getAccounts(true);
-            final int size = accountList.size();
-            if (size > 1) {
-                final int resId = R.string.import_from_sdcard;
-                mAccountSelectionListener =
-                    new AccountSelectionUtil.AccountSelectedListener(
-                            this, accountList, resId) {
-                    @Override
-                    public void onClick(DialogInterface dialog, int which) {
-                        dialog.dismiss();
-                        mAccount = mAccountList.get(which);
-                        // Instead of using Intent mechanism, call the relevant private method,
-                        // to avoid throwing an Intent to itself again.
-                        startImport();
-                    }
-                };
-                showDialog(resId);
-                return;
-            } else {
-                mAccount = size > 0 ? accountList.get(0) : null;
-            }
-        }
-
-        startImport();
-    }
-
-    private void startImport() {
-        Intent intent = getIntent();
-        final String action = intent.getAction();
-        final Uri uri = intent.getData();
-        Log.v(LOG_TAG, "action = " + action + " ; path = " + uri);
-        if (Intent.ACTION_VIEW.equals(action)) {
-            // Import the file directly and then go to EDIT screen
-            mNeedReview = true;
-        }
-
-        if (uri != null) {
-            importOneVCardFromSDCard(uri);
-        } else {
-            doScanExternalStorageAndImportVCard();
-        }
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int resId) {
-        switch (resId) {
-            case R.string.import_from_sdcard: {
-                if (mAccountSelectionListener == null) {
-                    throw new NullPointerException(
-                            "mAccountSelectionListener must not be null.");
-                }
-                return AccountSelectionUtil.getSelectAccountDialog(this, resId,
-                        mAccountSelectionListener,
-                        new CancelListener());
-            }
-            case R.id.dialog_searching_vcard: {
-                if (mProgressDialogForScanVCard == null) {
-                    String title = getString(R.string.searching_vcard_title);
-                    String message = getString(R.string.searching_vcard_message);
-                    mProgressDialogForScanVCard =
-                        ProgressDialog.show(this, title, message, true, false);
-                    mProgressDialogForScanVCard.setOnCancelListener(mVCardScanThread);
-                    mVCardScanThread.start();
-                }
-                return mProgressDialogForScanVCard;
-            }
-            case R.id.dialog_sdcard_not_found: {
-                AlertDialog.Builder builder = new AlertDialog.Builder(this)
-                    .setTitle(R.string.no_sdcard_title)
-                    .setIcon(android.R.drawable.ic_dialog_alert)
-                    .setMessage(R.string.no_sdcard_message)
-                    .setOnCancelListener(mCancelListener)
-                    .setPositiveButton(android.R.string.ok, mCancelListener);
-                return builder.create();
-            }
-            case R.id.dialog_vcard_not_found: {
-                String message = (getString(R.string.scanning_sdcard_failed_message,
-                        getString(R.string.fail_reason_no_vcard_file)));
-                AlertDialog.Builder builder = new AlertDialog.Builder(this)
-                    .setTitle(R.string.scanning_sdcard_failed_title)
-                    .setMessage(message)
-                    .setOnCancelListener(mCancelListener)
-                    .setPositiveButton(android.R.string.ok, mCancelListener);
-                return builder.create();
-            }
-            case R.id.dialog_select_import_type: {
-                return getSelectImportTypeDialog();
-            }
-            case R.id.dialog_select_multiple_vcard: {
-                return getVCardFileSelectDialog(true);
-            }
-            case R.id.dialog_select_one_vcard: {
-                return getVCardFileSelectDialog(false);
-            }
-            case R.id.dialog_reading_vcard: {
-                if (mProgressDialogForReadVCard == null) {
-                    String title = getString(R.string.reading_vcard_title);
-                    String message = getString(R.string.reading_vcard_message);
-                    mProgressDialogForReadVCard = new ProgressDialog(this);
-                    mProgressDialogForReadVCard.setTitle(title);
-                    mProgressDialogForReadVCard.setMessage(message);
-                    mProgressDialogForReadVCard.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
-                    mProgressDialogForReadVCard.setOnCancelListener(mVCardReadThread);
-                    mVCardReadThread.start();
-                }
-                return mProgressDialogForReadVCard;
-            }
-            case R.id.dialog_io_exception: {
-                String message = (getString(R.string.scanning_sdcard_failed_message,
-                        getString(R.string.fail_reason_io_error)));
-                AlertDialog.Builder builder = new AlertDialog.Builder(this)
-                    .setTitle(R.string.scanning_sdcard_failed_title)
-                    .setIcon(android.R.drawable.ic_dialog_alert)
-                    .setMessage(message)
-                    .setOnCancelListener(mCancelListener)
-                    .setPositiveButton(android.R.string.ok, mCancelListener);
-                return builder.create();
-            }
-            case R.id.dialog_error_with_message: {
-                String message = mErrorMessage;
-                if (TextUtils.isEmpty(message)) {
-                    Log.e(LOG_TAG, "Error message is null while it must not.");
-                    message = getString(R.string.fail_reason_unknown);
-                }
-                AlertDialog.Builder builder = new AlertDialog.Builder(this)
-                    .setTitle(getString(R.string.reading_vcard_failed_title))
-                    .setIcon(android.R.drawable.ic_dialog_alert)
-                    .setMessage(message)
-                    .setOnCancelListener(mCancelListener)
-                    .setPositiveButton(android.R.string.ok, mCancelListener);
-                return builder.create();
-            }
-        }
-
-        return super.onCreateDialog(resId);
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        if (mVCardReadThread != null) {
-            // The Activity is no longer visible. Stop the thread.
-            mVCardReadThread.cancel();
-            mVCardReadThread = null;
-        }
-
-        // ImportVCardActivity should not be persistent. In other words, if there's some
-        // event calling onPause(), this Activity should finish its work and give the main
-        // screen back to the caller Activity.
-        if (!isFinishing()) {
-            finish();
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        // The code assumes the handler runs on the UI thread. If not,
-        // clearing the message queue is not enough, one would have to
-        // make sure that the handler does not run any callback when
-        // this activity isFinishing().
-
-        // Need to make sure any worker thread is done before we flush and
-        // nullify the message handler.
-        if (mVCardReadThread != null) {
-            Log.w(LOG_TAG, "VCardReadThread exists while this Activity is now being killed!");
-            mVCardReadThread.cancel();
-            int attempts = 0;
-            while (mVCardReadThread.isAlive() && attempts < 10) {
-                try {
-                    Thread.currentThread().sleep(20);
-                } catch (InterruptedException ie) {
-                    // Keep on going until max attempts is reached.
-                }
-                attempts++;
-            }
-            if (mVCardReadThread.isAlive()) {
-                // Find out why the thread did not exit in a timely
-                // fashion. Last resort: increase the sleep duration
-                // and/or the number of attempts.
-                Log.e(LOG_TAG, "VCardReadThread is still alive after max attempts.");
-            }
-            mVCardReadThread = null;
-        }
-
-        // Callbacks messages have what == 0.
-        if (mHandler.hasMessages(0)) {
-            mHandler.removeMessages(0);
-        }
-
-        mHandler = null;  // Prevents memory leaks by breaking any circular dependency.
-        super.onDestroy();
-    }
-
-    /**
-     * Tries to run a given Runnable object when the UI thread can. Ignore it otherwise
-     */
-    private void runOnUIThread(Runnable runnable) {
-        if (mHandler == null) {
-            Log.w(LOG_TAG, "Handler object is null. No dialog is shown.");
-        } else {
-            mHandler.post(runnable);
-        }
-    }
-
-    @Override
-    public void finalize() {
-        // TODO: This should not be needed. Throw exception instead.
-        if (mVCardReadThread != null) {
-            // Not sure this procedure is really needed, but just in case...
-            Log.e(LOG_TAG, "VCardReadThread exists while this Activity is now being killed!");
-            mVCardReadThread.cancel();
-            mVCardReadThread = null;
-        }
-    }
-
-    /**
-     * Scans vCard in external storage (typically SDCard) and tries to import it.
-     * - When there's no SDCard available, an error dialog is shown.
-     * - When multiple vCard files are available, asks a user to select one.
-     */
-    private void doScanExternalStorageAndImportVCard() {
-        // TODO: should use getExternalStorageState().
-        final File file = Environment.getExternalStorageDirectory();
-        if (!file.exists() || !file.isDirectory() || !file.canRead()) {
-            showDialog(R.id.dialog_sdcard_not_found);
-        } else {
-            mVCardScanThread = new VCardScanThread(file);
-            showDialog(R.id.dialog_searching_vcard);
-        }
-    }
-}
diff --git a/src/com/android/contacts/JoinContactActivity.java b/src/com/android/contacts/JoinContactActivity.java
new file mode 100644
index 0000000..ea48763
--- /dev/null
+++ b/src/com/android/contacts/JoinContactActivity.java
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2009 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 com.android.contacts.list.ContactEntryListFragment;
+import com.android.contacts.list.JoinContactListFragment;
+import com.android.contacts.list.OnContactPickerActionListener;
+
+import android.app.Activity;
+import android.app.FragmentTransaction;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+
+/**
+ * An activity that shows a list of contacts that can be joined with the target contact.
+ */
+public class JoinContactActivity extends Activity {
+
+    private static final String TAG = "JoinContactActivity";
+
+    /**
+     * The action for the join contact activity.
+     * <p>
+     * Input: extra field {@link #EXTRA_TARGET_CONTACT_ID} is the aggregate ID.
+     * TODO: move to {@link ContactsContract}.
+     */
+    public static final String JOIN_CONTACT = "com.android.contacts.action.JOIN_CONTACT";
+
+    /**
+     * Used with {@link #JOIN_CONTACT} to give it the target for aggregation.
+     * <p>
+     * Type: LONG
+     */
+    public static final String EXTRA_TARGET_CONTACT_ID = "com.android.contacts.action.CONTACT_ID";
+
+    private long mTargetContactId;
+
+    private JoinContactListFragment mListFragment;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        Intent intent = getIntent();
+        mTargetContactId = intent.getLongExtra(EXTRA_TARGET_CONTACT_ID, -1);
+        if (mTargetContactId == -1) {
+            Log.e(TAG, "Intent " + intent.getAction() + " is missing required extra: "
+                    + EXTRA_TARGET_CONTACT_ID);
+            setResult(RESULT_CANCELED);
+            finish();
+            return;
+        }
+
+        mListFragment = new JoinContactListFragment();
+        mListFragment.setTargetContactId(mTargetContactId);
+        mListFragment.setOnContactPickerActionListener(new OnContactPickerActionListener() {
+            public void onPickContactAction(Uri contactUri) {
+                Intent intent = new Intent(null, contactUri);
+                setResult(RESULT_OK, intent);
+                finish();
+            }
+
+            public void onSearchAllContactsAction(String string) {
+            }
+
+            public void onShortcutIntentCreated(Intent intent) {
+            }
+
+            public void onCreateNewContactAction() {
+            }
+        });
+
+        FragmentTransaction transaction = getFragmentManager().openTransaction();
+        transaction.add(android.R.id.content, mListFragment);
+        transaction.commit();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        MenuInflater inflater = getMenuInflater();
+        inflater.inflate(R.menu.search, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_search: {
+                onSearchRequested();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            mListFragment.startSearch(initialQuery);
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (requestCode == ContactEntryListFragment.ACTIVITY_REQUEST_CODE_PICKER
+                && resultCode == RESULT_OK) {
+            mListFragment.onPickerResult(data);
+        }
+    }
+}
diff --git a/src/com/android/contacts/MultiplePhonePickerActivity.java b/src/com/android/contacts/MultiplePhonePickerActivity.java
new file mode 100644
index 0000000..572b4de
--- /dev/null
+++ b/src/com/android/contacts/MultiplePhonePickerActivity.java
@@ -0,0 +1,226 @@
+/*
+ * 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;
+
+import com.android.contacts.list.MultiplePhonePickerFragment;
+import com.android.contacts.list.OnMultiplePhoneNumberPickerActionListener;
+
+import android.app.Activity;
+import android.app.FragmentTransaction;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.provider.ContactsContract.Intents;
+import android.view.Menu;
+import android.view.MenuInflater;
+
+/**
+ * Displays of phone numbers and allows selection of multiple numbers.
+ */
+public class MultiplePhonePickerActivity extends Activity {
+
+    /**
+     * Display only selected recipients or not in MODE_PICK_MULTIPLE_PHONES mode
+     */
+    private boolean mShowSelectedOnly = false;
+
+    private MultiplePhonePickerFragment mListFragment;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        mListFragment = new MultiplePhonePickerFragment();
+        mListFragment.setOnMultiplePhoneNumberPickerActionListener(
+                new OnMultiplePhoneNumberPickerActionListener() {
+
+            public void onPhoneNumbersSelectedAction(Uri[] dataUris) {
+                returnActivityResult(dataUris);
+            }
+
+            public void onFinishAction() {
+                finish();
+            }
+        });
+
+        Parcelable[] extras = getIntent().getParcelableArrayExtra(Intents.EXTRA_PHONE_URIS);
+        mListFragment.setSelectedUris(extras);
+        FragmentTransaction transaction = getFragmentManager().openTransaction();
+        transaction.add(android.R.id.content, mListFragment);
+        transaction.commit();
+    }
+
+    @Override
+    public void onBackPressed() {
+        returnActivityResult(mListFragment.getSelectedUris());
+        super.onBackPressed();
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle icicle) {
+        super.onSaveInstanceState(icicle);
+        mListFragment.onSaveInstanceState(icicle);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+
+        final MenuInflater inflater = getMenuInflater();
+        inflater.inflate(R.menu.pick, menu);
+        return true;
+    }
+
+    /*
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        if (mShowSelectedOnly) {
+            menu.findItem(R.id.menu_display_selected).setVisible(false);
+            menu.findItem(R.id.menu_display_all).setVisible(true);
+            menu.findItem(R.id.menu_select_all).setVisible(false);
+            menu.findItem(R.id.menu_select_none).setVisible(false);
+            return true;
+        }
+        menu.findItem(R.id.menu_display_all).setVisible(false);
+        menu.findItem(R.id.menu_display_selected).setVisible(true);
+        if (mUserSelection.isAllSelected()) {
+            menu.findItem(R.id.menu_select_all).setVisible(false);
+            menu.findItem(R.id.menu_select_none).setVisible(true);
+        } else {
+            menu.findItem(R.id.menu_select_all).setVisible(true);
+            menu.findItem(R.id.menu_select_none).setVisible(false);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_select_all: {
+                mUserSelection.setAllPhonesSelected(true);
+                checkAll(true);
+                updateWidgets(true);
+                return true;
+            }
+            case R.id.menu_select_none: {
+                mUserSelection.setAllPhonesSelected(false);
+                checkAll(false);
+                updateWidgets(true);
+                return true;
+            }
+            case R.id.menu_display_selected: {
+                mShowSelectedOnly = true;
+                startQuery();
+                return true;
+            }
+            case R.id.menu_display_all: {
+                mShowSelectedOnly = false;
+                startQuery();
+                return true;
+            }
+        }
+        return super.onOptionsItemSelected(item);
+    }
+*/
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+        // TODO
+//        if (mProviderStatus != ProviderStatus.STATUS_NORMAL) {
+//            return;
+//        }
+//
+//        if (globalSearch) {
+//            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+//        } else {
+//            if (!mSearchMode && (mMode & MODE_MASK_NO_FILTER) == 0) {
+//                if ((mMode & MODE_MASK_PICKER) != 0) {
+//                    Bundle extras = getIntent().getExtras();
+//                    if (extras == null) {
+//                        extras = new Bundle();
+//                    }
+//                    mUserSelection.fillSelectionForSearchMode(extras);
+//                    ContactsSearchManager.startSearchForResult(this, initialQuery,
+//                            SUBACTIVITY_FILTER, extras);
+//                } else {
+//                    ContactsSearchManager.startSearch(this, initialQuery);
+//                }
+//            }
+//        }
+    }
+
+//    @Override
+//    protected void startQuery(Uri uri, String[] projection) {
+//        // Filter unknown phone numbers first.
+//        mPhoneNumberAdapter.doFilter(null, mShowSelectedOnly);
+//        if (mShowSelectedOnly) {
+//            StringBuilder idSetBuilder = new StringBuilder();
+//            Iterator<Long> itr = mUserSelection.getSelectedPhonIds();
+//            if (itr.hasNext()) {
+//                idSetBuilder.append(Long.toString(itr.next()));
+//            }
+//            while (itr.hasNext()) {
+//                idSetBuilder.append(',');
+//                idSetBuilder.append(Long.toString(itr.next()));
+//            }
+//            String whereClause = Phone._ID + " IN (" + idSetBuilder.toString() + ")";
+//            mQueryHandler.startQuery(QUERY_TOKEN, null, uri, projection, whereClause, null,
+//                    getSortOrder(projection));
+//        } else {
+//            mQueryHandler.startQuery(QUERY_TOKEN, null, uri,
+//                    projection, CLAUSE_ONLY_VISIBLE, null, getSortOrder(projection));
+//        }
+//    }
+
+//    @Override
+//    public Cursor doFilter(String filter) {
+//        String[] projection = getProjectionForQuery();
+//        if (mSearchMode && TextUtils.isEmpty(mListFragment.getQueryString())) {
+//            return new MatrixCursor(projection);
+//        }
+//
+//        final ContentResolver resolver = getContentResolver();
+//        // Filter phone numbers as well.
+//        mPhoneNumberAdapter.doFilter(filter, mShowSelectedOnly);
+//
+//        Uri uri = getUriToQuery();
+//        if (!TextUtils.isEmpty(filter)) {
+//            uri = Uri.withAppendedPath(Phone.CONTENT_FILTER_URI, Uri.encode(filter));
+//        }
+//        return resolver.query(uri, projection, CLAUSE_ONLY_VISIBLE, null, getSortOrder(projection));
+//    }
+
+    public void returnActivityResult(Uri[] dataUris) {
+        Intent intent = new Intent();
+        intent.putExtra(Intents.EXTRA_PHONE_URIS, dataUris);
+        setResult(RESULT_OK, intent);
+        finish();
+    }
+
+    private void checkAll(boolean checked) {
+        // TODO fix this. It should iterate over the cursor rather than the views in the list.
+        /*
+        final ListView listView = getListView();
+        int childCount = listView.getChildCount();
+        for (int i = 0; i < childCount; i++) {
+            final ContactListItemView child = (ContactListItemView)listView.getChildAt(i);
+            child.getCheckBoxView().setChecked(checked);
+        }
+        */
+    }
+}
diff --git a/src/com/android/contacts/PhoneDisambigDialog.java b/src/com/android/contacts/PhoneDisambigDialog.java
deleted file mode 100644
index 3e3d534..0000000
--- a/src/com/android/contacts/PhoneDisambigDialog.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright (C) 2009 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 com.android.contacts.Collapser.Collapsible;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.Sources;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.ContactsSource.StringInflater;
-
-import android.app.AlertDialog;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.database.Cursor;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.telephony.PhoneNumberUtils;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.ListAdapter;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Class used for displaying a dialog with a list of phone numbers of which
- * one will be chosen to make a call or initiate an sms message.
- */
-public class PhoneDisambigDialog implements DialogInterface.OnClickListener,
-        DialogInterface.OnDismissListener, CompoundButton.OnCheckedChangeListener{
-
-    private boolean mMakePrimary = false;
-    private Context mContext;
-    private AlertDialog mDialog;
-    private boolean mSendSms;
-    private int mStickyTab;
-    private Cursor mPhonesCursor;
-    private ListAdapter mPhonesAdapter;
-    private ArrayList<PhoneItem> mPhoneItemList;
-
-    public PhoneDisambigDialog(Context context, Cursor phonesCursor, boolean sendSms,
-            int stickyTab) {
-        mContext = context;
-        mSendSms = sendSms;
-        mPhonesCursor = phonesCursor;
-        mStickyTab = stickyTab;
-
-        mPhoneItemList = makePhoneItemsList(phonesCursor);
-        Collapser.collapseList(mPhoneItemList);
-
-        mPhonesAdapter = new PhonesAdapter(mContext, mPhoneItemList, mSendSms);
-
-        LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-        View setPrimaryView = inflater.
-                inflate(R.layout.set_primary_checkbox, null);
-        ((CheckBox) setPrimaryView.findViewById(R.id.setPrimary)).
-                setOnCheckedChangeListener(this);
-
-        // Need to show disambig dialogue.
-        AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(mContext).
-                setAdapter(mPhonesAdapter, this).
-                        setTitle(sendSms ?
-                                R.string.sms_disambig_title : R.string.call_disambig_title).
-                        setView(setPrimaryView);
-
-        mDialog = dialogBuilder.create();
-    }
-
-    /**
-     * Show the dialog.
-     */
-    public void show() {
-        if (mPhoneItemList.size() == 1) {
-            // If there is only one after collapse, just select it, and close;
-            onClick(mDialog, 0);
-            return;
-        }
-        mDialog.show();
-    }
-
-    public void onClick(DialogInterface dialog, int which) {
-        if (mPhoneItemList.size() > which && which >= 0) {
-            PhoneItem phoneItem = mPhoneItemList.get(which);
-            long id = phoneItem.id;
-            String phone = phoneItem.phoneNumber;
-
-            if (mMakePrimary) {
-                ContentValues values = new ContentValues(1);
-                values.put(Data.IS_SUPER_PRIMARY, 1);
-                mContext.getContentResolver().update(ContentUris.
-                        withAppendedId(Data.CONTENT_URI, id), values, null, null);
-            }
-
-            if (mSendSms) {
-                ContactsUtils.initiateSms(mContext, phone);
-            } else {
-                StickyTabs.saveTab(mContext, mStickyTab);
-                ContactsUtils.initiateCall(mContext, phone);
-            }
-        } else {
-            dialog.dismiss();
-        }
-    }
-
-    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-        mMakePrimary = isChecked;
-    }
-
-    public void onDismiss(DialogInterface dialog) {
-        mPhonesCursor.close();
-    }
-
-    private static class PhonesAdapter extends ArrayAdapter<PhoneItem> {
-        private final boolean sendSms;
-        private final Sources mSources;
-
-        public PhonesAdapter(Context context, List<PhoneItem> objects, boolean sendSms) {
-            super(context, R.layout.phone_disambig_item,
-                    android.R.id.text2, objects);
-            this.sendSms = sendSms;
-            mSources = Sources.getInstance(context);
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup parent) {
-            View view = super.getView(position, convertView, parent);
-
-            PhoneItem item = getItem(position);
-            ContactsSource source = mSources.getInflatedSource(item.accountType,
-                    ContactsSource.LEVEL_SUMMARY);
-
-            // Obtain a string representation of the phone type specific to the
-            // ContactSource associated with that phone number
-            TextView typeView = (TextView)view.findViewById(android.R.id.text1);
-            DataKind kind = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
-            if (kind != null) {
-                ContentValues values = new ContentValues();
-                values.put(Phone.TYPE, item.type);
-                values.put(Phone.LABEL, item.label);
-                StringInflater header = sendSms ? kind.actionAltHeader : kind.actionHeader;
-                typeView.setText(header.inflateUsing(getContext(), values));
-            } else {
-                typeView.setText(R.string.call_other);
-            }
-            return view;
-        }
-    }
-
-    private class PhoneItem implements Collapsible<PhoneItem> {
-
-        final long id;
-        final String phoneNumber;
-        final String accountType;
-        final long type;
-        final String label;
-
-        public PhoneItem(long id, String phoneNumber, String accountType, int type, String label) {
-            this.id = id;
-            this.phoneNumber = (phoneNumber != null ? phoneNumber : "");
-            this.accountType = accountType;
-            this.type = type;
-            this.label = label;
-        }
-
-        public boolean collapseWith(PhoneItem phoneItem) {
-            if (!shouldCollapseWith(phoneItem)) {
-                return false;
-            }
-            // Just keep the number and id we already have.
-            return true;
-        }
-
-        public boolean shouldCollapseWith(PhoneItem phoneItem) {
-            if (PhoneNumberUtils.compare(PhoneDisambigDialog.this.mContext,
-                    phoneNumber, phoneItem.phoneNumber)) {
-                return true;
-            }
-            return false;
-        }
-
-        @Override
-        public String toString() {
-            return phoneNumber;
-        }
-    }
-
-    private ArrayList<PhoneItem> makePhoneItemsList(Cursor phonesCursor) {
-        ArrayList<PhoneItem> phoneList = new ArrayList<PhoneItem>();
-
-        phonesCursor.moveToPosition(-1);
-        while (phonesCursor.moveToNext()) {
-            long id = phonesCursor.getLong(phonesCursor.getColumnIndex(Data._ID));
-            String phone = phonesCursor.getString(phonesCursor.getColumnIndex(Phone.NUMBER));
-            String accountType =
-                    phonesCursor.getString(phonesCursor.getColumnIndex(RawContacts.ACCOUNT_TYPE));
-            int type = phonesCursor.getInt(phonesCursor.getColumnIndex(Phone.TYPE));
-            String label = phonesCursor.getString(phonesCursor.getColumnIndex(Phone.LABEL));
-
-            phoneList.add(new PhoneItem(id, phone, accountType, type, label));
-        }
-
-        return phoneList;
-    }
-}
diff --git a/src/com/android/contacts/PinnedHeaderListView.java b/src/com/android/contacts/PinnedHeaderListView.java
deleted file mode 100644
index 9d1391b..0000000
--- a/src/com/android/contacts/PinnedHeaderListView.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * 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;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.ListAdapter;
-import android.widget.ListView;
-
-/**
- * A ListView that maintains a header pinned at the top of the list. The
- * pinned header can be pushed up and dissolved as needed.
- */
-public class PinnedHeaderListView extends ListView {
-
-    /**
-     * Adapter interface.  The list adapter must implement this interface.
-     */
-    public interface PinnedHeaderAdapter {
-
-        /**
-         * Pinned header state: don't show the header.
-         */
-        public static final int PINNED_HEADER_GONE = 0;
-
-        /**
-         * Pinned header state: show the header at the top of the list.
-         */
-        public static final int PINNED_HEADER_VISIBLE = 1;
-
-        /**
-         * Pinned header state: show the header. If the header extends beyond
-         * the bottom of the first shown element, push it up and clip.
-         */
-        public static final int PINNED_HEADER_PUSHED_UP = 2;
-
-        /**
-         * Computes the desired state of the pinned header for the given
-         * position of the first visible list item. Allowed return values are
-         * {@link #PINNED_HEADER_GONE}, {@link #PINNED_HEADER_VISIBLE} or
-         * {@link #PINNED_HEADER_PUSHED_UP}.
-         */
-        int getPinnedHeaderState(int position);
-
-        /**
-         * Configures the pinned header view to match the first visible list item.
-         *
-         * @param header pinned header view.
-         * @param position position of the first visible list item.
-         * @param alpha fading of the header view, between 0 and 255.
-         */
-        void configurePinnedHeader(View header, int position, int alpha);
-    }
-
-    private static final int MAX_ALPHA = 255;
-
-    private PinnedHeaderAdapter mAdapter;
-    private View mHeaderView;
-    private boolean mHeaderViewVisible;
-
-    private int mHeaderViewWidth;
-
-    private int mHeaderViewHeight;
-
-    public PinnedHeaderListView(Context context) {
-        super(context);
-    }
-
-    public PinnedHeaderListView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public PinnedHeaderListView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    public void setPinnedHeaderView(View view) {
-        mHeaderView = view;
-
-        // Disable vertical fading when the pinned header is present
-        // TODO change ListView to allow separate measures for top and bottom fading edge;
-        // in this particular case we would like to disable the top, but not the bottom edge.
-        if (mHeaderView != null) {
-            setFadingEdgeLength(0);
-        }
-        requestLayout();
-    }
-
-    @Override
-    public void setAdapter(ListAdapter adapter) {
-        super.setAdapter(adapter);
-        mAdapter = (PinnedHeaderAdapter)adapter;
-    }
-
-    @Override
-    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-        if (mHeaderView != null) {
-            measureChild(mHeaderView, widthMeasureSpec, heightMeasureSpec);
-            mHeaderViewWidth = mHeaderView.getMeasuredWidth();
-            mHeaderViewHeight = mHeaderView.getMeasuredHeight();
-        }
-    }
-
-    @Override
-    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
-        super.onLayout(changed, left, top, right, bottom);
-        if (mHeaderView != null) {
-            mHeaderView.layout(0, 0, mHeaderViewWidth, mHeaderViewHeight);
-            configureHeaderView(getFirstVisiblePosition());
-        }
-    }
-
-    public void configureHeaderView(int position) {
-        if (mHeaderView == null) {
-            return;
-        }
-
-        int state = mAdapter.getPinnedHeaderState(position);
-        switch (state) {
-            case PinnedHeaderAdapter.PINNED_HEADER_GONE: {
-                mHeaderViewVisible = false;
-                break;
-            }
-
-            case PinnedHeaderAdapter.PINNED_HEADER_VISIBLE: {
-                mAdapter.configurePinnedHeader(mHeaderView, position, MAX_ALPHA);
-                if (mHeaderView.getTop() != 0) {
-                    mHeaderView.layout(0, 0, mHeaderViewWidth, mHeaderViewHeight);
-                }
-                mHeaderViewVisible = true;
-                break;
-            }
-
-            case PinnedHeaderAdapter.PINNED_HEADER_PUSHED_UP: {
-                View firstView = getChildAt(0);
-                int bottom = firstView.getBottom();
-                int itemHeight = firstView.getHeight();
-                int headerHeight = mHeaderView.getHeight();
-                int y;
-                int alpha;
-                if (bottom < headerHeight) {
-                    y = (bottom - headerHeight);
-                    alpha = MAX_ALPHA * (headerHeight + y) / headerHeight;
-                } else {
-                    y = 0;
-                    alpha = MAX_ALPHA;
-                }
-                mAdapter.configurePinnedHeader(mHeaderView, position, alpha);
-                if (mHeaderView.getTop() != y) {
-                    mHeaderView.layout(0, y, mHeaderViewWidth, mHeaderViewHeight + y);
-                }
-                mHeaderViewVisible = true;
-                break;
-            }
-        }
-    }
-
-    @Override
-    protected void dispatchDraw(Canvas canvas) {
-        super.dispatchDraw(canvas);
-        if (mHeaderViewVisible) {
-            drawChild(canvas, mHeaderView, getDrawingTime());
-        }
-    }
-}
diff --git a/src/com/android/contacts/ProgressShower.java b/src/com/android/contacts/ProgressShower.java
deleted file mode 100644
index a5ad2a2..0000000
--- a/src/com/android/contacts/ProgressShower.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2009 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.ProgressDialog;
-import android.content.Context;
-import android.os.Handler;
-import android.pim.vcard.VCardEntry;
-import android.pim.vcard.VCardEntryHandler;
-import android.pim.vcard.VCardConfig;
-import android.util.Log;
-
-public class ProgressShower implements VCardEntryHandler {
-    public static final String LOG_TAG = "vcard.ProgressShower"; 
-
-    private final Context mContext;
-    private final Handler mHandler;
-    private final ProgressDialog mProgressDialog;
-    private final String mProgressMessage;
-
-    private long mTime;
-    
-    private class ShowProgressRunnable implements Runnable {
-        private VCardEntry mContact;
-        
-        public ShowProgressRunnable(VCardEntry contact) {
-            mContact = contact;
-        }
-        
-        public void run() {
-            mProgressDialog.setMessage( mProgressMessage + "\n" + 
-                    mContact.getDisplayName());
-            mProgressDialog.incrementProgressBy(1);
-        }
-    }
-    
-    public ProgressShower(ProgressDialog progressDialog,
-            String progressMessage,
-            Context context,
-            Handler handler) {
-        mContext = context;
-        mHandler = handler;
-        mProgressDialog = progressDialog;
-        mProgressMessage = progressMessage;
-    }
-
-    public void onStart() {
-    }
-
-    public void onEntryCreated(VCardEntry contactStruct) {
-        long start = System.currentTimeMillis();
-        
-        if (!contactStruct.isIgnorable()) {
-            if (mProgressDialog != null && mProgressMessage != null) {
-                if (mHandler != null) {
-                    mHandler.post(new ShowProgressRunnable(contactStruct));
-                } else {
-                    mProgressDialog.setMessage(mContext.getString(R.string.progress_shower_message,
-                            mProgressMessage, 
-                            contactStruct.getDisplayName()));
-                }
-            }
-        }
-        
-        mTime += System.currentTimeMillis() - start;
-    }
-
-    public void onEnd() {
-        if (VCardConfig.showPerformanceLog()) {
-            Log.d(LOG_TAG,
-                    String.format("Time to progress a dialog: %d ms", mTime));
-        }
-    }
-}
diff --git a/src/com/android/contacts/RecentCallsListActivity.java b/src/com/android/contacts/RecentCallsListActivity.java
index abda325..c004ccf 100644
--- a/src/com/android/contacts/RecentCallsListActivity.java
+++ b/src/com/android/contacts/RecentCallsListActivity.java
@@ -16,6 +16,7 @@
 
 package com.android.contacts;
 
+import com.android.common.widget.GroupingListAdapter;
 import com.android.internal.telephony.CallerInfo;
 import com.android.internal.telephony.ITelephony;
 
@@ -55,7 +56,6 @@
 import android.provider.ContactsContract.PhoneLookup;
 import android.telephony.PhoneNumberUtils;
 import android.telephony.TelephonyManager;
-import android.text.SpannableStringBuilder;
 import android.text.TextUtils;
 import android.text.format.DateUtils;
 import android.util.Log;
@@ -77,7 +77,6 @@
 import java.lang.ref.WeakReference;
 import java.util.HashMap;
 import java.util.LinkedList;
-import java.util.Locale;
 
 /**
  * Displays a list of call log entries.
@@ -95,8 +94,8 @@
             Calls.TYPE,
             Calls.CACHED_NAME,
             Calls.CACHED_NUMBER_TYPE,
-            Calls.CACHED_NUMBER_LABEL
-    };
+            Calls.CACHED_NUMBER_LABEL,
+            Calls.COUNTRY_ISO};
 
     static final int ID_COLUMN_INDEX = 0;
     static final int NUMBER_COLUMN_INDEX = 1;
@@ -106,6 +105,7 @@
     static final int CALLER_NAME_COLUMN_INDEX = 5;
     static final int CALLER_NUMBERTYPE_COLUMN_INDEX = 6;
     static final int CALLER_NUMBERLABEL_COLUMN_INDEX = 7;
+    static final int COUNTRY_ISO_COLUMN_INDEX = 8;
 
     /** The projection to use when querying the phones table */
     static final String[] PHONES_PROJECTION = new String[] {
@@ -113,18 +113,19 @@
             PhoneLookup.DISPLAY_NAME,
             PhoneLookup.TYPE,
             PhoneLookup.LABEL,
-            PhoneLookup.NUMBER
-    };
+            PhoneLookup.NUMBER,
+            PhoneLookup.NORMALIZED_NUMBER};
 
     static final int PERSON_ID_COLUMN_INDEX = 0;
     static final int NAME_COLUMN_INDEX = 1;
     static final int PHONE_TYPE_COLUMN_INDEX = 2;
     static final int LABEL_COLUMN_INDEX = 3;
     static final int MATCHED_NUMBER_COLUMN_INDEX = 4;
+    static final int NORMALIZED_NUMBER_COLUMN_INDEX = 5;
 
-    private static final int MENU_ITEM_DELETE_ALL = 1;
-    private static final int CONTEXT_MENU_ITEM_DELETE = 1;
-    private static final int CONTEXT_MENU_CALL_CONTACT = 2;
+    private static final int MENU_ITEM_DELETE = 1;
+    private static final int MENU_ITEM_DELETE_ALL = 2;
+    private static final int MENU_ITEM_VIEW_CONTACTS = 3;
 
     private static final int QUERY_TOKEN = 53;
     private static final int UPDATE_TOKEN = 54;
@@ -134,6 +135,7 @@
     RecentCallsAdapter mAdapter;
     private QueryHandler mQueryHandler;
     String mVoiceMailNumber;
+    private String mCurrentCountryIso;
 
     private boolean mScrollToTop;
 
@@ -144,6 +146,7 @@
         public String label;
         public String number;
         public String formattedNumber;
+        public String normalizedNumber;
 
         public static ContactInfo EMPTY = new ContactInfo();
     }
@@ -167,23 +170,6 @@
         String numberLabel;
     }
 
-    /**
-     * Shared builder used by {@link #formatPhoneNumber(String)} to minimize
-     * allocations when formatting phone numbers.
-     */
-    private static final SpannableStringBuilder sEditable = new SpannableStringBuilder();
-
-    /**
-     * Invalid formatting type constant for {@link #sFormattingType}.
-     */
-    private static final int FORMATTING_TYPE_INVALID = -1;
-
-    /**
-     * Cached formatting type for current {@link Locale}, as provided by
-     * {@link PhoneNumberUtils#getFormatTypeForLocale(Locale)}.
-     */
-    private static int sFormattingType = FORMATTING_TYPE_INVALID;
-
     /** Adapter class to fill in data for the Call Log */
     final class RecentCallsAdapter extends GroupingListAdapter
             implements Runnable, ViewTreeObserver.OnPreDrawListener, View.OnClickListener {
@@ -221,7 +207,6 @@
                 } else {
                     callUri = Uri.fromParts("tel", number, null);
                 }
-                StickyTabs.saveTab(RecentCallsListActivity.this, getIntent());
                 startActivity(new Intent(Intent.ACTION_CALL_PRIVILEGED, callUri));
             }
         }
@@ -415,6 +400,7 @@
                             // Note Data.DATA1 and SipAddress.SIP_ADDRESS are equivalent.
                             info.number = dataTableCursor.getString(
                                     dataTableCursor.getColumnIndex(Data.DATA1));
+                            info.normalizedNumber = null;  // meaningless for SIP addresses
 
                             infoUpdated = true;
                         }
@@ -426,7 +412,7 @@
                     Cursor phonesCursor =
                             RecentCallsListActivity.this.getContentResolver().query(
                                 Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI,
-                                                     Uri.encode(ciq.number)),
+                                        Uri.encode(ciq.number)),
                                 PHONES_PROJECTION, null, null, null);
                     if (phonesCursor != null) {
                         if (phonesCursor.moveToFirst()) {
@@ -436,6 +422,8 @@
                             info.type = phonesCursor.getInt(PHONE_TYPE_COLUMN_INDEX);
                             info.label = phonesCursor.getString(LABEL_COLUMN_INDEX);
                             info.number = phonesCursor.getString(MATCHED_NUMBER_COLUMN_INDEX);
+                            info.normalizedNumber =
+                                    phonesCursor.getString(NORMALIZED_NUMBER_COLUMN_INDEX);
 
                             infoUpdated = true;
                         }
@@ -623,7 +611,7 @@
             String callerName = c.getString(CALLER_NAME_COLUMN_INDEX);
             int callerNumberType = c.getInt(CALLER_NUMBERTYPE_COLUMN_INDEX);
             String callerNumberLabel = c.getString(CALLER_NUMBERLABEL_COLUMN_INDEX);
-
+            String countryIso = c.getString(COUNTRY_ISO_COLUMN_INDEX);
             // Store away the number so we can call it directly if you click on the call icon
             views.callView.setTag(number);
 
@@ -650,7 +638,8 @@
 
                 // Format and cache phone number for found contact
                 if (info.formattedNumber == null) {
-                    info.formattedNumber = formatPhoneNumber(info.number);
+                    info.formattedNumber =
+                            formatPhoneNumber(info.number, info.normalizedNumber, countryIso);
                 }
                 formattedNumber = info.formattedNumber;
             }
@@ -667,7 +656,7 @@
                 label = callerNumberLabel;
 
                 // Format the cached call_log phone number
-                formattedNumber = formatPhoneNumber(number);
+                formattedNumber = formatPhoneNumber(number, null, countryIso);
             }
             // Set the text lines and call icon.
             // Assumes the call back feature is on most of the
@@ -731,7 +720,7 @@
                     number = getString(R.string.voicemail);
                 } else {
                     // Just a raw number, and no cache, so format it nicely
-                    number = formatPhoneNumber(number);
+                    number = formatPhoneNumber(number, null, countryIso);
                 }
 
                 views.line1View.setText(number);
@@ -850,8 +839,7 @@
                 .getVoiceMailNumber();
         mQueryHandler = new QueryHandler(this);
 
-        // Reset locale-based formatting cache
-        sFormattingType = FORMATTING_TYPE_INVALID;
+        mCurrentCountryIso = ContactsUtils.getCurrentCountryIso(this);
     }
 
     @Override
@@ -914,36 +902,28 @@
     }
 
     /**
-     * Format the given phone number using
-     * {@link PhoneNumberUtils#formatNumber(android.text.Editable, int)}. This
-     * helper method uses {@link #sEditable} and {@link #sFormattingType} to
-     * prevent allocations between multiple calls.
-     * <p>
-     * Because of the shared {@link #sEditable} builder, <b>this method is not
-     * thread safe</b>, and should only be called from the GUI thread.
-     * <p>
-     * If the given String object is null or empty, return an empty String.
+     * Format the given phone number
+     *
+     * @param number the number to be formatted.
+     * @param normalizedNumber the normalized number of the given number.
+     * @param countryIso the ISO 3166-1 two letters country code, the country's
+     *        convention will be used to format the number if the normalized
+     *        phone is null.
+     *
+     * @return the formatted number, or the given number if it was formatted.
      */
-    private String formatPhoneNumber(String number) {
+    private String formatPhoneNumber(String number, String normalizedNumber, String countryIso) {
         if (TextUtils.isEmpty(number)) {
             return "";
         }
-
         // If "number" is really a SIP address, don't try to do any formatting at all.
         if (PhoneNumberUtils.isUriNumber(number)) {
             return number;
         }
-
-        // Cache formatting type if not already present
-        if (sFormattingType == FORMATTING_TYPE_INVALID) {
-            sFormattingType = PhoneNumberUtils.getFormatTypeForLocale(Locale.getDefault());
+        if (TextUtils.isEmpty(countryIso)) {
+            countryIso = mCurrentCountryIso;
         }
-
-        sEditable.clear();
-        sEditable.append(number);
-
-        PhoneNumberUtils.formatNumber(sEditable, sFormattingType);
-        return sEditable.toString();
+        return PhoneNumberUtils.formatNumber(number, normalizedNumber, countryIso);
     }
 
     private void resetNewCallsFlag() {
@@ -1017,16 +997,14 @@
 
         if (numberUri != null) {
             Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED, numberUri);
-            menu.add(0, CONTEXT_MENU_CALL_CONTACT, 0,
-                    getResources().getString(R.string.recentCalls_callNumber, number))
+            menu.add(0, 0, 0, getResources().getString(R.string.recentCalls_callNumber, number))
                     .setIntent(intent);
         }
 
         if (contactInfoPresent) {
-            Intent intent = new Intent(Intent.ACTION_VIEW,
-                    ContentUris.withAppendedId(Contacts.CONTENT_URI, info.personId));
-            StickyTabs.setTab(intent, getIntent());
-            menu.add(0, 0, 0, R.string.menu_viewContact).setIntent(intent);
+            menu.add(0, 0, 0, R.string.menu_viewContact)
+                    .setIntent(new Intent(Intent.ACTION_VIEW,
+                            ContentUris.withAppendedId(Contacts.CONTENT_URI, info.personId)));
         }
 
         if (numberUri != null && !isVoicemail && !isSipNumber) {
@@ -1055,7 +1033,7 @@
             menu.add(0, 0, 0, R.string.recentCalls_addToContact)
                     .setIntent(intent);
         }
-        menu.add(0, CONTEXT_MENU_ITEM_DELETE, 0, R.string.recentCalls_removeFromRecentList);
+        menu.add(0, MENU_ITEM_DELETE, 0, R.string.recentCalls_removeFromRecentList);
     }
 
     @Override
@@ -1089,23 +1067,30 @@
                 showDialog(DIALOG_CONFIRM_DELETE_ALL);
                 return true;
             }
+
+            case MENU_ITEM_VIEW_CONTACTS: {
+                Intent intent = new Intent(Intent.ACTION_VIEW, Contacts.CONTENT_URI);
+                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+                startActivity(intent);
+                return true;
+            }
         }
         return super.onOptionsItemSelected(item);
     }
 
     @Override
     public boolean onContextItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case CONTEXT_MENU_ITEM_DELETE: {
-                // Convert the menu info to the proper type
-                AdapterView.AdapterContextMenuInfo menuInfo;
-                try {
-                     menuInfo = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
-                } catch (ClassCastException e) {
-                    Log.e(TAG, "bad menuInfoIn", e);
-                    return false;
-                }
+        // Convert the menu info to the proper type
+        AdapterView.AdapterContextMenuInfo menuInfo;
+        try {
+             menuInfo = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
+        } catch (ClassCastException e) {
+            Log.e(TAG, "bad menuInfoIn", e);
+            return false;
+        }
 
+        switch (item.getItemId()) {
+            case MENU_ITEM_DELETE: {
                 Cursor cursor = (Cursor)mAdapter.getItem(menuInfo.position);
                 int groupSize = 1;
                 if (mAdapter.isGroupHeader(menuInfo.position)) {
@@ -1124,17 +1109,9 @@
 
                 getContentResolver().delete(Calls.CONTENT_URI, Calls._ID + " IN (" + sb + ")",
                         null);
-                return true;
-            }
-            case CONTEXT_MENU_CALL_CONTACT: {
-                StickyTabs.saveTab(this, getIntent());
-                startActivity(item.getIntent());
-                return true;
-            }
-            default: {
-                return super.onContextItemSelected(item);
             }
         }
+        return super.onContextItemSelected(item);
     }
 
     @Override
@@ -1253,7 +1230,6 @@
                 intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
                                     Uri.fromParts("tel", number, null));
             }
-            StickyTabs.saveTab(this, getIntent());
             intent.setFlags(
                     Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
             startActivity(intent);
@@ -1267,7 +1243,6 @@
         } else {
             Intent intent = new Intent(this, CallDetailActivity.class);
             intent.setData(ContentUris.withAppendedId(CallLog.Calls.CONTENT_URI, id));
-            StickyTabs.setTab(intent, getIntent());
             startActivity(intent);
         }
     }
diff --git a/src/com/android/contacts/ScrollingTabWidget.java b/src/com/android/contacts/ScrollingTabWidget.java
deleted file mode 100644
index b45abe4..0000000
--- a/src/com/android/contacts/ScrollingTabWidget.java
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- * Copyright (C) 2009 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.content.Context;
-import android.graphics.Canvas;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewTreeObserver;
-import android.view.View.OnClickListener;
-import android.view.View.OnFocusChangeListener;
-import android.widget.HorizontalScrollView;
-import android.widget.ImageView;
-import android.widget.RelativeLayout;
-
-/*
- * Tab widget that can contain more tabs than can fit on screen at once and scroll over them.
- */
-public class ScrollingTabWidget extends RelativeLayout
-        implements OnClickListener, ViewTreeObserver.OnGlobalFocusChangeListener,
-        OnFocusChangeListener {
-
-    private static final String TAG = "ScrollingTabWidget";
-
-    private OnTabSelectionChangedListener mSelectionChangedListener;
-    private int mSelectedTab = 0;
-    private ImageView mLeftArrowView;
-    private ImageView mRightArrowView;
-    private HorizontalScrollView mTabsScrollWrapper;
-    private TabStripView mTabsView;
-    private LayoutInflater mInflater;
-
-    // Keeps track of the left most visible tab.
-    private int mLeftMostVisibleTabIndex = 0;
-
-    public ScrollingTabWidget(Context context) {
-        this(context, null);
-    }
-
-    public ScrollingTabWidget(Context context, AttributeSet attrs) {
-        this(context, attrs, 0);
-    }
-
-    public ScrollingTabWidget(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs);
-
-        mInflater = (LayoutInflater) mContext.getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-
-        setFocusable(true);
-        setOnFocusChangeListener(this);
-        if (!hasFocus()) {
-            setDescendantFocusability(FOCUS_BLOCK_DESCENDANTS);
-        }
-
-        mLeftArrowView = (ImageView) mInflater.inflate(R.layout.tab_left_arrow, this, false);
-        mLeftArrowView.setOnClickListener(this);
-        mRightArrowView = (ImageView) mInflater.inflate(R.layout.tab_right_arrow, this, false);
-        mRightArrowView.setOnClickListener(this);
-        mTabsScrollWrapper = (HorizontalScrollView) mInflater.inflate(
-                R.layout.tab_layout, this, false);
-        mTabsView = (TabStripView) mTabsScrollWrapper.findViewById(android.R.id.tabs);
-        View accountNameView = mInflater.inflate(R.layout.tab_account_name, this, false);
-
-        mLeftArrowView.setVisibility(View.INVISIBLE);
-        mRightArrowView.setVisibility(View.INVISIBLE);
-
-        addView(mTabsScrollWrapper);
-        addView(mLeftArrowView);
-        addView(mRightArrowView);
-        addView(accountNameView);
-    }
-
-    @Override
-    protected void onAttachedToWindow() {
-        super.onAttachedToWindow();
-        final ViewTreeObserver treeObserver = getViewTreeObserver();
-        if (treeObserver != null) {
-            treeObserver.addOnGlobalFocusChangeListener(this);
-        }
-    }
-
-    @Override
-    protected void onDetachedFromWindow() {
-        super.onDetachedFromWindow();
-        final ViewTreeObserver treeObserver = getViewTreeObserver();
-        if (treeObserver != null) {
-            treeObserver.removeOnGlobalFocusChangeListener(this);
-        }
-    }
-
-    protected void updateArrowVisibility() {
-        int scrollViewLeftEdge = mTabsScrollWrapper.getScrollX();
-        int tabsViewLeftEdge = mTabsView.getLeft();
-        int scrollViewRightEdge = scrollViewLeftEdge + mTabsScrollWrapper.getWidth();
-        int tabsViewRightEdge = mTabsView.getRight();
-
-        int rightArrowCurrentVisibility = mRightArrowView.getVisibility();
-        if (scrollViewRightEdge == tabsViewRightEdge
-                && rightArrowCurrentVisibility == View.VISIBLE) {
-            mRightArrowView.setVisibility(View.INVISIBLE);
-        } else if (scrollViewRightEdge < tabsViewRightEdge
-                && rightArrowCurrentVisibility != View.VISIBLE) {
-            mRightArrowView.setVisibility(View.VISIBLE);
-        }
-
-        int leftArrowCurrentVisibility = mLeftArrowView.getVisibility();
-        if (scrollViewLeftEdge == tabsViewLeftEdge
-                && leftArrowCurrentVisibility == View.VISIBLE) {
-            mLeftArrowView.setVisibility(View.INVISIBLE);
-        } else if (scrollViewLeftEdge > tabsViewLeftEdge
-                && leftArrowCurrentVisibility != View.VISIBLE) {
-            mLeftArrowView.setVisibility(View.VISIBLE);
-        }
-    }
-
-    /**
-     * Returns the tab indicator view at the given index.
-     *
-     * @param index the zero-based index of the tab indicator view to return
-     * @return the tab indicator view at the given index
-     */
-    public View getChildTabViewAt(int index) {
-        return mTabsView.getChildAt(index);
-    }
-
-    /**
-     * Returns the number of tab indicator views.
-     *
-     * @return the number of tab indicator views.
-     */
-    public int getTabCount() {
-        return mTabsView.getChildCount();
-    }
-
-    /**
-     * Returns the {@link ViewGroup} that actually contains the tabs. This is where the tab
-     * views should be attached to when being inflated.
-     */
-    public ViewGroup getTabParent() {
-        return mTabsView;
-    }
-
-    public void removeAllTabs() {
-        mTabsView.removeAllViews();
-    }
-
-    @Override
-    public void dispatchDraw(Canvas canvas) {
-        updateArrowVisibility();
-        super.dispatchDraw(canvas);
-    }
-
-    /**
-     * Sets the current tab.
-     * This method is used to bring a tab to the front of the Widget,
-     * and is used to post to the rest of the UI that a different tab
-     * has been brought to the foreground.
-     *
-     * Note, this is separate from the traditional "focus" that is
-     * employed from the view logic.
-     *
-     * For instance, if we have a list in a tabbed view, a user may be
-     * navigating up and down the list, moving the UI focus (orange
-     * highlighting) through the list items.  The cursor movement does
-     * not effect the "selected" tab though, because what is being
-     * scrolled through is all on the same tab.  The selected tab only
-     * changes when we navigate between tabs (moving from the list view
-     * to the next tabbed view, in this example).
-     *
-     * To move both the focus AND the selected tab at once, please use
-     * {@link #focusCurrentTab}. Normally, the view logic takes care of
-     * adjusting the focus, so unless you're circumventing the UI,
-     * you'll probably just focus your interest here.
-     *
-     *  @param index The tab that you want to indicate as the selected
-     *  tab (tab brought to the front of the widget)
-     *
-     *  @see #focusCurrentTab
-     */
-    public void setCurrentTab(int index) {
-        if (index < 0 || index >= getTabCount()) {
-            return;
-        }
-
-        if (mSelectedTab < getTabCount()) {
-            mTabsView.setSelected(mSelectedTab, false);
-        }
-        mSelectedTab = index;
-        mTabsView.setSelected(mSelectedTab, true);
-    }
-
-    /**
-     * Return index of the currently selected tab.
-     */
-    public int getCurrentTab() {
-        return mSelectedTab;
-    }
-
-    /**
-     * Sets the current tab and focuses the UI on it.
-     * This method makes sure that the focused tab matches the selected
-     * tab, normally at {@link #setCurrentTab}.  Normally this would not
-     * be an issue if we go through the UI, since the UI is responsible
-     * for calling TabWidget.onFocusChanged(), but in the case where we
-     * are selecting the tab programmatically, we'll need to make sure
-     * focus keeps up.
-     *
-     *  @param index The tab that you want focused (highlighted in orange)
-     *  and selected (tab brought to the front of the widget)
-     *
-     *  @see #setCurrentTab
-     */
-    public void focusCurrentTab(int index) {
-        if (index < 0 || index >= getTabCount()) {
-            return;
-        }
-
-        setCurrentTab(index);
-        getChildTabViewAt(index).requestFocus();
-
-    }
-
-    /**
-     * Adds a tab to the list of tabs. The tab's indicator view is specified
-     * by a layout id. InflateException will be thrown if there is a problem
-     * inflating.
-     *
-     * @param layoutResId The layout id to be inflated to make the tab indicator.
-     */
-    public void addTab(int layoutResId) {
-        addTab(mInflater.inflate(layoutResId, mTabsView, false));
-    }
-
-    /**
-     * Adds a tab to the list of tabs. The tab's indicator view must be provided.
-     *
-     * @param child
-     */
-    public void addTab(View child) {
-        if (child == null) {
-            return;
-        }
-
-        if (child.getLayoutParams() == null) {
-            final LayoutParams lp = new LayoutParams(
-                    ViewGroup.LayoutParams.WRAP_CONTENT,
-                    ViewGroup.LayoutParams.WRAP_CONTENT);
-            lp.setMargins(0, 0, 0, 0);
-            child.setLayoutParams(lp);
-        }
-
-        // Ensure you can navigate to the tab with the keyboard, and you can touch it
-        child.setFocusable(true);
-        child.setClickable(true);
-        child.setOnClickListener(new TabClickListener());
-        child.setOnFocusChangeListener(this);
-
-        mTabsView.addView(child);
-    }
-
-    /**
-     * Provides a way for ViewContactActivity and EditContactActivity to be notified that the
-     * user clicked on a tab indicator.
-     */
-    public void setTabSelectionListener(OnTabSelectionChangedListener listener) {
-        mSelectionChangedListener = listener;
-    }
-
-    public void onGlobalFocusChanged(View oldFocus, View newFocus) {
-        if (isTab(oldFocus) && !isTab(newFocus)) {
-            onLoseFocus();
-        }
-    }
-
-    public void onFocusChange(View v, boolean hasFocus) {
-        if (v == this && hasFocus) {
-            onObtainFocus();
-            return;
-        }
-
-        if (hasFocus) {
-            for (int i = 0; i < getTabCount(); i++) {
-                if (getChildTabViewAt(i) == v) {
-                    setCurrentTab(i);
-                    mSelectionChangedListener.onTabSelectionChanged(i, false);
-                    break;
-                }
-            }
-        }
-    }
-
-    /**
-     * Called when the {@link ScrollingTabWidget} gets focus. Here the
-     * widget decides which of it's tabs should have focus.
-     */
-    protected void onObtainFocus() {
-        // Setting this flag, allows the children of this View to obtain focus.
-        setDescendantFocusability(FOCUS_AFTER_DESCENDANTS);
-        // Assign focus to the last selected tab.
-        focusCurrentTab(mSelectedTab);
-        mSelectionChangedListener.onTabSelectionChanged(mSelectedTab, false);
-    }
-
-    /**
-     * Called when the focus has left the {@link ScrollingTabWidget} or its
-     * descendants. At this time we want the children of this view to be marked
-     * as un-focusable, so that next time focus is moved to the widget, the widget
-     * gets control, and can assign focus where it wants.
-     */
-    protected void onLoseFocus() {
-        // Setting this flag will effectively make the tabs unfocusable. This will
-        // be toggled when the widget obtains focus again.
-        setDescendantFocusability(FOCUS_BLOCK_DESCENDANTS);
-    }
-
-    public boolean isTab(View v) {
-        for (int i = 0; i < getTabCount(); i++) {
-            if (getChildTabViewAt(i) == v) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private class TabClickListener implements OnClickListener {
-        public void onClick(View v) {
-            for (int i = 0; i < getTabCount(); i++) {
-                if (getChildTabViewAt(i) == v) {
-                    setCurrentTab(i);
-                    mSelectionChangedListener.onTabSelectionChanged(i, true);
-                    break;
-                }
-            }
-        }
-    }
-
-    public interface OnTabSelectionChangedListener {
-        /**
-         * Informs the tab widget host which tab was selected. It also indicates
-         * if the tab was clicked/pressed or just focused into.
-         *
-         * @param tabIndex index of the tab that was selected
-         * @param clicked whether the selection changed due to a touch/click
-         * or due to focus entering the tab through navigation. Pass true
-         * if it was due to a press/click and false otherwise.
-         */
-        void onTabSelectionChanged(int tabIndex, boolean clicked);
-    }
-
-    public void onClick(View v) {
-        updateLeftMostVisible();
-        if (v == mRightArrowView && (mLeftMostVisibleTabIndex + 1 < getTabCount())) {
-            tabScroll(true /* right */);
-        } else if (v == mLeftArrowView && mLeftMostVisibleTabIndex > 0) {
-            tabScroll(false /* left */);
-        }
-    }
-
-    /*
-     * Updates our record of the left most visible tab. We keep track of this explicitly
-     * on arrow clicks, but need to re-calibrate after focus navigation.
-     */
-    protected void updateLeftMostVisible() {
-        int viewableLeftEdge = mTabsScrollWrapper.getScrollX();
-
-        if (mLeftArrowView.getVisibility() == View.VISIBLE) {
-            viewableLeftEdge += mLeftArrowView.getWidth();
-        }
-
-        for (int i = 0; i < getTabCount(); i++) {
-            View tab = getChildTabViewAt(i);
-            int tabLeftEdge = tab.getLeft();
-            if (tabLeftEdge >= viewableLeftEdge) {
-                mLeftMostVisibleTabIndex = i;
-                break;
-            }
-        }
-    }
-
-    /**
-     * Scrolls the tabs by exactly one tab width.
-     *
-     * @param directionRight if true, scroll to the right, if false, scroll to the left.
-     */
-    protected void tabScroll(boolean directionRight) {
-        int scrollWidth = 0;
-        View newLeftMostVisibleTab = null;
-        if (directionRight) {
-            newLeftMostVisibleTab = getChildTabViewAt(++mLeftMostVisibleTabIndex);
-        } else {
-            newLeftMostVisibleTab = getChildTabViewAt(--mLeftMostVisibleTabIndex);
-        }
-
-        scrollWidth = newLeftMostVisibleTab.getLeft() - mTabsScrollWrapper.getScrollX();
-        if (mLeftMostVisibleTabIndex > 0) {
-            scrollWidth -= mLeftArrowView.getWidth();
-        }
-        mTabsScrollWrapper.smoothScrollBy(scrollWidth, 0);
-    }
-
-}
diff --git a/src/com/android/contacts/SearchEditText.java b/src/com/android/contacts/SearchEditText.java
deleted file mode 100644
index 7683f23..0000000
--- a/src/com/android/contacts/SearchEditText.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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;
-
-import android.content.Context;
-import android.graphics.drawable.Drawable;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-import android.widget.EditText;
-
-/**
- * A custom text editor that helps automatically dismiss the activity along with the soft
- * keyboard.
- */
-public class SearchEditText extends EditText {
-
-    private boolean mMagnifyingGlassShown = true;
-    private Drawable mMagnifyingGlass;
-
-    public SearchEditText(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mMagnifyingGlass = getCompoundDrawables()[2];
-    }
-
-    /**
-     * Conditionally shows a magnifying glass icon on the right side of the text field
-     * when the text it empty.
-     */
-    @Override
-    public boolean onPreDraw() {
-        boolean emptyText = TextUtils.isEmpty(getText());
-        if (mMagnifyingGlassShown != emptyText) {
-            mMagnifyingGlassShown = emptyText;
-            if (mMagnifyingGlassShown) {
-                setCompoundDrawables(null, null, mMagnifyingGlass, null);
-            } else {
-                setCompoundDrawables(null, null, null, null);
-            }
-            return false;
-        }
-        return super.onPreDraw();
-    }
-
-    /**
-     * Forwards the onKeyPreIme call to the view's activity.
-     */
-    @Override
-    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
-        if (((ContactsListActivity)getContext()).onKeyPreIme(keyCode, event)) {
-            return true;
-        }
-        return super.onKeyPreIme(keyCode, event);
-    }
-}
diff --git a/src/com/android/contacts/SearchResultsActivity.java b/src/com/android/contacts/SearchResultsActivity.java
deleted file mode 100644
index 09f0014..0000000
--- a/src/com/android/contacts/SearchResultsActivity.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2007 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;
-
-/**
- * The activity that displays the list of contact search results.  We need a separate
- * class because it uses a different theme from {@link ContactsListActivity}.
- */
-public class SearchResultsActivity extends ContactsListActivity {
-}
diff --git a/src/com/android/contacts/SplitAggregateView.java b/src/com/android/contacts/SplitAggregateView.java
index b85a4ab..a7a56b2 100644
--- a/src/com/android/contacts/SplitAggregateView.java
+++ b/src/com/android/contacts/SplitAggregateView.java
@@ -16,8 +16,8 @@
 
 package com.android.contacts;
 
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.Sources;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.AccountTypes;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
@@ -73,7 +73,7 @@
 
     private final Uri mAggregateUri;
     private OnContactSelectedListener mListener;
-    private Sources mSources;
+    private AccountTypes mSources;
 
     /**
      * Listener interface that gets the contact ID of the user-selected contact.
@@ -90,7 +90,7 @@
 
         mAggregateUri = aggregateUri;
 
-        mSources = Sources.getInstance(context);
+        mSources = AccountTypes.getInstance(context);
 
         final List<RawContactInfo> list = loadData();
 
@@ -247,8 +247,8 @@
             cache.additionalData.setText(info.getAdditionalData());
 
             Drawable icon = null;
-            ContactsSource source = mSources.getInflatedSource(info.accountType,
-                    ContactsSource.LEVEL_SUMMARY);
+            BaseAccountType source = mSources.getInflatedSource(info.accountType,
+                    BaseAccountType.LEVEL_SUMMARY);
             if (source != null) {
                 icon = source.getDisplayIcon(getContext());
             }
diff --git a/src/com/android/contacts/StickyTabs.java b/src/com/android/contacts/StickyTabs.java
deleted file mode 100644
index 4ecc970..0000000
--- a/src/com/android/contacts/StickyTabs.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.provider.ContactsContract.QuickContact;
-import android.util.Log;
-
-/**
- * Utility class to annotate Intents with extra data required for the Sticky-Tab behavior, which
- * allows storing the app to go to the last tab that was used to make a call. Also handles saving
- * and restoring the tab index
- */
-public final class StickyTabs {
-    private static final String TAG = "StickyTabs";
-    private static final boolean LOGV = false;
-
-    private static final String EXTRA_TAB_INDEX =
-            QuickContact.EXTRA_SELECTED_CONTACTS_APP_TAB_INDEX;
-
-    /**
-     * Name of the shared setting. We are using the same name as in FroYo to prevent
-     * having an orphan here
-     */
-    public static final String PREFERENCES_NAME = "dialtacts";
-
-    /**
-     * Name of the shared setting. We are using the same name as in FroYo to prevent
-     * having an orphan there
-     */
-    private static final String PREF_LAST_PHONECALL_TAB = "last_manually_selected_tab";
-
-    /**
-     * Writes the selected tab to the passed intent
-     * @param intent The intent to modify.
-     * @param tabIndex The tab index to write to the intent
-     * @return Returns the modified intent. Notice that this is not a new instance (the passed-in
-     * intent is modified)
-     */
-    public static Intent setTab(Intent intent, int tabIndex) {
-        if (LOGV) Log.v(TAG, "*********** Setting tab index of intent to " + tabIndex);
-
-        if (tabIndex == -1) {
-            intent.removeExtra(EXTRA_TAB_INDEX);
-        } else {
-            intent.putExtra(EXTRA_TAB_INDEX, tabIndex);
-        }
-        return intent;
-    }
-
-    /**
-     * Writes the selected tab to the passed intent by retrieving it from the originalIntent that
-     * was passed in
-     * @param intent The intent to modify.
-     * @param originalIntent The intent where the tab index should be read from
-     * @return Returns the modified intent. Notice that this is not a new instance (the passed-in
-     * intent is modified)
-     */
-    public static Intent setTab(Intent intent, Intent originalIntent) {
-        return setTab(intent, getTab(originalIntent));
-    }
-
-    /**
-     * Returns the selected tab or -1 if no tab is stored
-     */
-    public static int getTab(Intent intent) {
-        if (intent.getExtras() == null) return -1;
-        return intent.getExtras().getInt(EXTRA_TAB_INDEX, -1);
-    }
-
-    /**
-     * Persists the given tabIndex. If the value is -1, the previously persisted value is not
-     * overriden
-     */
-    public static void saveTab(Context context, int tabIndex) {
-        if (LOGV) Log.v(TAG, "*********** Persisting tab index " + tabIndex);
-        if (tabIndex == -1) return;
-
-        final SharedPreferences.Editor editor =
-            context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE).edit();
-        editor.putInt(PREF_LAST_PHONECALL_TAB, tabIndex);
-        editor.apply();
-    }
-
-    /**
-     * Persists the tab as it is stored in the Intent. If the intent does not have a tab index,
-     * the persisted value is not overriden
-     */
-    public static void saveTab(Context context, Intent intent) {
-        saveTab(context, getTab(intent));
-    }
-
-    /**
-     * Returns the previously persisted tab or defaultValue if nothing is saved
-     */
-    public static int loadTab(Context context, int defaultValue) {
-        final SharedPreferences prefs = context.getSharedPreferences(PREFERENCES_NAME,
-                Context.MODE_PRIVATE);
-        final int result = prefs.getInt(PREF_LAST_PHONECALL_TAB, defaultValue);
-        if (LOGV) Log.v(TAG, "*********** Loaded tab index: " + result);
-        return result;
-    }
-}
diff --git a/src/com/android/contacts/TextHighlightingAnimation.java b/src/com/android/contacts/TextHighlightingAnimation.java
deleted file mode 100644
index e35ae1e..0000000
--- a/src/com/android/contacts/TextHighlightingAnimation.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * 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;
-
-import com.android.internal.R;
-
-import android.database.CharArrayBuffer;
-import android.graphics.Color;
-import android.os.Handler;
-import android.text.Spanned;
-import android.text.TextPaint;
-import android.text.style.CharacterStyle;
-import android.view.animation.AccelerateInterpolator;
-import android.view.animation.DecelerateInterpolator;
-
-/**
- * An animation that alternately dims and brightens the non-highlighted portion of text.
- */
-public abstract class TextHighlightingAnimation implements Runnable {
-
-    private static final int MAX_ALPHA = 255;
-    private static final int MIN_ALPHA = 50;
-
-    private AccelerateInterpolator ACCELERATE_INTERPOLATOR = new AccelerateInterpolator();
-    private DecelerateInterpolator DECELERATE_INTERPOLATOR = new DecelerateInterpolator();
-
-    private final static DimmingSpan[] sEmptySpans = new DimmingSpan[0];
-
-    /**
-     * Frame rate expressed a number of millis between frames.
-     */
-    private static final long FRAME_RATE = 50;
-
-    private DimmingSpan mDimmingSpan;
-    private Handler mHandler;
-    private boolean mAnimating;
-    private boolean mDimming;
-    private long mTargetTime;
-    private final int mDuration;
-
-    /**
-     * A Spanned that highlights a part of text by dimming another part of that text.
-     */
-    public class TextWithHighlighting implements Spanned {
-
-        private final DimmingSpan[] mSpans;
-        private boolean mDimmingEnabled;
-        private CharArrayBuffer mText;
-        private int mDimmingSpanStart;
-        private int mDimmingSpanEnd;
-        private String mString;
-
-        public TextWithHighlighting() {
-            mSpans = new DimmingSpan[] { mDimmingSpan };
-        }
-
-        public void setText(CharArrayBuffer baseText, CharArrayBuffer highlightedText) {
-            mText = baseText;
-
-            // TODO figure out a way to avoid string allocation
-            mString = new String(mText.data, 0, mText.sizeCopied);
-
-            int index = indexOf(baseText, highlightedText);
-
-            if (index == 0 || index == -1) {
-                mDimmingEnabled = false;
-            } else {
-                mDimmingEnabled = true;
-                mDimmingSpanStart = 0;
-                mDimmingSpanEnd = index;
-            }
-        }
-
-        /**
-         * An implementation of indexOf on CharArrayBuffers that finds the first match of
-         * the start of buffer2 in buffer1.  For example, indexOf("abcd", "cdef") == 2
-         */
-        private int indexOf(CharArrayBuffer buffer1, CharArrayBuffer buffer2) {
-            char[] string1 = buffer1.data;
-            char[] string2 = buffer2.data;
-            int count1 = buffer1.sizeCopied;
-            int count2 = buffer2.sizeCopied;
-
-            // Ignore matching tails of the two buffers
-            while (count1 > 0 && count2 > 0 && string1[count1 - 1] == string2[count2 - 1]) {
-                count1--;
-                count2--;
-            }
-
-            int size = count2;
-            for (int i = 0; i < count1; i++) {
-                if (i + size > count1) {
-                    size = count1 - i;
-                }
-                int j;
-                for (j = 0; j < size; j++) {
-                    if (string1[i+j] != string2[j]) {
-                        break;
-                    }
-                }
-                if (j == size) {
-                    return i;
-                }
-            }
-
-            return -1;
-        }
-
-
-        @SuppressWarnings("unchecked")
-        public <T> T[] getSpans(int start, int end, Class<T> type) {
-            if (mDimmingEnabled) {
-                return (T[])mSpans;
-            } else {
-                return (T[])sEmptySpans;
-            }
-        }
-
-        public int getSpanStart(Object tag) {
-            // We only have one span - no need to check the tag parameter
-            return mDimmingSpanStart;
-        }
-
-        public int getSpanEnd(Object tag) {
-            // We only have one span - no need to check the tag parameter
-            return mDimmingSpanEnd;
-        }
-
-        public int getSpanFlags(Object tag) {
-            // String is immutable - flags not needed
-            return 0;
-        }
-
-        public int nextSpanTransition(int start, int limit, Class type) {
-            // Never called since we only have one span
-            return 0;
-        }
-
-        public char charAt(int index) {
-            return mText.data[index];
-        }
-
-        public int length() {
-            return mText.sizeCopied;
-        }
-
-        public CharSequence subSequence(int start, int end) {
-            // Never called - implementing for completeness
-            return new String(mText.data, start, end);
-        }
-
-        @Override
-        public String toString() {
-            return mString;
-        }
-    }
-
-    /**
-     * A Span that modifies alpha of the default foreground color.
-     */
-    private static class DimmingSpan extends CharacterStyle {
-        private int mAlpha;
-
-        public void setAlpha(int alpha) {
-            mAlpha = alpha;
-        }
-
-        @Override
-        public void updateDrawState(TextPaint ds) {
-
-            // Only dim the text in the basic state; not selected, focused or pressed
-            int[] states = ds.drawableState;
-            if (states != null) {
-                int count = states.length;
-                for (int i = 0; i < count; i++) {
-                    switch (states[i]) {
-                        case R.attr.state_pressed:
-                        case R.attr.state_selected:
-                        case R.attr.state_focused:
-                            // We can simply return, because the supplied text
-                            // paint is already configured with defaults.
-                            return;
-                    }
-                }
-            }
-
-            int color = ds.getColor();
-            color = Color.argb(mAlpha, Color.red(color), Color.green(color), Color.blue(color));
-            ds.setColor(color);
-        }
-    }
-
-    /**
-     * Constructor.
-     */
-    public TextHighlightingAnimation(int duration) {
-        mDuration = duration;
-        mHandler = new Handler();
-        mDimmingSpan = new DimmingSpan();
-        mDimmingSpan.setAlpha(MAX_ALPHA);
-    }
-
-    /**
-     * Returns a Spanned that can be used by a text view to show text with highlighting.
-     */
-    public TextWithHighlighting createTextWithHighlighting() {
-        return new TextWithHighlighting();
-    }
-
-    /**
-     * Override and invalidate (redraw) TextViews showing {@link TextWithHighlighting}.
-     */
-    protected abstract void invalidate();
-
-    /**
-     * Starts the highlighting animation, which will dim portions of text.
-     */
-    public void startHighlighting() {
-        startAnimation(true);
-    }
-
-    /**
-     * Starts un-highlighting animation, which will brighten the dimmed portions of text
-     * to the brightness level of the rest of text.
-     */
-    public void stopHighlighting() {
-        startAnimation(false);
-    }
-
-    /**
-     * Called when the animation starts.
-     */
-    protected void onAnimationStarted() {
-    }
-
-    /**
-     * Called when the animation has stopped.
-     */
-    protected void onAnimationEnded() {
-    }
-
-    private void startAnimation(boolean dim) {
-        if (mDimming != dim) {
-            mDimming = dim;
-            long now = System.currentTimeMillis();
-            if (!mAnimating) {
-                mAnimating = true;
-                mTargetTime = now + mDuration;
-                onAnimationStarted();
-                mHandler.post(this);
-            } else  {
-
-                // If we have started dimming, reverse the direction and adjust the target
-                // time accordingly.
-                mTargetTime = (now + mDuration) - (mTargetTime - now);
-            }
-        }
-    }
-
-    /**
-     * Animation step.
-     */
-    public void run() {
-        long now = System.currentTimeMillis();
-        long timeLeft = mTargetTime - now;
-        if (timeLeft < 0) {
-            mDimmingSpan.setAlpha(mDimming ? MIN_ALPHA : MAX_ALPHA);
-            mAnimating = false;
-            onAnimationEnded();
-            return;
-        }
-
-        // Start=1, end=0
-        float virtualTime = (float)timeLeft / mDuration;
-        if (mDimming) {
-            float interpolatedTime = DECELERATE_INTERPOLATOR.getInterpolation(virtualTime);
-            mDimmingSpan.setAlpha((int)(MIN_ALPHA + (MAX_ALPHA-MIN_ALPHA) * interpolatedTime));
-        } else {
-            float interpolatedTime = ACCELERATE_INTERPOLATOR.getInterpolation(virtualTime);
-            mDimmingSpan.setAlpha((int)(MIN_ALPHA + (MAX_ALPHA-MIN_ALPHA) * (1-interpolatedTime)));
-        }
-
-        invalidate();
-
-        // Repeat
-        mHandler.postDelayed(this, FRAME_RATE);
-    }
-}
diff --git a/src/com/android/contacts/TwelveKeyDialer.java b/src/com/android/contacts/TwelveKeyDialer.java
index 5219d99..b93375c 100644
--- a/src/com/android/contacts/TwelveKeyDialer.java
+++ b/src/com/android/contacts/TwelveKeyDialer.java
@@ -137,6 +137,8 @@
     /** Indicates if we are opening this dialer to add a call from the InCallScreen. */
     private boolean mIsAddCallMode;
 
+    private String mCurrentCountryIso;
+
     PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
             /**
              * Listen for phone state changes so that we can take down the
@@ -190,6 +192,7 @@
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
+        mCurrentCountryIso = ContactsUtils.getCurrentCountryIso(this);
         Resources r = getResources();
         // Do not show title in the case the device is in carmode.
         if ((r.getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK) ==
@@ -268,7 +271,7 @@
     }
 
     protected void maybeAddNumberFormatting() {
-        mDigits.addTextChangedListener(new PhoneNumberFormattingTextWatcher());
+        mDigits.addTextChangedListener(new PhoneNumberFormattingTextWatcher(mCurrentCountryIso));
     }
 
     /**
@@ -308,18 +311,19 @@
                 if ("tel".equals(uri.getScheme())) {
                     // Put the requested number into the input area
                     String data = uri.getSchemeSpecificPart();
-                    setFormattedDigits(data);
+                    setFormattedDigits(data, null);
                 } else {
                     String type = intent.getType();
                     if (People.CONTENT_ITEM_TYPE.equals(type)
                             || Phones.CONTENT_ITEM_TYPE.equals(type)) {
                         // Query the phone number
                         Cursor c = getContentResolver().query(intent.getData(),
-                                new String[] {PhonesColumns.NUMBER}, null, null, null);
+                                new String[] {PhonesColumns.NUMBER, PhonesColumns.NUMBER_KEY},
+                                null, null, null);
                         if (c != null) {
                             if (c.moveToFirst()) {
                                 // Put the number into the input area
-                                setFormattedDigits(c.getString(0));
+                                setFormattedDigits(c.getString(0), c.getString(1));
                             }
                             c.close();
                         }
@@ -359,10 +363,11 @@
         return ignoreState;
     }
 
-    protected void setFormattedDigits(String data) {
+    protected void setFormattedDigits(String data, String normalizedNumber) {
         // strip the non-dialable numbers out of the data string.
         String dialString = PhoneNumberUtils.extractNetworkPortion(data);
-        dialString = PhoneNumberUtils.formatNumber(dialString);
+        dialString =
+                PhoneNumberUtils.formatNumber(dialString, normalizedNumber, mCurrentCountryIso);
         if (!TextUtils.isEmpty(dialString)) {
             Editable digits = mDigits.getText();
             digits.replace(0, digits.length(), dialString);
@@ -617,25 +622,6 @@
     public boolean onKeyUp(int keyCode, KeyEvent event) {
         switch (keyCode) {
             case KeyEvent.KEYCODE_CALL: {
-                // TODO: In dialButtonPressed we do some of these
-                // tests again. We should try to consolidate them in
-                // one place.
-                if (!phoneIsCdma() && mIsAddCallMode && isDigitsEmpty()) {
-                    // For CDMA phones, we always call
-                    // dialButtonPressed() because we may need to send
-                    // an empty flash command to the network.
-                    // Otherwise, if we are adding a call from the
-                    // InCallScreen and the phone number entered is
-                    // empty, we just close the dialer to expose the
-                    // InCallScreen under it.
-                    finish();
-                }
-
-                // If we're CDMA, regardless of where we are adding a call from (either
-                // InCallScreen or Dialtacts), the user may need to send an empty
-                // flash command to the network. So let's call dialButtonPressed() regardless
-                // and dialButtonPressed will handle this functionality for us.
-                // otherwise, we place the call.
                 dialButtonPressed();
                 return true;
             }
@@ -774,54 +760,55 @@
     }
 
     void callVoicemail() {
-        StickyTabs.saveTab(this, getIntent());
-        Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
-                Uri.fromParts("voicemail", EMPTY_NUMBER, null));
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        startActivity(intent);
-        mDigits.getText().clear();
+        startActivity(newVoicemailIntent());
+        mDigits.getText().clear(); // TODO: Fix bug 1745781
         finish();
     }
 
+    /**
+     * In most cases, when the dial button is pressed, there is a
+     * number in digits area. Pack it in the intent, start the
+     * outgoing call broadcast as a separate task and finish this
+     * activity.
+     *
+     * When there is no digit and the phone is CDMA and off hook,
+     * we're sending a blank flash for CDMA. CDMA networks use Flash
+     * messages when special processing needs to be done, mainly for
+     * 3-way or call waiting scenarios. Presumably, here we're in a
+     * special 3-way scenario where the network needs a blank flash
+     * before being able to add the new participant.  (This is not the
+     * case with all 3-way calls, just certain CDMA infrastructures.)
+     *
+     * Otherwise, there is no digit, display the last dialed
+     * number. Don't finish since the user may want to edit it. The
+     * user needs to press the dial button again, to dial it (general
+     * case described above).
+     */
     void dialButtonPressed() {
-        final String number = mDigits.getText().toString();
-        boolean sendEmptyFlash = false;
-        Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED);
-
-        if (isDigitsEmpty()) { // There is no number entered.
+        if (isDigitsEmpty()) { // No number entered.
             if (phoneIsCdma() && phoneIsOffhook()) {
-                // On CDMA phones, if we're already on a call, pressing
-                // the Dial button without entering any digits means "send
-                // an empty flash."
-                intent.setData(Uri.fromParts("tel", EMPTY_NUMBER, null));
-                intent.putExtra(EXTRA_SEND_EMPTY_FLASH, true);
-                sendEmptyFlash = true;
-            } else if (!TextUtils.isEmpty(mLastNumberDialed)) {
-                // Otherwise, pressing the Dial button without entering
-                // any digits means "recall the last number dialed".
-                mDigits.setText(mLastNumberDialed);
-                return;
+                // This is really CDMA specific. On GSM is it possible
+                // to be off hook and wanted to add a 3rd party using
+                // the redial feature.
+                startActivity(newFlashIntent());
             } else {
-                // Rare case: there's no "last number dialed".  There's
-                // nothing useful for the Dial button to do in this case.
-                playTone(ToneGenerator.TONE_PROP_NACK);
-                return;
+                if (!TextUtils.isEmpty(mLastNumberDialed)) {
+                    mDigits.setText(mLastNumberDialed);
+                } else {
+                    // There's no "last number dialed" or the
+                    // background query is still running. There's
+                    // nothing useful for the Dial button to do in
+                    // this case.  Note: with a soft dial button, this
+                    // can never happens since the dial button is
+                    // disabled under these conditons.
+                    playTone(ToneGenerator.TONE_PROP_NACK);
+                }
             }
-        } else {  // There is a number.
-            intent.setData(Uri.fromParts("tel", number, null));
-        }
+        } else {
+            final String number = mDigits.getText().toString();
 
-        StickyTabs.saveTab(this, getIntent());
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        startActivity(intent);
-        mDigits.getText().clear();
-
-        // Don't finish TwelveKeyDialer yet if we're sending a blank flash for CDMA. CDMA
-        // networks use Flash messages when special processing needs to be done, mainly for
-        // 3-way or call waiting scenarios. Presumably, here we're in a special 3-way scenario
-        // where the network needs a blank flash before being able to add the new participant.
-        // (This is not the case with all 3-way calls, just certain CDMA infrastructures.)
-        if (!sendEmptyFlash) {
+            startActivity(newDialNumberIntent(number));
+            mDigits.getText().clear();  // TODO: Fix bug 1745781
             finish();
         }
     }
@@ -1269,4 +1256,25 @@
             ContactsSearchManager.startSearch(this, initialQuery);
         }
     }
+
+    // Helpers for the call intents.
+    private Intent newVoicemailIntent() {
+        final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                                         Uri.fromParts("voicemail", EMPTY_NUMBER, null));
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        return intent;
+    }
+
+    private Intent newFlashIntent() {
+        final Intent intent = newDialNumberIntent(EMPTY_NUMBER);
+        intent.putExtra(EXTRA_SEND_EMPTY_FLASH, true);
+        return intent;
+    }
+
+    private Intent newDialNumberIntent(String number) {
+        final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                                         Uri.fromParts("tel", number, null));
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        return intent;
+    }
 }
diff --git a/src/com/android/contacts/ViewContactActivity.java b/src/com/android/contacts/ViewContactActivity.java
deleted file mode 100644
index eeb0a0d..0000000
--- a/src/com/android/contacts/ViewContactActivity.java
+++ /dev/null
@@ -1,1388 +0,0 @@
-/*
- * Copyright (C) 2007 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 com.android.contacts.Collapser.Collapsible;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.Sources;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.ui.EditContactActivity;
-import com.android.contacts.util.Constants;
-import com.android.contacts.util.DataStatus;
-import com.android.contacts.util.NotifyingAsyncQueryHandler;
-import com.android.internal.telephony.ITelephony;
-import com.android.internal.widget.ContactHeaderWidget;
-import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.ActivityNotFoundException;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Entity;
-import android.content.EntityIterator;
-import android.content.Intent;
-import android.content.Entity.NamedContentValues;
-import android.content.res.Resources;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.graphics.drawable.Drawable;
-import android.net.ParseException;
-import android.net.Uri;
-import android.net.WebAddress;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.provider.ContactsContract;
-import android.provider.ContactsContract.AggregationExceptions;
-import android.provider.ContactsContract.CommonDataKinds;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.DisplayNameSources;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.RawContactsEntity;
-import android.provider.ContactsContract.StatusUpdates;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Im;
-import android.provider.ContactsContract.CommonDataKinds.Nickname;
-import android.provider.ContactsContract.CommonDataKinds.Note;
-import android.provider.ContactsContract.CommonDataKinds.Organization;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.SipAddress;
-import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
-import android.provider.ContactsContract.CommonDataKinds.Website;
-import android.telephony.PhoneNumberUtils;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.ContextMenu;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.Window;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.widget.AdapterView;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * Displays the details of a specific contact.
- */
-public class ViewContactActivity extends Activity
-        implements View.OnCreateContextMenuListener, DialogInterface.OnClickListener,
-        AdapterView.OnItemClickListener, NotifyingAsyncQueryHandler.AsyncQueryListener {
-    private static final String TAG = "ViewContact";
-
-    private static final boolean SHOW_SEPARATORS = false;
-
-    private static final int DIALOG_CONFIRM_DELETE = 1;
-    private static final int DIALOG_CONFIRM_READONLY_DELETE = 2;
-    private static final int DIALOG_CONFIRM_MULTIPLE_DELETE = 3;
-    private static final int DIALOG_CONFIRM_READONLY_HIDE = 4;
-
-    private static final int REQUEST_JOIN_CONTACT = 1;
-    private static final int REQUEST_EDIT_CONTACT = 2;
-
-    public static final int MENU_ITEM_MAKE_DEFAULT = 3;
-    public static final int MENU_ITEM_CALL = 4;
-
-    protected Uri mLookupUri;
-    private ContentResolver mResolver;
-    private ViewAdapter mAdapter;
-    private int mNumPhoneNumbers = 0;
-
-    /**
-     * A list of distinct contact IDs included in the current contact.
-     */
-    private ArrayList<Long> mRawContactIds = new ArrayList<Long>();
-
-    /* package */ ArrayList<ViewEntry> mPhoneEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mSmsEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mEmailEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mPostalEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mImEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mNicknameEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mOrganizationEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mGroupEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ViewEntry> mOtherEntries = new ArrayList<ViewEntry>();
-    /* package */ ArrayList<ArrayList<ViewEntry>> mSections = new ArrayList<ArrayList<ViewEntry>>();
-
-    private Cursor mCursor;
-
-    protected ContactHeaderWidget mContactHeaderWidget;
-    private NotifyingAsyncQueryHandler mHandler;
-
-    protected LayoutInflater mInflater;
-
-    protected int mReadOnlySourcesCnt;
-    protected int mWritableSourcesCnt;
-    protected boolean mAllRestricted;
-
-    protected Uri mPrimaryPhoneUri = null;
-
-    protected ArrayList<Long> mWritableRawContactIds = new ArrayList<Long>();
-
-    private static final int TOKEN_ENTITIES = 0;
-    private static final int TOKEN_STATUSES = 1;
-
-    private boolean mHasEntities = false;
-    private boolean mHasStatuses = false;
-
-    private long mNameRawContactId = -1;
-    private int mDisplayNameSource = DisplayNameSources.UNDEFINED;
-
-    private ArrayList<Entity> mEntities = Lists.newArrayList();
-    private HashMap<Long, DataStatus> mStatuses = Maps.newHashMap();
-
-    /**
-     * The view shown if the detail list is empty.
-     * We set this to the list view when first bind the adapter, so that it won't be shown while
-     * we're loading data.
-     */
-    private View mEmptyView;
-
-    private ContentObserver mObserver = new ContentObserver(new Handler()) {
-        @Override
-        public boolean deliverSelfNotifications() {
-            return true;
-        }
-
-        @Override
-        public void onChange(boolean selfChange) {
-            if (mCursor != null && !mCursor.isClosed()) {
-                startEntityQuery();
-            }
-        }
-    };
-
-    public void onClick(DialogInterface dialog, int which) {
-        closeCursor();
-        getContentResolver().delete(mLookupUri, null, null);
-        finish();
-    }
-
-    private ListView mListView;
-    private boolean mShowSmsLinksForAllPhones;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        final Intent intent = getIntent();
-        Uri data = intent.getData();
-        String authority = data.getAuthority();
-        if (ContactsContract.AUTHORITY.equals(authority)) {
-            mLookupUri = data;
-        } else if (android.provider.Contacts.AUTHORITY.equals(authority)) {
-            final long rawContactId = ContentUris.parseId(data);
-            mLookupUri = RawContacts.getContactLookupUri(getContentResolver(),
-                    ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
-
-        }
-        mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        setContentView(R.layout.contact_card_layout);
-
-        mContactHeaderWidget = (ContactHeaderWidget) findViewById(R.id.contact_header_widget);
-        mContactHeaderWidget.showStar(true);
-        mContactHeaderWidget.setExcludeMimes(new String[] {
-            Contacts.CONTENT_ITEM_TYPE
-        });
-        mContactHeaderWidget.setSelectedContactsAppTabIndex(StickyTabs.getTab(getIntent()));
-
-        mHandler = new NotifyingAsyncQueryHandler(this, this);
-
-        mListView = (ListView) findViewById(R.id.contact_data);
-        mListView.setOnCreateContextMenuListener(this);
-        mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
-        mListView.setOnItemClickListener(this);
-        // Don't set it to mListView yet.  We do so later when we bind the adapter.
-        mEmptyView = findViewById(android.R.id.empty);
-
-        mResolver = getContentResolver();
-
-        // Build the list of sections. The order they're added to mSections dictates the
-        // order they are displayed in the list.
-        mSections.add(mPhoneEntries);
-        mSections.add(mSmsEntries);
-        mSections.add(mEmailEntries);
-        mSections.add(mImEntries);
-        mSections.add(mPostalEntries);
-        mSections.add(mNicknameEntries);
-        mSections.add(mOrganizationEntries);
-        mSections.add(mGroupEntries);
-        mSections.add(mOtherEntries);
-
-        //TODO Read this value from a preference
-        mShowSmsLinksForAllPhones = true;
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        startEntityQuery();
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        closeCursor();
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        closeCursor();
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int id) {
-        switch (id) {
-            case DIALOG_CONFIRM_DELETE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.deleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok, this)
-                        .setCancelable(false)
-                        .create();
-            case DIALOG_CONFIRM_READONLY_DELETE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.readOnlyContactDeleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok, this)
-                        .setCancelable(false)
-                        .create();
-            case DIALOG_CONFIRM_MULTIPLE_DELETE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.multipleContactDeleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok, this)
-                        .setCancelable(false)
-                        .create();
-            case DIALOG_CONFIRM_READONLY_HIDE: {
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.readOnlyContactWarning)
-                        .setPositiveButton(android.R.string.ok, this)
-                        .create();
-            }
-
-        }
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    public void onQueryComplete(int token, Object cookie, final Cursor cursor) {
-        if (token == TOKEN_STATUSES) {
-            try {
-                // Read available social rows and consider binding
-                readStatuses(cursor);
-            } finally {
-                if (cursor != null) {
-                    cursor.close();
-                }
-            }
-            considerBindData();
-            return;
-        }
-
-        // One would think we could just iterate over the Cursor
-        // directly here, as the result set should be small, and we've
-        // already run the query in an AsyncTask, but a lot of ANRs
-        // were being reported in this code nonetheless.  See bug
-        // 2539603 for details.  The real bug which makes this result
-        // set huge and CPU-heavy may be elsewhere.
-        // TODO: if we keep this async, perhaps the entity iteration
-        // should also be original AsyncTask, rather than ping-ponging
-        // between threads like this.
-        final ArrayList<Entity> oldEntities = mEntities;
-        (new AsyncTask<Void, Void, ArrayList<Entity>>() {
-            @Override
-            protected ArrayList<Entity> doInBackground(Void... params) {
-                ArrayList<Entity> newEntities = new ArrayList<Entity>(cursor.getCount());
-                EntityIterator iterator = RawContacts.newEntityIterator(cursor);
-                try {
-                    while (iterator.hasNext()) {
-                        Entity entity = iterator.next();
-                        newEntities.add(entity);
-                    }
-                } finally {
-                    iterator.close();
-                }
-                return newEntities;
-            }
-
-            @Override
-            protected void onPostExecute(ArrayList<Entity> newEntities) {
-                if (newEntities == null) {
-                    // There was an error loading.
-                    return;
-                }
-                synchronized (ViewContactActivity.this) {
-                    if (mEntities != oldEntities) {
-                        // Multiple async tasks were in flight and we
-                        // lost the race.
-                        return;
-                    }
-                    mEntities = newEntities;
-                    mHasEntities = true;
-                }
-                considerBindData();
-            }
-        }).execute();
-    }
-
-    private long getRefreshedContactId() {
-        Uri freshContactUri = Contacts.lookupContact(getContentResolver(), mLookupUri);
-        if (freshContactUri != null) {
-            return ContentUris.parseId(freshContactUri);
-        }
-        return -1;
-    }
-
-    /**
-     * Read from the given {@link Cursor} and build a set of {@link DataStatus}
-     * objects to match any valid statuses found.
-     */
-    private synchronized void readStatuses(Cursor cursor) {
-        mStatuses.clear();
-
-        // Walk found statuses, creating internal row for each
-        while (cursor.moveToNext()) {
-            final DataStatus status = new DataStatus(cursor);
-            final long dataId = cursor.getLong(StatusQuery._ID);
-            mStatuses.put(dataId, status);
-        }
-
-        mHasStatuses = true;
-    }
-
-    private static Cursor setupContactCursor(ContentResolver resolver, Uri lookupUri) {
-        if (lookupUri == null) {
-            return null;
-        }
-        final List<String> segments = lookupUri.getPathSegments();
-        if (segments.size() != 4) {
-            return null;
-        }
-
-        // Contains an Id.
-        final long uriContactId = Long.parseLong(segments.get(3));
-        final String uriLookupKey = Uri.encode(segments.get(2));
-        final Uri dataUri = Uri.withAppendedPath(
-                ContentUris.withAppendedId(Contacts.CONTENT_URI, uriContactId),
-                Contacts.Data.CONTENT_DIRECTORY);
-
-        // This cursor has several purposes:
-        // - Fetch NAME_RAW_CONTACT_ID and DISPLAY_NAME_SOURCE
-        // - Fetch the lookup-key to ensure we are looking at the right record
-        // - Watcher for change events
-        Cursor cursor = resolver.query(dataUri,
-                new String[] {
-                    Contacts.NAME_RAW_CONTACT_ID,
-                    Contacts.DISPLAY_NAME_SOURCE,
-                    Contacts.LOOKUP_KEY
-                }, null, null, null);
-
-        if (cursor.moveToFirst()) {
-            String lookupKey =
-                    cursor.getString(cursor.getColumnIndex(Contacts.LOOKUP_KEY));
-            if (!lookupKey.equals(uriLookupKey)) {
-                // ID and lookup key do not match
-                cursor.close();
-                return null;
-            }
-            return cursor;
-        } else {
-            cursor.close();
-            return null;
-        }
-    }
-
-    private synchronized void startEntityQuery() {
-        closeCursor();
-
-        // Interprete mLookupUri
-        mCursor = setupContactCursor(mResolver, mLookupUri);
-
-        // If mCursor is null now we did not succeed in using the Uri's Id (or it didn't contain
-        // a Uri). Instead we now have to use the lookup key to find the record
-        if (mCursor == null) {
-            mLookupUri = Contacts.getLookupUri(getContentResolver(), mLookupUri);
-            mCursor = setupContactCursor(mResolver, mLookupUri);
-        }
-
-        // If mCursor is still null, we were unsuccessful in finding the record
-        if (mCursor == null) {
-            mNameRawContactId = -1;
-            mDisplayNameSource = DisplayNameSources.UNDEFINED;
-            // TODO either figure out a way to prevent a flash of black background or
-            // use some other UI than a toast
-            Toast.makeText(this, R.string.invalidContactMessage, Toast.LENGTH_SHORT).show();
-            Log.e(TAG, "invalid contact uri: " + mLookupUri);
-            finish();
-            return;
-        }
-
-        final long contactId = ContentUris.parseId(mLookupUri);
-
-        mNameRawContactId =
-                mCursor.getLong(mCursor.getColumnIndex(Contacts.NAME_RAW_CONTACT_ID));
-        mDisplayNameSource =
-                mCursor.getInt(mCursor.getColumnIndex(Contacts.DISPLAY_NAME_SOURCE));
-
-        mCursor.registerContentObserver(mObserver);
-
-        // Clear flags and start queries to data and status
-        mHasEntities = false;
-        mHasStatuses = false;
-
-        mHandler.startQuery(TOKEN_ENTITIES, null, RawContactsEntity.CONTENT_URI, null,
-                RawContacts.CONTACT_ID + "=?", new String[] {
-                    String.valueOf(contactId)
-                }, null);
-        final Uri dataUri = Uri.withAppendedPath(
-                ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId),
-                Contacts.Data.CONTENT_DIRECTORY);
-        mHandler.startQuery(TOKEN_STATUSES, null, dataUri, StatusQuery.PROJECTION,
-                        StatusUpdates.PRESENCE + " IS NOT NULL OR " + StatusUpdates.STATUS
-                                + " IS NOT NULL", null, null);
-
-        mContactHeaderWidget.bindFromContactLookupUri(mLookupUri);
-    }
-
-    private void closeCursor() {
-        if (mCursor != null) {
-            mCursor.unregisterContentObserver(mObserver);
-            mCursor.close();
-            mCursor = null;
-        }
-    }
-
-    /**
-     * Consider binding views after any of several background queries has
-     * completed. We check internal flags and only bind when all data has
-     * arrived.
-     */
-    private void considerBindData() {
-        if (mHasEntities && mHasStatuses) {
-            bindData();
-        }
-    }
-
-    private void bindData() {
-
-        // Build up the contact entries
-        buildEntries();
-
-        // Collapse similar data items in select sections.
-        Collapser.collapseList(mPhoneEntries);
-        Collapser.collapseList(mSmsEntries);
-        Collapser.collapseList(mEmailEntries);
-        Collapser.collapseList(mPostalEntries);
-        Collapser.collapseList(mImEntries);
-
-        if (mAdapter == null) {
-            mAdapter = new ViewAdapter(this, mSections);
-            mListView.setAdapter(mAdapter);
-        } else {
-            mAdapter.setSections(mSections, SHOW_SEPARATORS);
-        }
-        mListView.setEmptyView(mEmptyView);
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-
-        final MenuInflater inflater = getMenuInflater();
-        inflater.inflate(R.menu.view, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        super.onPrepareOptionsMenu(menu);
-
-        // Only allow edit when we have at least one raw_contact id
-        final boolean hasRawContact = (mRawContactIds.size() > 0);
-        menu.findItem(R.id.menu_edit).setEnabled(hasRawContact);
-
-        // Only allow share when unrestricted contacts available
-        menu.findItem(R.id.menu_share).setEnabled(!mAllRestricted);
-
-        return true;
-    }
-
-    @Override
-    public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
-        AdapterView.AdapterContextMenuInfo info;
-        try {
-             info = (AdapterView.AdapterContextMenuInfo) menuInfo;
-        } catch (ClassCastException e) {
-            Log.e(TAG, "bad menuInfo", e);
-            return;
-        }
-
-        // This can be null sometimes, don't crash...
-        if (info == null) {
-            Log.e(TAG, "bad menuInfo");
-            return;
-        }
-
-        ViewEntry entry = ContactEntryAdapter.getEntry(mSections, info.position, SHOW_SEPARATORS);
-        menu.setHeaderTitle(R.string.contactOptionsTitle);
-        if (entry.mimetype.equals(CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
-            menu.add(0, MENU_ITEM_CALL, 0, R.string.menu_call).setIntent(entry.intent);
-            menu.add(0, 0, 0, R.string.menu_sendSMS).setIntent(entry.secondaryIntent);
-            if (!entry.isPrimary) {
-                menu.add(0, MENU_ITEM_MAKE_DEFAULT, 0, R.string.menu_makeDefaultNumber);
-            }
-        } else if (entry.mimetype.equals(CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {
-            menu.add(0, 0, 0, R.string.menu_sendEmail).setIntent(entry.intent);
-            if (!entry.isPrimary) {
-                menu.add(0, MENU_ITEM_MAKE_DEFAULT, 0, R.string.menu_makeDefaultEmail);
-            }
-        } else if (entry.mimetype.equals(CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)) {
-            menu.add(0, 0, 0, R.string.menu_viewAddress).setIntent(entry.intent);
-        }
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.menu_edit: {
-                Long rawContactIdToEdit = null;
-                if (mRawContactIds.size() > 0) {
-                    rawContactIdToEdit = mRawContactIds.get(0);
-                } else {
-                    // There is no rawContact to edit.
-                    break;
-                }
-                Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI,
-                        rawContactIdToEdit);
-                startActivityForResult(new Intent(Intent.ACTION_EDIT, rawContactUri),
-                        REQUEST_EDIT_CONTACT);
-                break;
-            }
-            case R.id.menu_delete: {
-                // Get confirmation
-                if (mReadOnlySourcesCnt > 0 & mWritableSourcesCnt > 0) {
-                    showDialog(DIALOG_CONFIRM_READONLY_DELETE);
-                } else if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt == 0) {
-                    showDialog(DIALOG_CONFIRM_READONLY_HIDE);
-                } else if (mReadOnlySourcesCnt == 0 && mWritableSourcesCnt > 1) {
-                    showDialog(DIALOG_CONFIRM_MULTIPLE_DELETE);
-                } else {
-                    showDialog(DIALOG_CONFIRM_DELETE);
-                }
-                return true;
-            }
-            case R.id.menu_join: {
-                showJoinAggregateActivity();
-                return true;
-            }
-            case R.id.menu_options: {
-                showOptionsActivity();
-                return true;
-            }
-            case R.id.menu_share: {
-                if (mAllRestricted) return false;
-
-                // TODO: Keep around actual LOOKUP_KEY, or formalize method of extracting
-                final String lookupKey = Uri.encode(mLookupUri.getPathSegments().get(2));
-                final Uri shareUri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
-
-                final Intent intent = new Intent(Intent.ACTION_SEND);
-                intent.setType(Contacts.CONTENT_VCARD_TYPE);
-                intent.putExtra(Intent.EXTRA_STREAM, shareUri);
-
-                // Launch chooser to share contact via
-                final CharSequence chooseTitle = getText(R.string.share_via);
-                final Intent chooseIntent = Intent.createChooser(intent, chooseTitle);
-
-                try {
-                    startActivity(chooseIntent);
-                } catch (ActivityNotFoundException ex) {
-                    Toast.makeText(this, R.string.share_error, Toast.LENGTH_SHORT).show();
-                }
-                return true;
-            }
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-    @Override
-    public boolean onContextItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case MENU_ITEM_MAKE_DEFAULT: {
-                makeItemDefault(item);
-                return true;
-            }
-            case MENU_ITEM_CALL: {
-                StickyTabs.saveTab(this, getIntent());
-                startActivity(item.getIntent());
-                return true;
-            }
-            default: {
-                return super.onContextItemSelected(item);
-            }
-        }
-    }
-
-    private boolean makeItemDefault(MenuItem item) {
-        ViewEntry entry = getViewEntryForMenuItem(item);
-        if (entry == null) {
-            return false;
-        }
-
-        // Update the primary values in the data record.
-        ContentValues values = new ContentValues(1);
-        values.put(Data.IS_SUPER_PRIMARY, 1);
-        getContentResolver().update(ContentUris.withAppendedId(Data.CONTENT_URI, entry.id),
-                values, null, null);
-        startEntityQuery();
-        return true;
-    }
-
-    /**
-     * Shows a list of aggregates that can be joined into the currently viewed aggregate.
-     */
-    public void showJoinAggregateActivity() {
-        long freshId = getRefreshedContactId();
-        if (freshId > 0) {
-            String displayName = null;
-            if (mCursor.moveToFirst()) {
-                displayName = mCursor.getString(0);
-            }
-            Intent intent = new Intent(ContactsListActivity.JOIN_AGGREGATE);
-            intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_ID, freshId);
-            if (displayName != null) {
-                intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_NAME, displayName);
-            }
-            startActivityForResult(intent, REQUEST_JOIN_CONTACT);
-        }
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
-        if (requestCode == REQUEST_JOIN_CONTACT) {
-            if (resultCode == RESULT_OK && intent != null) {
-                final long contactId = ContentUris.parseId(intent.getData());
-                joinAggregate(contactId);
-            }
-        } else if (requestCode == REQUEST_EDIT_CONTACT) {
-            if (resultCode == EditContactActivity.RESULT_CLOSE_VIEW_ACTIVITY) {
-                finish();
-            } else if (resultCode == Activity.RESULT_OK) {
-                mLookupUri = intent.getData();
-                if (mLookupUri == null) {
-                    finish();
-                }
-            }
-        }
-    }
-
-    private void joinAggregate(final long contactId) {
-        Cursor c = mResolver.query(RawContacts.CONTENT_URI, new String[] {RawContacts._ID},
-                RawContacts.CONTACT_ID + "=" + contactId, null, null);
-
-        try {
-            while(c.moveToNext()) {
-                long rawContactId = c.getLong(0);
-                setAggregationException(rawContactId, AggregationExceptions.TYPE_KEEP_TOGETHER);
-            }
-        } finally {
-            c.close();
-        }
-
-        Toast.makeText(this, R.string.contactsJoinedMessage, Toast.LENGTH_LONG).show();
-        startEntityQuery();
-    }
-
-    /**
-     * Given a contact ID sets an aggregation exception to either join the contact with the
-     * current aggregate or split off.
-     */
-    protected void setAggregationException(long rawContactId, int exceptionType) {
-        ContentValues values = new ContentValues(3);
-        for (long aRawContactId : mRawContactIds) {
-            if (aRawContactId != rawContactId) {
-                values.put(AggregationExceptions.RAW_CONTACT_ID1, aRawContactId);
-                values.put(AggregationExceptions.RAW_CONTACT_ID2, rawContactId);
-                values.put(AggregationExceptions.TYPE, exceptionType);
-                mResolver.update(AggregationExceptions.CONTENT_URI, values, null, null);
-            }
-        }
-    }
-
-    private void showOptionsActivity() {
-        final Intent intent = new Intent(this, ContactOptionsActivity.class);
-        intent.setData(mLookupUri);
-        startActivity(intent);
-    }
-
-    private ViewEntry getViewEntryForMenuItem(MenuItem item) {
-        AdapterView.AdapterContextMenuInfo info;
-        try {
-             info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
-        } catch (ClassCastException e) {
-            Log.e(TAG, "bad menuInfo", e);
-            return null;
-        }
-
-        return ContactEntryAdapter.getEntry(mSections, info.position, SHOW_SEPARATORS);
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_CALL: {
-                try {
-                    ITelephony phone = ITelephony.Stub.asInterface(
-                            ServiceManager.checkService("phone"));
-                    if (phone != null && !phone.isIdle()) {
-                        // Skip out and let the key be handled at a higher level
-                        break;
-                    }
-                } catch (RemoteException re) {
-                    // Fall through and try to call the contact
-                }
-
-                int index = mListView.getSelectedItemPosition();
-                if (index != -1) {
-                    ViewEntry entry = ViewAdapter.getEntry(mSections, index, SHOW_SEPARATORS);
-                    if (entry != null && entry.intent != null &&
-                            entry.intent.getAction() == Intent.ACTION_CALL_PRIVILEGED) {
-                        startActivity(entry.intent);
-                        StickyTabs.saveTab(this, getIntent());
-                        return true;
-                    }
-                } else if (mPrimaryPhoneUri != null) {
-                    // There isn't anything selected, call the default number
-                    final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
-                            mPrimaryPhoneUri);
-                    startActivity(intent);
-                    StickyTabs.saveTab(this, getIntent());
-                    return true;
-                }
-                return false;
-            }
-
-            case KeyEvent.KEYCODE_DEL: {
-                if (mReadOnlySourcesCnt > 0 & mWritableSourcesCnt > 0) {
-                    showDialog(DIALOG_CONFIRM_READONLY_DELETE);
-                } else if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt == 0) {
-                    showDialog(DIALOG_CONFIRM_READONLY_HIDE);
-                } else if (mReadOnlySourcesCnt == 0 && mWritableSourcesCnt > 1) {
-                    showDialog(DIALOG_CONFIRM_MULTIPLE_DELETE);
-                } else {
-                    showDialog(DIALOG_CONFIRM_DELETE);
-                }
-                return true;
-            }
-        }
-
-        return super.onKeyDown(keyCode, event);
-    }
-
-    public void onItemClick(AdapterView parent, View v, int position, long id) {
-        ViewEntry entry = ViewAdapter.getEntry(mSections, position, SHOW_SEPARATORS);
-        if (entry != null) {
-            Intent intent = entry.intent;
-            if (intent != null) {
-                if (Intent.ACTION_CALL_PRIVILEGED.equals(intent.getAction())) {
-                    StickyTabs.saveTab(this, getIntent());
-                }
-                try {
-                    startActivity(intent);
-                } catch (ActivityNotFoundException e) {
-                    Log.e(TAG, "No activity found for intent: " + intent);
-                    signalError();
-                }
-            } else {
-                signalError();
-            }
-        } else {
-            signalError();
-        }
-    }
-
-    /**
-     * Signal an error to the user via a beep, or some other method.
-     */
-    private void signalError() {
-        //TODO: implement this when we have the sonification APIs
-    }
-
-    /**
-     * Build up the entries to display on the screen.
-     *
-     * @param personCursor the URI for the contact being displayed
-     */
-    private final void buildEntries() {
-        // Clear out the old entries
-        final int numSections = mSections.size();
-        for (int i = 0; i < numSections; i++) {
-            mSections.get(i).clear();
-        }
-
-        mRawContactIds.clear();
-
-        mReadOnlySourcesCnt = 0;
-        mWritableSourcesCnt = 0;
-        mAllRestricted = true;
-        mPrimaryPhoneUri = null;
-
-        mWritableRawContactIds.clear();
-
-        final Context context = this;
-        final Sources sources = Sources.getInstance(context);
-
-        // Build up method entries
-        if (mLookupUri != null) {
-            for (Entity entity: mEntities) {
-                final ContentValues entValues = entity.getEntityValues();
-                final String accountType = entValues.getAsString(RawContacts.ACCOUNT_TYPE);
-                final long rawContactId = entValues.getAsLong(RawContacts._ID);
-
-                // Mark when this contact has any unrestricted components
-                final boolean isRestricted = entValues.getAsInteger(RawContacts.IS_RESTRICTED) != 0;
-                if (!isRestricted) mAllRestricted = false;
-
-                if (!mRawContactIds.contains(rawContactId)) {
-                    mRawContactIds.add(rawContactId);
-                }
-                ContactsSource contactsSource = sources.getInflatedSource(accountType,
-                        ContactsSource.LEVEL_SUMMARY);
-                if (contactsSource != null && contactsSource.readOnly) {
-                    mReadOnlySourcesCnt += 1;
-                } else {
-                    mWritableSourcesCnt += 1;
-                    mWritableRawContactIds.add(rawContactId);
-                }
-
-
-                for (NamedContentValues subValue : entity.getSubValues()) {
-                    final ContentValues entryValues = subValue.values;
-                    entryValues.put(Data.RAW_CONTACT_ID, rawContactId);
-
-                    final long dataId = entryValues.getAsLong(Data._ID);
-                    final String mimeType = entryValues.getAsString(Data.MIMETYPE);
-                    if (mimeType == null) continue;
-
-                    final DataKind kind = sources.getKindOrFallback(accountType, mimeType, this,
-                            ContactsSource.LEVEL_MIMETYPES);
-                    if (kind == null) continue;
-
-                    final ViewEntry entry = ViewEntry.fromValues(context, mimeType, kind,
-                            rawContactId, dataId, entryValues);
-
-                    final boolean hasData = !TextUtils.isEmpty(entry.data);
-                    final boolean isSuperPrimary = entryValues.getAsInteger(
-                            Data.IS_SUPER_PRIMARY) != 0;
-
-                    if (Phone.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build phone entries
-                        mNumPhoneNumbers++;
-
-                        entry.intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
-                                Uri.fromParts(Constants.SCHEME_TEL, entry.data, null));
-                        entry.secondaryIntent = new Intent(Intent.ACTION_SENDTO,
-                                Uri.fromParts(Constants.SCHEME_SMSTO, entry.data, null));
-
-                        // Remember super-primary phone
-                        if (isSuperPrimary) mPrimaryPhoneUri = entry.uri;
-
-                        entry.isPrimary = isSuperPrimary;
-                        mPhoneEntries.add(entry);
-
-                        if (entry.type == CommonDataKinds.Phone.TYPE_MOBILE
-                                || mShowSmsLinksForAllPhones) {
-                            // Add an SMS entry
-                            if (kind.iconAltRes > 0) {
-                                entry.secondaryActionIcon = kind.iconAltRes;
-                            }
-                        }
-                    } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build email entries
-                        entry.intent = new Intent(Intent.ACTION_SENDTO,
-                                Uri.fromParts(Constants.SCHEME_MAILTO, entry.data, null));
-                        entry.isPrimary = isSuperPrimary;
-                        mEmailEntries.add(entry);
-
-                        // When Email rows have status, create additional Im row
-                        final DataStatus status = mStatuses.get(entry.id);
-                        if (status != null) {
-                            final String imMime = Im.CONTENT_ITEM_TYPE;
-                            final DataKind imKind = sources.getKindOrFallback(accountType,
-                                    imMime, this, ContactsSource.LEVEL_MIMETYPES);
-                            final ViewEntry imEntry = ViewEntry.fromValues(context,
-                                    imMime, imKind, rawContactId, dataId, entryValues);
-                            imEntry.intent = ContactsUtils.buildImIntent(entryValues);
-                            imEntry.applyStatus(status, false);
-                            mImEntries.add(imEntry);
-                        }
-                    } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build postal entries
-                        entry.maxLines = 4;
-                        entry.intent = new Intent(Intent.ACTION_VIEW, entry.uri);
-                        mPostalEntries.add(entry);
-                    } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build IM entries
-                        entry.intent = ContactsUtils.buildImIntent(entryValues);
-                        if (TextUtils.isEmpty(entry.label)) {
-                            entry.label = getString(R.string.chat).toLowerCase();
-                        }
-
-                        // Apply presence and status details when available
-                        final DataStatus status = mStatuses.get(entry.id);
-                        if (status != null) {
-                            entry.applyStatus(status, false);
-                        }
-                        mImEntries.add(entry);
-                    } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType) &&
-                            (hasData || !TextUtils.isEmpty(entry.label))) {
-                        // Build organization entries
-                        final boolean isNameRawContact = (mNameRawContactId == rawContactId);
-
-                        final boolean duplicatesTitle =
-                            isNameRawContact
-                            && mDisplayNameSource == DisplayNameSources.ORGANIZATION
-                            && (!hasData || TextUtils.isEmpty(entry.label));
-
-                        if (!duplicatesTitle) {
-                            entry.uri = null;
-
-                            if (TextUtils.isEmpty(entry.label)) {
-                                entry.label = entry.data;
-                                entry.data = "";
-                            }
-
-                            mOrganizationEntries.add(entry);
-                        }
-                    } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build nickname entries
-                        final boolean isNameRawContact = (mNameRawContactId == rawContactId);
-
-                        final boolean duplicatesTitle =
-                            isNameRawContact
-                            && mDisplayNameSource == DisplayNameSources.NICKNAME;
-
-                        if (!duplicatesTitle) {
-                            entry.uri = null;
-                            mNicknameEntries.add(entry);
-                        }
-                    } else if (Note.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build note entries
-                        entry.uri = null;
-                        entry.maxLines = 100;
-                        mOtherEntries.add(entry);
-                    } else if (Website.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build Website entries
-                        entry.uri = null;
-                        entry.maxLines = 10;
-                        try {
-                            WebAddress webAddress = new WebAddress(entry.data);
-                            entry.intent = new Intent(Intent.ACTION_VIEW,
-                                    Uri.parse(webAddress.toString()));
-                        } catch (ParseException e) {
-                            Log.e(TAG, "Couldn't parse website: " + entry.data);
-                        }
-                        mOtherEntries.add(entry);
-                    } else if (SipAddress.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
-                        // Build SipAddress entries
-                        entry.uri = null;
-                        entry.maxLines = 1;
-                        entry.intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
-                                Uri.fromParts(Constants.SCHEME_SIP, entry.data, null));
-                        mOtherEntries.add(entry);
-                        // TODO: Consider moving the SipAddress into its own
-                        // section (rather than lumping it in with mOtherEntries)
-                        // so that we can reposition it right under the phone number.
-                        // (Then, we'd also update FallbackSource.java to set
-                        // secondary=false for this field, and tweak the weight
-                        // of its DataKind.)
-                    } else {
-                        // Handle showing custom rows
-                        entry.intent = new Intent(Intent.ACTION_VIEW, entry.uri);
-
-                        // Use social summary when requested by external source
-                        final DataStatus status = mStatuses.get(entry.id);
-                        final boolean hasSocial = kind.actionBodySocial && status != null;
-                        if (hasSocial) {
-                            entry.applyStatus(status, true);
-                        }
-
-                        if (hasSocial || hasData) {
-                            mOtherEntries.add(entry);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    static String buildActionString(DataKind kind, ContentValues values, boolean lowerCase,
-            Context context) {
-        if (kind.actionHeader == null) {
-            return null;
-        }
-        CharSequence actionHeader = kind.actionHeader.inflateUsing(context, values);
-        if (actionHeader == null) {
-            return null;
-        }
-        return lowerCase ? actionHeader.toString().toLowerCase() : actionHeader.toString();
-    }
-
-    static String buildDataString(DataKind kind, ContentValues values, Context context) {
-        if (kind.actionBody == null) {
-            return null;
-        }
-        CharSequence actionBody = kind.actionBody.inflateUsing(context, values);
-        return actionBody == null ? null : actionBody.toString();
-    }
-
-    /**
-     * A basic structure with the data for a contact entry in the list.
-     */
-    static class ViewEntry extends ContactEntryAdapter.Entry implements Collapsible<ViewEntry> {
-        public Context context = null;
-        public String resPackageName = null;
-        public int actionIcon = -1;
-        public boolean isPrimary = false;
-        public int secondaryActionIcon = -1;
-        public Intent intent;
-        public Intent secondaryIntent = null;
-        public int maxLabelLines = 1;
-        public ArrayList<Long> ids = new ArrayList<Long>();
-        public int collapseCount = 0;
-
-        public int presence = -1;
-
-        public CharSequence footerLine = null;
-
-        private ViewEntry() {
-        }
-
-        /**
-         * Build new {@link ViewEntry} and populate from the given values.
-         */
-        public static ViewEntry fromValues(Context context, String mimeType, DataKind kind,
-                long rawContactId, long dataId, ContentValues values) {
-            final ViewEntry entry = new ViewEntry();
-            entry.context = context;
-            entry.contactId = rawContactId;
-            entry.id = dataId;
-            entry.uri = ContentUris.withAppendedId(Data.CONTENT_URI, entry.id);
-            entry.mimetype = mimeType;
-            entry.label = buildActionString(kind, values, false, context);
-            entry.data = buildDataString(kind, values, context);
-
-            if (kind.typeColumn != null && values.containsKey(kind.typeColumn)) {
-                entry.type = values.getAsInteger(kind.typeColumn);
-            }
-            if (kind.iconRes > 0) {
-                entry.resPackageName = kind.resPackageName;
-                entry.actionIcon = kind.iconRes;
-            }
-
-            return entry;
-        }
-
-        /**
-         * Apply given {@link DataStatus} values over this {@link ViewEntry}
-         *
-         * @param fillData When true, the given status replaces {@link #data}
-         *            and {@link #footerLine}. Otherwise only {@link #presence}
-         *            is updated.
-         */
-        public ViewEntry applyStatus(DataStatus status, boolean fillData) {
-            presence = status.getPresence();
-            if (fillData && status.isValid()) {
-                this.data = status.getStatus().toString();
-                this.footerLine = status.getTimestampLabel(context);
-            }
-
-            return this;
-        }
-
-        public boolean collapseWith(ViewEntry entry) {
-            // assert equal collapse keys
-            if (!shouldCollapseWith(entry)) {
-                return false;
-            }
-
-            // Choose the label associated with the highest type precedence.
-            if (TypePrecedence.getTypePrecedence(mimetype, type)
-                    > TypePrecedence.getTypePrecedence(entry.mimetype, entry.type)) {
-                type = entry.type;
-                label = entry.label;
-            }
-
-            // Choose the max of the maxLines and maxLabelLines values.
-            maxLines = Math.max(maxLines, entry.maxLines);
-            maxLabelLines = Math.max(maxLabelLines, entry.maxLabelLines);
-
-            // Choose the presence with the highest precedence.
-            if (StatusUpdates.getPresencePrecedence(presence)
-                    < StatusUpdates.getPresencePrecedence(entry.presence)) {
-                presence = entry.presence;
-            }
-
-            // If any of the collapsed entries are primary make the whole thing primary.
-            isPrimary = entry.isPrimary ? true : isPrimary;
-
-            // uri, and contactdId, shouldn't make a difference. Just keep the original.
-
-            // Keep track of all the ids that have been collapsed with this one.
-            ids.add(entry.id);
-            collapseCount++;
-            return true;
-        }
-
-        public boolean shouldCollapseWith(ViewEntry entry) {
-            if (entry == null) {
-                return false;
-            }
-
-            if (!ContactsUtils.shouldCollapse(context, mimetype, data, entry.mimetype,
-                    entry.data)) {
-                return false;
-            }
-
-            if (!TextUtils.equals(mimetype, entry.mimetype)
-                    || !ContactsUtils.areIntentActionEqual(intent, entry.intent)
-                    || !ContactsUtils.areIntentActionEqual(secondaryIntent, entry.secondaryIntent)
-                    || actionIcon != entry.actionIcon) {
-                return false;
-            }
-
-            return true;
-        }
-    }
-
-    /** Cache of the children views of a row */
-    static class ViewCache {
-        public TextView label;
-        public TextView data;
-        public TextView footer;
-        public ImageView actionIcon;
-        public ImageView presenceIcon;
-        public ImageView primaryIcon;
-        public ImageView secondaryActionButton;
-        public View secondaryActionDivider;
-
-        // Need to keep track of this too
-        ViewEntry entry;
-    }
-
-    private final class ViewAdapter extends ContactEntryAdapter<ViewEntry>
-            implements View.OnClickListener {
-
-
-        ViewAdapter(Context context, ArrayList<ArrayList<ViewEntry>> sections) {
-            super(context, sections, SHOW_SEPARATORS);
-        }
-
-        public void onClick(View v) {
-            Intent intent = (Intent) v.getTag();
-            startActivity(intent);
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup parent) {
-            ViewEntry entry = getEntry(mSections, position, false);
-            View v;
-
-            ViewCache views;
-
-            // Check to see if we can reuse convertView
-            if (convertView != null) {
-                v = convertView;
-                views = (ViewCache) v.getTag();
-            } else {
-                // Create a new view if needed
-                v = mInflater.inflate(R.layout.list_item_text_icons, parent, false);
-
-                // Cache the children
-                views = new ViewCache();
-                views.label = (TextView) v.findViewById(android.R.id.text1);
-                views.data = (TextView) v.findViewById(android.R.id.text2);
-                views.footer = (TextView) v.findViewById(R.id.footer);
-                views.actionIcon = (ImageView) v.findViewById(R.id.action_icon);
-                views.primaryIcon = (ImageView) v.findViewById(R.id.primary_icon);
-                views.presenceIcon = (ImageView) v.findViewById(R.id.presence_icon);
-                views.secondaryActionButton = (ImageView) v.findViewById(
-                        R.id.secondary_action_button);
-                views.secondaryActionButton.setOnClickListener(this);
-                views.secondaryActionDivider = v.findViewById(R.id.divider);
-                v.setTag(views);
-            }
-
-            // Update the entry in the view cache
-            views.entry = entry;
-
-            // Bind the data to the view
-            bindView(v, entry);
-            return v;
-        }
-
-        @Override
-        protected View newView(int position, ViewGroup parent) {
-            // getView() handles this
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        protected void bindView(View view, ViewEntry entry) {
-            final Resources resources = mContext.getResources();
-            ViewCache views = (ViewCache) view.getTag();
-
-            // Set the label
-            TextView label = views.label;
-            setMaxLines(label, entry.maxLabelLines);
-            label.setText(entry.label);
-
-            // Set the data
-            TextView data = views.data;
-            if (data != null) {
-                if (entry.mimetype.equals(Phone.CONTENT_ITEM_TYPE)
-                        || entry.mimetype.equals(Constants.MIME_SMS_ADDRESS)) {
-                    data.setText(PhoneNumberUtils.formatNumber(entry.data));
-                } else {
-                    data.setText(entry.data);
-                }
-                setMaxLines(data, entry.maxLines);
-            }
-
-            // Set the footer
-            if (!TextUtils.isEmpty(entry.footerLine)) {
-                views.footer.setText(entry.footerLine);
-                views.footer.setVisibility(View.VISIBLE);
-            } else {
-                views.footer.setVisibility(View.GONE);
-            }
-
-            // Set the primary icon
-            views.primaryIcon.setVisibility(entry.isPrimary ? View.VISIBLE : View.GONE);
-
-            // Set the action icon
-            ImageView action = views.actionIcon;
-            if (entry.actionIcon != -1) {
-                Drawable actionIcon;
-                if (entry.resPackageName != null) {
-                    // Load external resources through PackageManager
-                    actionIcon = mContext.getPackageManager().getDrawable(entry.resPackageName,
-                            entry.actionIcon, null);
-                } else {
-                    actionIcon = resources.getDrawable(entry.actionIcon);
-                }
-                action.setImageDrawable(actionIcon);
-                action.setVisibility(View.VISIBLE);
-            } else {
-                // Things should still line up as if there was an icon, so make it invisible
-                action.setVisibility(View.INVISIBLE);
-            }
-
-            // Set the presence icon
-            Drawable presenceIcon = ContactPresenceIconUtil.getPresenceIcon(
-                    mContext, entry.presence);
-            ImageView presenceIconView = views.presenceIcon;
-            if (presenceIcon != null) {
-                presenceIconView.setImageDrawable(presenceIcon);
-                presenceIconView.setVisibility(View.VISIBLE);
-            } else {
-                presenceIconView.setVisibility(View.GONE);
-            }
-
-            // Set the secondary action button
-            ImageView secondaryActionView = views.secondaryActionButton;
-            Drawable secondaryActionIcon = null;
-            if (entry.secondaryActionIcon != -1) {
-                secondaryActionIcon = resources.getDrawable(entry.secondaryActionIcon);
-            }
-            if (entry.secondaryIntent != null && secondaryActionIcon != null) {
-                secondaryActionView.setImageDrawable(secondaryActionIcon);
-                secondaryActionView.setTag(entry.secondaryIntent);
-                secondaryActionView.setVisibility(View.VISIBLE);
-                views.secondaryActionDivider.setVisibility(View.VISIBLE);
-            } else {
-                secondaryActionView.setVisibility(View.GONE);
-                views.secondaryActionDivider.setVisibility(View.GONE);
-            }
-        }
-
-        private void setMaxLines(TextView textView, int maxLines) {
-            if (maxLines == 1) {
-                textView.setSingleLine(true);
-                textView.setEllipsize(TextUtils.TruncateAt.END);
-            } else {
-                textView.setSingleLine(false);
-                textView.setMaxLines(maxLines);
-                textView.setEllipsize(null);
-            }
-        }
-    }
-
-    private interface StatusQuery {
-        final String[] PROJECTION = new String[] {
-                Data._ID,
-                Data.STATUS,
-                Data.STATUS_RES_PACKAGE,
-                Data.STATUS_ICON,
-                Data.STATUS_LABEL,
-                Data.STATUS_TIMESTAMP,
-                Data.PRESENCE,
-        };
-
-        final int _ID = 0;
-    }
-
-    @Override
-    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
-            boolean globalSearch) {
-        if (globalSearch) {
-            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-        } else {
-            ContactsSearchManager.startSearch(this, initialQuery);
-        }
-    }
-}
diff --git a/src/com/android/contacts/activities/ActionBarAdapter.java b/src/com/android/contacts/activities/ActionBarAdapter.java
new file mode 100644
index 0000000..ae8ef76
--- /dev/null
+++ b/src/com/android/contacts/activities/ActionBarAdapter.java
@@ -0,0 +1,222 @@
+/*
+ * 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.activities;
+
+import com.android.contacts.R;
+import com.android.contacts.list.ContactListFilterController;
+import com.android.contacts.list.ContactListFilterController.ContactListFilterListener;
+import com.android.contacts.list.ContactListFilterView;
+import com.android.contacts.list.ContactsRequest;
+
+import android.app.ActionBar;
+import android.content.Context;
+import android.os.Bundle;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.SearchView;
+import android.widget.SearchView.OnCloseListener;
+import android.widget.SearchView.OnQueryChangeListener;
+import android.widget.TextView;
+
+/**
+ * Adapter for the action bar at the top of the Contacts activity.
+ */
+public class ActionBarAdapter
+        implements OnQueryChangeListener, OnCloseListener, ContactListFilterListener {
+
+    public interface Listener {
+        void onAction();
+    }
+
+    private static final String EXTRA_KEY_SEARCH_MODE = "navBar.searchMode";
+    private static final String EXTRA_KEY_QUERY = "navBar.query";
+
+    private static final String KEY_MODE_DEFAULT = "mode_default";
+    private static final String KEY_MODE_SEARCH = "mode_search";
+
+    private boolean mSearchMode;
+    private String mQueryString;
+    private Bundle mSavedStateForSearchMode;
+    private Bundle mSavedStateForDefaultMode;
+
+    private View mNavigationBar;
+    private TextView mSearchLabel;
+    private SearchView mSearchView;
+
+    private final Context mContext;
+
+    private Listener mListener;
+    private ContactListFilterView mFilterView;
+    private View mFilterIndicator;
+    private ContactListFilterController mFilterController;
+    private View mFilterContainer;
+
+    public ActionBarAdapter(Context context) {
+        mContext = context;
+    }
+
+    public void onCreate(Bundle savedState, ContactsRequest request, ActionBar actionBar) {
+        mQueryString = null;
+        if (savedState != null) {
+            mSearchMode = savedState.getBoolean(EXTRA_KEY_SEARCH_MODE);
+            mQueryString = savedState.getString(EXTRA_KEY_QUERY);
+            mSavedStateForDefaultMode = savedState.getParcelable(KEY_MODE_DEFAULT);
+            mSavedStateForSearchMode = savedState.getParcelable(KEY_MODE_SEARCH);
+        } else {
+            mSearchMode = request.isSearchMode();
+            mQueryString = request.getQueryString();
+        }
+
+        mNavigationBar = LayoutInflater.from(mContext).inflate(R.layout.navigation_bar, null);
+        actionBar.setCustomNavigationMode(mNavigationBar);
+
+        mFilterContainer = mNavigationBar.findViewById(R.id.filter_container);
+        mFilterView = (ContactListFilterView) mNavigationBar.findViewById(R.id.filter_view);
+        mSearchLabel = (TextView) mNavigationBar.findViewById(R.id.search_label);
+        mFilterIndicator = mNavigationBar.findViewById(R.id.filter_indicator);
+        mSearchView = (SearchView) mNavigationBar.findViewById(R.id.search_view);
+
+        mSearchView.setIconifiedByDefault(false);
+        mSearchView.setEnabled(false);
+        mSearchView.setOnQueryChangeListener(this);
+        mSearchView.setOnCloseListener(this);
+        mSearchView.setQuery(mQueryString, false);
+
+        update();
+    }
+
+    public void setListener(Listener listener) {
+        mListener = listener;
+    }
+
+    public void setContactListFilterController(ContactListFilterController controller) {
+        mFilterController = controller;
+        mFilterController.setAnchor(mFilterContainer);
+        mFilterController.addListener(this);
+    }
+
+    public boolean isSearchMode() {
+        return mSearchMode;
+    }
+
+    public void setSearchMode(boolean flag) {
+        if (mSearchMode != flag) {
+            mSearchMode = flag;
+            update();
+            if (mListener != null) {
+                mListener.onAction();
+            }
+        }
+    }
+
+    public String getQueryString() {
+        return mQueryString;
+    }
+
+    public void setQueryString(String query) {
+        mQueryString = query;
+        mSearchView.setQuery(query, false);
+    }
+
+    public void update() {
+        if (mSearchMode) {
+            mSearchLabel.setVisibility(View.VISIBLE);
+            mFilterView.setVisibility(View.GONE);
+            mFilterIndicator.setVisibility(View.INVISIBLE);
+            if (mFilterController != null) {
+                mFilterController.setEnabled(false);
+            }
+        } else {
+            mSearchLabel.setVisibility(View.GONE);
+            mFilterView.setVisibility(View.VISIBLE);
+            boolean showIndicator = false;
+            if (mFilterController != null){
+                mFilterController.setEnabled(true);
+                if (mFilterController.isLoaded()) {
+                    mFilterView.setContactListFilter(mFilterController.getFilter());
+                    mFilterView.bindView(false);
+                    showIndicator = mFilterController.getFilterList().size() > 1;
+                }
+            }
+            mFilterIndicator.setVisibility(showIndicator ? View.VISIBLE : View.INVISIBLE);
+        }
+    }
+
+    @Override
+    public boolean onQueryTextChanged(String queryString) {
+        mQueryString = queryString;
+        mSearchMode = !TextUtils.isEmpty(queryString);
+        update();
+        if (mListener != null) {
+            mListener.onAction();
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onSubmitQuery(String query) {
+        return true;
+    }
+
+    @Override
+    public boolean onClose() {
+        setSearchMode(false);
+        return false;
+    }
+
+    public Bundle getSavedStateForSearchMode() {
+        return mSavedStateForSearchMode;
+    }
+
+    public void setSavedStateForSearchMode(Bundle state) {
+        mSavedStateForSearchMode = state;
+    }
+
+    public Bundle getSavedStateForDefaultMode() {
+        return mSavedStateForDefaultMode;
+    }
+
+    public void setSavedStateForDefaultMode(Bundle state) {
+        mSavedStateForDefaultMode = state;
+    }
+
+    public void onSaveInstanceState(Bundle outState) {
+        outState.putBoolean(EXTRA_KEY_SEARCH_MODE, mSearchMode);
+        outState.putString(EXTRA_KEY_QUERY, mQueryString);
+        if (mSavedStateForDefaultMode != null) {
+            outState.putParcelable(KEY_MODE_DEFAULT, mSavedStateForDefaultMode);
+        }
+        if (mSavedStateForSearchMode != null) {
+            outState.putParcelable(KEY_MODE_SEARCH, mSavedStateForSearchMode);
+        }
+    }
+
+    @Override
+    public void onContactListFiltersLoaded() {
+        update();
+    }
+
+    @Override
+    public void onContactListFilterChanged() {
+        update();
+    }
+
+    @Override
+    public void onContactListFilterCustomizationRequest() {
+    }
+}
diff --git a/src/com/android/contacts/activities/ContactBrowserActivity.java b/src/com/android/contacts/activities/ContactBrowserActivity.java
new file mode 100644
index 0000000..a70fbc4
--- /dev/null
+++ b/src/com/android/contacts/activities/ContactBrowserActivity.java
@@ -0,0 +1,844 @@
+/*
+ * 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.activities;
+
+import com.android.contacts.R;
+import com.android.contacts.interactions.ContactDeletionInteraction;
+import com.android.contacts.interactions.ImportExportInteraction;
+import com.android.contacts.interactions.PhoneNumberInteraction;
+import com.android.contacts.list.ContactBrowseListContextMenuAdapter;
+import com.android.contacts.list.ContactBrowseListFragment;
+import com.android.contacts.list.ContactEntryListFragment;
+import com.android.contacts.list.ContactListFilter;
+import com.android.contacts.list.ContactListFilterController;
+import com.android.contacts.list.ContactsIntentResolver;
+import com.android.contacts.list.ContactsRequest;
+import com.android.contacts.list.DefaultContactBrowseListFragment;
+import com.android.contacts.list.OnContactBrowserActionListener;
+import com.android.contacts.list.StrequentContactListFragment;
+import com.android.contacts.preference.ContactsPreferenceActivity;
+import com.android.contacts.util.DialogManager;
+import com.android.contacts.views.ContactSaveService;
+import com.android.contacts.views.detail.ContactDetailFragment;
+import com.android.contacts.views.detail.ContactNoneFragment;
+import com.android.contacts.widget.ContextMenuAdapter;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.Dialog;
+import android.app.Fragment;
+import android.content.ActivityNotFoundException;
+import android.content.ContentValues;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.Window;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+
+/**
+ * Displays a list to browse contacts. For xlarge screens, this also displays a detail-pane on
+ * the right
+ */
+public class ContactBrowserActivity extends Activity
+        implements View.OnCreateContextMenuListener, ActionBarAdapter.Listener,
+        DialogManager.DialogShowingViewActivity {
+
+    private static final String TAG = "ContactBrowserActivity";
+
+    private static final int SUBACTIVITY_NEW_CONTACT = 2;
+    private static final int SUBACTIVITY_SETTINGS = 3;
+    private static final int SUBACTIVITY_EDIT_CONTACT = 4;
+
+    private static final String KEY_DEFAULT_CONTACT_URI = "defaultSelectedContactUri";
+
+    private static final int DEFAULT_DIRECTORY_RESULT_LIMIT = 20;
+
+    private static final String KEY_SEARCH_MODE = "searchMode";
+
+    private DialogManager mDialogManager = new DialogManager(this);
+
+    private ContactsIntentResolver mIntentResolver;
+    private ContactsRequest mRequest;
+
+    private SharedPreferences mPrefs;
+
+    private boolean mHasActionBar;
+    private ActionBarAdapter mActionBarAdapter;
+
+    private boolean mSearchMode;
+
+    private ContactBrowseListFragment mListFragment;
+    private ContactNoneFragment mEmptyFragment;
+
+    private boolean mContactContentDisplayed;
+    private ContactDetailFragment mDetailFragment;
+    private DetailFragmentListener mDetailFragmentListener = new DetailFragmentListener();
+
+    private PhoneNumberInteraction mPhoneNumberCallInteraction;
+    private PhoneNumberInteraction mSendTextMessageInteraction;
+    private ContactDeletionInteraction mContactDeletionInteraction;
+    private ImportExportInteraction mImportExportInteraction;
+
+    private boolean mSearchInitiated;
+
+    private ContactListFilterController mContactListFilterController;
+
+    public ContactBrowserActivity() {
+        mIntentResolver = new ContactsIntentResolver(this);
+        mContactListFilterController = new ContactListFilterController(this);
+    }
+
+    @Override
+    public void onAttachFragment(Fragment fragment) {
+        if (fragment instanceof ContactBrowseListFragment) {
+            mListFragment = (ContactBrowseListFragment)fragment;
+            mListFragment.setOnContactListActionListener(new ContactBrowserActionListener());
+            if (mListFragment instanceof DefaultContactBrowseListFragment) {
+                ((DefaultContactBrowseListFragment) mListFragment).setContactListFilterController(
+                        mContactListFilterController);
+            }
+        } else if (fragment instanceof ContactNoneFragment) {
+            mEmptyFragment = (ContactNoneFragment)fragment;
+        } else if (fragment instanceof ContactDetailFragment) {
+            mDetailFragment = (ContactDetailFragment)fragment;
+            mDetailFragment.setListener(mDetailFragmentListener);
+        }
+    }
+
+    @Override
+    protected void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+
+        if (savedState != null) {
+            mSearchMode = savedState.getBoolean(KEY_SEARCH_MODE);
+        }
+
+        // Extract relevant information from the intent
+        mRequest = mIntentResolver.resolveIntent(getIntent());
+        if (!mRequest.isValid()) {
+            setResult(RESULT_CANCELED);
+            finish();
+            return;
+        }
+
+        Intent redirect = mRequest.getRedirectIntent();
+        if (redirect != null) {
+            // Need to start a different activity
+            startActivity(redirect);
+            finish();
+            return;
+        }
+
+        mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+
+        setTitle(mRequest.getActivityTitle());
+        setContentView(R.layout.contact_browser);
+
+        mHasActionBar = getWindow().hasFeature(Window.FEATURE_ACTION_BAR);
+        mContactContentDisplayed = findViewById(R.id.detail_container) != null;
+
+        if (mRequest.getActionCode() == ContactsRequest.ACTION_VIEW_CONTACT) {
+            if (!mContactContentDisplayed) {
+                startActivity(new Intent(Intent.ACTION_VIEW, mRequest.getContactUri()));
+                finish();
+                return;
+            }
+        }
+
+        if (mHasActionBar) {
+            mActionBarAdapter = new ActionBarAdapter(this);
+            mActionBarAdapter.onCreate(savedState, mRequest, getActionBar());
+            mActionBarAdapter.setListener(this);
+            mActionBarAdapter.setContactListFilterController(mContactListFilterController);
+            // TODO: request may ask for FREQUENT - set the filter accordingly
+        }
+
+        configureListFragment(true /* from request */);
+
+        if (mContactContentDisplayed) {
+            setupContactDetailFragment(mListFragment.getSelectedContactUri());
+        }
+    }
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        super.onNewIntent(intent);
+        if (Intent.ACTION_VIEW.equals(intent.getAction())) {
+            Uri uri = intent.getData();
+            if (uri == null) {
+                return;
+            }
+
+            if (mHasActionBar) {
+                if (mActionBarAdapter.isSearchMode()) {
+                    mActionBarAdapter.setSavedStateForSearchMode(null);
+                    mActionBarAdapter.setSearchMode(false);
+                }
+            }
+            setSelectedContactUri(uri);
+            setupContactDetailFragment(uri);
+            mListFragment.requestSelectionOnScreen(true);
+        }
+    }
+
+    public void setSelectedContactUri(Uri contactLookupUri) {
+        mListFragment.setSelectedContactUri(contactLookupUri);
+
+        Editor editor = mPrefs.edit();
+        if (contactLookupUri == null) {
+            editor.remove(KEY_DEFAULT_CONTACT_URI);
+        } else {
+            editor.putString(KEY_DEFAULT_CONTACT_URI, contactLookupUri.toString());
+        }
+        editor.apply();
+    }
+
+    public Uri getDefaultSelectedContactUri() {
+        String uriString = mPrefs.getString(KEY_DEFAULT_CONTACT_URI, null);
+        return TextUtils.isEmpty(uriString) ? null : Uri.parse(uriString);
+    }
+
+    private void configureListFragment(boolean fromRequest) {
+        boolean searchMode = mSearchMode;
+        if (fromRequest) {
+            ContactListFilter filter = null;
+            int actionCode = mRequest.getActionCode();
+            switch (actionCode) {
+                case ContactsRequest.ACTION_ALL_CONTACTS:
+                    filter = new ContactListFilter(ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS);
+                    break;
+                case ContactsRequest.ACTION_CONTACTS_WITH_PHONES:
+                    filter = new ContactListFilter(
+                            ContactListFilter.FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY);
+                    break;
+
+                // TODO: handle FREQUENT and STREQUENT according to the spec
+                case ContactsRequest.ACTION_FREQUENT:
+                case ContactsRequest.ACTION_STREQUENT:
+                    // For now they are treated the same as STARRED
+                case ContactsRequest.ACTION_STARRED:
+                    filter = new ContactListFilter(ContactListFilter.FILTER_TYPE_STARRED);
+                    break;
+            }
+
+            if (filter != null) {
+                mContactListFilterController.setContactListFilter(filter, false);
+                searchMode = false;
+            } else if (mRequest.getActionCode() == ContactsRequest.ACTION_ALL_CONTACTS) {
+                mContactListFilterController.setContactListFilter(new ContactListFilter(
+                        ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS), false);
+            }
+        } else {
+            if (mHasActionBar) {
+                searchMode = mActionBarAdapter.isSearchMode();
+            }
+        }
+
+        boolean replaceList = mListFragment == null || (mSearchMode != searchMode);
+        if (replaceList) {
+            closeListFragment();
+            mSearchMode = searchMode;
+            if (mSearchMode) {
+                mListFragment = createContactSearchFragment();
+            } else {
+                mListFragment = createListFragment(ContactsRequest.ACTION_DEFAULT);
+            }
+        }
+
+        if (mHasActionBar) {
+            if (mSearchMode) {
+                Bundle savedState = mActionBarAdapter.getSavedStateForSearchMode();
+                if (savedState != null) {
+                    mListFragment.restoreSavedState(savedState);
+                    mActionBarAdapter.setSavedStateForSearchMode(null);
+                }
+
+                mListFragment.setQueryString(mActionBarAdapter.getQueryString());
+            } else {
+                Bundle savedState = mActionBarAdapter.getSavedStateForDefaultMode();
+                if (savedState != null) {
+                    mListFragment.restoreSavedState(savedState);
+                    mActionBarAdapter.setSavedStateForDefaultMode(null);
+                }
+            }
+        }
+
+        Uri selectUri = null;
+        if (fromRequest) {
+            selectUri = mRequest.getContactUri();
+            if (selectUri != null) {
+                setSelectedContactUri(selectUri);
+            }
+        }
+
+        if (selectUri == null && mListFragment.getSelectedContactUri() == null) {
+            selectUri = getDefaultSelectedContactUri();
+        }
+
+        if (selectUri != null) {
+            mListFragment.setSelectedContactUri(selectUri);
+            mListFragment.requestSelectionOnScreen(false);
+        }
+
+        if (replaceList) {
+            getFragmentManager().openTransaction()
+                    .replace(R.id.list_container, mListFragment)
+                    .commit();
+        }
+    }
+
+    private void closeListFragment() {
+        if (mListFragment != null) {
+            mListFragment.setOnContactListActionListener(null);
+
+            if (mHasActionBar) {
+                Bundle state = new Bundle();
+                mListFragment.onSaveInstanceState(state);
+                if (mSearchMode) {
+                    mActionBarAdapter.setSavedStateForSearchMode(state);
+                } else {
+                    mActionBarAdapter.setSavedStateForDefaultMode(state);
+                }
+            }
+
+            mListFragment = null;
+        }
+    }
+
+    private void setupContactDetailFragment(Uri contactLookupUri) {
+        if (mDetailFragment != null && contactLookupUri != null
+                && contactLookupUri.equals(mDetailFragment.getUri())) {
+            return;
+        }
+
+        if (contactLookupUri != null) {
+            // Already showing? Nothing to do
+            if (mDetailFragment != null) {
+                mDetailFragment.loadUri(contactLookupUri);
+                return;
+            }
+
+            closeEmptyFragment();
+
+            mDetailFragment = new ContactDetailFragment();
+            mDetailFragment.loadUri(contactLookupUri);
+
+            // Nothing showing yet? Create (this happens during Activity-Startup)
+            getFragmentManager().openTransaction()
+                    .replace(R.id.detail_container, mDetailFragment)
+                    .commit();
+        } else {
+            closeDetailFragment();
+
+            mEmptyFragment = new ContactNoneFragment();
+            getFragmentManager().openTransaction()
+                    .replace(R.id.detail_container, mEmptyFragment)
+                    .commit();
+        }
+    }
+
+    private void closeDetailFragment() {
+        if (mDetailFragment != null) {
+            mDetailFragment.setListener(null);
+            mDetailFragment = null;
+        }
+    }
+
+    private void closeEmptyFragment() {
+        mEmptyFragment = null;
+    }
+
+    /**
+     * Handler for action bar actions.
+     */
+    @Override
+    public void onAction() {
+        configureListFragment(false /* from request */);
+        setupContactDetailFragment(mListFragment.getSelectedContactUri());
+    }
+
+    /**
+     * Creates the list fragment for the specified mode.
+     */
+    private ContactBrowseListFragment createListFragment(int actionCode) {
+        switch (actionCode) {
+            case ContactsRequest.ACTION_DEFAULT: {
+                DefaultContactBrowseListFragment fragment = new DefaultContactBrowseListFragment();
+                fragment.setContactsRequest(mRequest);
+                fragment.setOnContactListActionListener(new ContactBrowserActionListener());
+                if (!mHasActionBar) {
+                    fragment.setContextMenuAdapter(
+                            new ContactBrowseListContextMenuAdapter(fragment));
+                }
+                fragment.setSearchMode(mRequest.isSearchMode());
+                fragment.setQueryString(mRequest.getQueryString());
+                fragment.setDirectorySearchEnabled(
+                        mRequest.isSearchMode() && mRequest.isDirectorySearchEnabled());
+                fragment.setAizyEnabled(!mRequest.isSearchMode());
+                fragment.setSelectionVisible(mContactContentDisplayed);
+                fragment.setQuickContactEnabled(!mContactContentDisplayed);
+                fragment.setFilterEnabled(!mRequest.isSearchMode());
+                return fragment;
+            }
+
+            case ContactsRequest.ACTION_GROUP: {
+                throw new UnsupportedOperationException("Not yet implemented");
+            }
+
+            case ContactsRequest.ACTION_STARRED: {
+                StrequentContactListFragment fragment = new StrequentContactListFragment();
+                fragment.setOnContactListActionListener(new ContactBrowserActionListener());
+                fragment.setFrequentlyContactedContactsIncluded(false);
+                fragment.setStarredContactsIncluded(true);
+                fragment.setSelectionVisible(mContactContentDisplayed);
+                fragment.setQuickContactEnabled(!mContactContentDisplayed);
+                return fragment;
+            }
+
+            case ContactsRequest.ACTION_FREQUENT: {
+                StrequentContactListFragment fragment = new StrequentContactListFragment();
+                fragment.setOnContactListActionListener(new ContactBrowserActionListener());
+                fragment.setFrequentlyContactedContactsIncluded(true);
+                fragment.setStarredContactsIncluded(false);
+                fragment.setSelectionVisible(mContactContentDisplayed);
+                fragment.setQuickContactEnabled(!mContactContentDisplayed);
+                return fragment;
+            }
+
+            case ContactsRequest.ACTION_STREQUENT: {
+                StrequentContactListFragment fragment = new StrequentContactListFragment();
+                fragment.setOnContactListActionListener(new ContactBrowserActionListener());
+                fragment.setFrequentlyContactedContactsIncluded(true);
+                fragment.setStarredContactsIncluded(true);
+                fragment.setSelectionVisible(mContactContentDisplayed);
+                fragment.setQuickContactEnabled(!mContactContentDisplayed);
+                return fragment;
+            }
+
+            default:
+                throw new IllegalStateException("Invalid action code: " + actionCode);
+        }
+    }
+
+    private ContactBrowseListFragment createContactSearchFragment() {
+        DefaultContactBrowseListFragment fragment = new DefaultContactBrowseListFragment();
+        fragment.setOnContactListActionListener(new ContactBrowserActionListener());
+        if (!mHasActionBar) {
+            fragment.setContextMenuAdapter(new ContactBrowseListContextMenuAdapter(fragment));
+        }
+        fragment.setSearchMode(true);
+        fragment.setDirectorySearchEnabled(true);
+        fragment.setDirectoryResultLimit(DEFAULT_DIRECTORY_RESULT_LIMIT);
+        fragment.setAizyEnabled(false);
+        fragment.setSelectionVisible(true);
+        fragment.setQuickContactEnabled(!mContactContentDisplayed);
+        return fragment;
+    }
+
+    private final class ContactBrowserActionListener implements OnContactBrowserActionListener {
+        @Override
+        public void onViewContactAction(Uri contactLookupUri) {
+            if (mContactContentDisplayed) {
+                setSelectedContactUri(contactLookupUri);
+                setupContactDetailFragment(contactLookupUri);
+            } else {
+                startActivity(new Intent(Intent.ACTION_VIEW, contactLookupUri));
+            }
+        }
+
+        @Override
+        public void onCreateNewContactAction() {
+            Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+            Bundle extras = getIntent().getExtras();
+            if (extras != null) {
+                intent.putExtras(extras);
+            }
+            startActivity(intent);
+        }
+
+        @Override
+        public void onEditContactAction(Uri contactLookupUri) {
+            Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
+            Bundle extras = getIntent().getExtras();
+            if (extras != null) {
+                intent.putExtras(extras);
+            }
+            startActivityForResult(intent, SUBACTIVITY_EDIT_CONTACT);
+        }
+
+        @Override
+        public void onAddToFavoritesAction(Uri contactUri) {
+            ContentValues values = new ContentValues(1);
+            values.put(Contacts.STARRED, 1);
+            getContentResolver().update(contactUri, values, null, null);
+        }
+
+        @Override
+        public void onRemoveFromFavoritesAction(Uri contactUri) {
+            ContentValues values = new ContentValues(1);
+            values.put(Contacts.STARRED, 0);
+            getContentResolver().update(contactUri, values, null, null);
+        }
+
+        @Override
+        public void onCallContactAction(Uri contactUri) {
+            getPhoneNumberCallInteraction().startInteraction(contactUri);
+        }
+
+        @Override
+        public void onSmsContactAction(Uri contactUri) {
+            getSendTextMessageInteraction().startInteraction(contactUri);
+        }
+
+        @Override
+        public void onDeleteContactAction(Uri contactUri) {
+            getContactDeletionInteraction().deleteContact(contactUri);
+        }
+
+        @Override
+        public void onFinishAction() {
+            onBackPressed();
+        }
+    }
+
+    private class DetailFragmentListener implements ContactDetailFragment.Listener {
+        @Override
+        public void onContactNotFound() {
+            setupContactDetailFragment(null);
+        }
+
+        @Override
+        public void onEditRequested(Uri contactLookupUri) {
+            startActivityForResult(
+                    new Intent(Intent.ACTION_EDIT, contactLookupUri), SUBACTIVITY_EDIT_CONTACT);
+        }
+
+        @Override
+        public void onItemClicked(Intent intent) {
+            try {
+                startActivity(intent);
+            } catch (ActivityNotFoundException e) {
+                Log.e(TAG, "No activity found for intent: " + intent);
+            }
+        }
+
+        @Override
+        public void onDeleteRequested(Uri contactLookupUri) {
+            getContactDeletionInteraction().deleteContact(contactLookupUri);
+        }
+
+        @Override
+        public void onCreateRawContactRequested(ArrayList<ContentValues> values, Account account) {
+            Toast.makeText(ContactBrowserActivity.this, R.string.toast_making_personal_copy,
+                    Toast.LENGTH_LONG).show();
+            Intent serviceIntent = ContactSaveService.createNewRawContactIntent(
+                    ContactBrowserActivity.this, values, account);
+            startService(serviceIntent);
+        }
+    }
+
+    public void startActivityAndForwardResult(final Intent intent) {
+        intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
+
+        // Forward extras to the new activity
+        Bundle extras = getIntent().getExtras();
+        if (extras != null) {
+            intent.putExtras(extras);
+        }
+        startActivity(intent);
+        finish();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+
+        MenuInflater inflater = getMenuInflater();
+        if (mHasActionBar) {
+            inflater.inflate(R.menu.actions, menu);
+            return true;
+        } else if (mRequest.getActionCode() == ContactsRequest.ACTION_DEFAULT ||
+                mRequest.getActionCode() == ContactsRequest.ACTION_STREQUENT) {
+            inflater.inflate(R.menu.list, menu);
+            return true;
+        } else if (!mListFragment.isSearchMode()) {
+            inflater.inflate(R.menu.search, menu);
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        MenuItem displayGroups = menu.findItem(R.id.menu_display_groups);
+        if (displayGroups != null) {
+            displayGroups.setVisible(
+                    mRequest.getActionCode() == ContactsRequest.ACTION_DEFAULT);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_settings: {
+                final Intent intent = new Intent(this, ContactsPreferenceActivity.class);
+                startActivityForResult(intent, SUBACTIVITY_SETTINGS);
+                return true;
+            }
+            case R.id.menu_search: {
+                onSearchRequested();
+                return true;
+            }
+            case R.id.menu_add: {
+                final Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+                startActivityForResult(intent, SUBACTIVITY_NEW_CONTACT);
+                return true;
+            }
+            case R.id.menu_import_export: {
+                getImportExportInteraction().startInteraction();
+                return true;
+            }
+            case R.id.menu_accounts: {
+                final Intent intent = new Intent(Settings.ACTION_SYNC_SETTINGS);
+                intent.putExtra(Settings.EXTRA_AUTHORITIES, new String[] {
+                    ContactsContract.AUTHORITY
+                });
+                startActivity(intent);
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+// TODO
+//        if (mProviderStatus != ProviderStatus.STATUS_NORMAL) {
+//            return;
+//        }
+
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            mListFragment.startSearch(initialQuery);
+        }
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int id, Bundle bundle) {
+        if (DialogManager.isManagedId(id)) return mDialogManager.onCreateDialog(id, bundle);
+
+        Dialog dialog = getContactDeletionInteraction().onCreateDialog(id, bundle);
+        if (dialog != null) return dialog;
+
+        dialog = getPhoneNumberCallInteraction().onCreateDialog(id, bundle);
+        if (dialog != null) return dialog;
+
+        dialog = getSendTextMessageInteraction().onCreateDialog(id, bundle);
+        if (dialog != null) return dialog;
+
+        dialog = getImportExportInteraction().onCreateDialog(id, bundle);
+        if (dialog != null) return dialog;
+
+        return super.onCreateDialog(id, bundle);
+    }
+
+    @Override
+    protected void onPrepareDialog(int id, Dialog dialog, Bundle bundle) {
+        if (getContactDeletionInteraction().onPrepareDialog(id, dialog, bundle)) {
+            return;
+        }
+
+        if (getPhoneNumberCallInteraction().onPrepareDialog(id, dialog, bundle)) {
+            return;
+        }
+
+        if (getSendTextMessageInteraction().onPrepareDialog(id, dialog, bundle)) {
+            return;
+        }
+
+        super.onPrepareDialog(id, dialog, bundle);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        switch (requestCode) {
+            case SUBACTIVITY_EDIT_CONTACT: {
+                mListFragment.requestSelectionOnScreen(true);
+                break;
+            }
+
+            case SUBACTIVITY_NEW_CONTACT: {
+                if (resultCode == RESULT_OK && mContactContentDisplayed) {
+                    final Uri newContactUri = data.getData();
+                    setSelectedContactUri(newContactUri);
+                    setupContactDetailFragment(newContactUri);
+                }
+                break;
+            }
+
+            case SUBACTIVITY_SETTINGS:
+                // TODO: Force the ListFragment to reload its setting and update (don't lookup
+                // directories here)
+                break;
+
+            // TODO: Using the new startActivityWithResultFromFragment API this should not be needed
+            // anymore
+            case ContactEntryListFragment.ACTIVITY_REQUEST_CODE_PICKER:
+                if (resultCode == RESULT_OK) {
+                    mListFragment.onPickerResult(data);
+                }
+
+// TODO fix or remove multipicker code
+//                else if (resultCode == RESULT_CANCELED && mMode == MODE_PICK_MULTIPLE_PHONES) {
+//                    // Finish the activity if the sub activity was canceled as back key is used
+//                    // to confirm user selection in MODE_PICK_MULTIPLE_PHONES.
+//                    finish();
+//                }
+//                break;
+        }
+    }
+
+    @Override
+    public boolean onContextItemSelected(MenuItem item) {
+        ContextMenuAdapter menuAdapter = mListFragment.getContextMenuAdapter();
+        if (menuAdapter != null) {
+            return menuAdapter.onContextItemSelected(item);
+        }
+
+        return super.onContextItemSelected(item);
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        // TODO move to the fragment
+        switch (keyCode) {
+//            case KeyEvent.KEYCODE_CALL: {
+//                if (callSelection()) {
+//                    return true;
+//                }
+//                break;
+//            }
+
+            case KeyEvent.KEYCODE_DEL: {
+                if (deleteSelection()) {
+                    return true;
+                }
+                break;
+            }
+            default: {
+                // Bring up the search UI if the user starts typing
+                final int unicodeChar = event.getUnicodeChar();
+
+                if (unicodeChar != 0) {
+                    String query = new String(new int[]{ unicodeChar }, 0, 1);
+                    if (mHasActionBar) {
+                        if (!mActionBarAdapter.isSearchMode()) {
+                            mActionBarAdapter.setQueryString(query);
+                            mActionBarAdapter.setSearchMode(true);
+                            return true;
+                        }
+                    } else if (!mRequest.isSearchMode()) {
+                        if (!mSearchInitiated) {
+                            mSearchInitiated = true;
+                            startSearch(query, false, null, false);
+                            return true;
+                        }
+                    }
+                }
+            }
+        }
+
+        return super.onKeyDown(keyCode, event);
+    }
+
+    private boolean deleteSelection() {
+        // TODO move to the fragment
+//        if (mActionCode == ContactsRequest.ACTION_DEFAULT) {
+//            final int position = mListView.getSelectedItemPosition();
+//            if (position != ListView.INVALID_POSITION) {
+//                Uri contactUri = getContactUri(position);
+//                if (contactUri != null) {
+//                    doContactDelete(contactUri);
+//                    return true;
+//                }
+//            }
+//        }
+        return false;
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putBoolean(KEY_SEARCH_MODE, mSearchMode);
+        if (mActionBarAdapter != null) {
+            mActionBarAdapter.onSaveInstanceState(outState);
+        }
+    }
+
+    private PhoneNumberInteraction getPhoneNumberCallInteraction() {
+        if (mPhoneNumberCallInteraction == null) {
+            mPhoneNumberCallInteraction = new PhoneNumberInteraction(this, false, null);
+        }
+        return mPhoneNumberCallInteraction;
+    }
+
+    private PhoneNumberInteraction getSendTextMessageInteraction() {
+        if (mSendTextMessageInteraction == null) {
+            mSendTextMessageInteraction = new PhoneNumberInteraction(this, true, null);
+        }
+        return mSendTextMessageInteraction;
+    }
+
+    private ContactDeletionInteraction getContactDeletionInteraction() {
+        if (mContactDeletionInteraction == null) {
+            mContactDeletionInteraction = new ContactDeletionInteraction();
+            mContactDeletionInteraction.attachToActivity(this);
+        }
+        return mContactDeletionInteraction;
+    }
+
+    private ImportExportInteraction getImportExportInteraction() {
+        if (mImportExportInteraction == null) {
+            mImportExportInteraction = new ImportExportInteraction(this);
+        }
+        return mImportExportInteraction;
+    }
+
+    @Override
+    public DialogManager getDialogManager() {
+        return mDialogManager;
+    }
+}
diff --git a/src/com/android/contacts/activities/ContactDetailActivity.java b/src/com/android/contacts/activities/ContactDetailActivity.java
new file mode 100644
index 0000000..f593a0d
--- /dev/null
+++ b/src/com/android/contacts/activities/ContactDetailActivity.java
@@ -0,0 +1,138 @@
+/*
+ * 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.activities;
+
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.interactions.ContactDeletionInteraction;
+import com.android.contacts.views.ContactSaveService;
+import com.android.contacts.views.detail.ContactDetailFragment;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.ActivityNotFoundException;
+import android.content.ContentValues;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+
+public class ContactDetailActivity extends Activity {
+    private static final String TAG = "ContactDetailActivity";
+
+    private ContactDetailFragment mFragment;
+    private ContactDeletionInteraction mContactDeletionInteraction;
+
+    @Override
+    public void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+
+        setContentView(R.layout.contact_detail_activity);
+
+        mFragment = (ContactDetailFragment) getFragmentManager().findFragmentById(
+                R.id.contact_detail_fragment);
+        mFragment.setListener(mFragmentListener);
+        mFragment.loadUri(getIntent().getData());
+
+        Log.i(TAG, getIntent().getData().toString());
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int id, Bundle args) {
+        final Dialog deletionDialog = getContactDeletionInteraction().onCreateDialog(id, args);
+        if (deletionDialog != null) return deletionDialog;
+
+        // Nobody knows about the Dialog
+        Log.w(TAG, "Unknown dialog requested, id: " + id + ", args: " + args);
+        return null;
+    }
+
+    @Override
+    protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
+        if (getContactDeletionInteraction().onPrepareDialog(id, dialog, args)) {
+            return;
+        }
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            ContactsSearchManager.startSearch(this, initialQuery);
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (mFragment.handleKeyDown(keyCode)) return true;
+
+        return super.onKeyDown(keyCode, event);
+    }
+
+    private ContactDeletionInteraction getContactDeletionInteraction() {
+        if (mContactDeletionInteraction == null) {
+            mContactDeletionInteraction = new ContactDeletionInteraction();
+            mContactDeletionInteraction.attachToActivity(this);
+        }
+        return mContactDeletionInteraction;
+    }
+
+    private final ContactDetailFragment.Listener mFragmentListener =
+            new ContactDetailFragment.Listener() {
+        @Override
+        public void onContactNotFound() {
+            finish();
+        }
+
+        @Override
+        public void onEditRequested(Uri contactLookupUri) {
+            startActivity(new Intent(Intent.ACTION_EDIT, contactLookupUri));
+        }
+
+        @Override
+        public void onItemClicked(Intent intent) {
+            try {
+                startActivity(intent);
+            } catch (ActivityNotFoundException e) {
+                Log.e(TAG, "No activity found for intent: " + intent);
+            }
+        }
+
+        @Override
+        public void onDeleteRequested(Uri lookupUri) {
+            getContactDeletionInteraction().deleteContact(lookupUri);
+        }
+
+        @Override
+        public void onCreateRawContactRequested(
+                ArrayList<ContentValues> values, Account account) {
+            Toast.makeText(ContactDetailActivity.this, R.string.toast_making_personal_copy,
+                    Toast.LENGTH_LONG).show();
+            Intent serviceIntent = ContactSaveService.createNewRawContactIntent(
+                    ContactDetailActivity.this, values, account);
+            startService(serviceIntent);
+
+        }
+    };
+}
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
new file mode 100644
index 0000000..8ac23a4
--- /dev/null
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -0,0 +1,173 @@
+/*
+ * 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.activities;
+
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.interactions.ContactDeletionInteraction;
+import com.android.contacts.util.DialogManager;
+import com.android.contacts.views.editor.ContactEditorFragment;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.ContentValues;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Intents.Insert;
+import android.util.Log;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+
+import java.util.ArrayList;
+
+public class ContactEditorActivity extends Activity implements
+        DialogManager.DialogShowingViewActivity {
+    private static final String TAG = "ContactEditorActivity";
+
+    private ContactEditorFragment mFragment;
+    private ContactDeletionInteraction mContactDeletionInteraction;
+    private Button mDoneButton;
+    private Button mRevertButton;
+
+    private DialogManager mDialogManager = new DialogManager(this);
+
+    @Override
+    public void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+
+        setContentView(R.layout.contact_editor_activity);
+
+        mFragment = (ContactEditorFragment) getFragmentManager().findFragmentById(
+                R.id.contact_editor_fragment);
+        mFragment.setListener(mFragmentListener);
+        mFragment.load(getIntent().getAction(), getIntent().getData(),
+                getIntent().resolveType(getContentResolver()), getIntent().getExtras());
+
+        // Depending on the use-case, this activity has Done and Revert buttons or not.
+        mDoneButton = (Button) findViewById(R.id.done);
+        mRevertButton = (Button) findViewById(R.id.revert);
+        if (mDoneButton != null) mDoneButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mFragment.save(true);
+            }
+        });
+        if (mRevertButton != null) mRevertButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                finish();
+            }
+        });
+
+        Log.i(TAG, getIntent().getData().toString());
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int id, Bundle args) {
+        if (DialogManager.isManagedId(id)) return mDialogManager.onCreateDialog(id, args);
+
+        // Nobody knows about the Dialog
+        Log.w(TAG, "Unknown dialog requested, id: " + id + ", args: " + args);
+        return null;
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            ContactsSearchManager.startSearch(this, initialQuery);
+        }
+    }
+
+    @Override
+    public void onBackPressed() {
+        mFragment.save(true);
+    }
+
+    private ContactDeletionInteraction getContactDeletionInteraction() {
+        if (mContactDeletionInteraction == null) {
+            mContactDeletionInteraction = new ContactDeletionInteraction();
+            mContactDeletionInteraction.attachToActivity(this);
+        }
+        return mContactDeletionInteraction;
+    }
+
+    private final ContactEditorFragment.Listener mFragmentListener =
+            new ContactEditorFragment.Listener() {
+        @Override
+        public void onReverted() {
+            finish();
+        }
+
+        @Override
+        public void onSaveFinished(int resultCode, Intent resultIntent) {
+            setResult(resultCode, resultIntent);
+            finish();
+        }
+
+        @Override
+        public void onContactSplit(Uri newLookupUri) {
+            finish();
+        }
+
+        @Override
+        public void onAccountSelectorAborted() {
+            finish();
+        }
+
+        @Override
+        public void onContactNotFound() {
+            setResult(Activity.RESULT_CANCELED, null);
+            finish();
+        }
+
+        @Override
+        public void setTitleTo(int resourceId) {
+            setTitle(resourceId);
+        }
+
+        @Override
+        public void onDeleteRequested(Uri lookupUri) {
+            getContactDeletionInteraction().deleteContact(lookupUri);
+        }
+
+        @Override
+        public void onEditOtherContactRequested(
+                Uri contactLookupUri, ArrayList<ContentValues> values) {
+            Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
+            intent.setFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
+                    | Intent.FLAG_ACTIVITY_FORWARD_RESULT);
+
+            // Pass on all the data that has been entered so far
+            if (values != null && values.size() != 0) {
+                intent.putParcelableArrayListExtra(Insert.DATA, values);
+            }
+
+            startActivity(intent);
+            finish();
+        }
+    };
+
+    @Override
+    public DialogManager getDialogManager() {
+        return mDialogManager;
+    }
+}
diff --git a/src/com/android/contacts/activities/ContactSearchActivity.java b/src/com/android/contacts/activities/ContactSearchActivity.java
new file mode 100644
index 0000000..5b52d9a
--- /dev/null
+++ b/src/com/android/contacts/activities/ContactSearchActivity.java
@@ -0,0 +1,186 @@
+/*
+ * 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.activities;
+
+import com.android.contacts.R;
+import com.android.contacts.interactions.ContactDeletionInteraction;
+import com.android.contacts.interactions.PhoneNumberInteraction;
+import com.android.contacts.list.ContactBrowseListContextMenuAdapter;
+import com.android.contacts.list.ContactBrowseListFragment;
+import com.android.contacts.list.ContactsIntentResolver;
+import com.android.contacts.list.ContactsRequest;
+import com.android.contacts.list.DefaultContactBrowseListFragment;
+import com.android.contacts.list.OnContactBrowserActionListener;
+import com.android.contacts.widget.SearchEditText;
+import com.android.contacts.widget.SearchEditText.OnFilterTextListener;
+
+import android.app.Activity;
+import android.content.ContentValues;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+
+public class ContactSearchActivity extends Activity {
+
+    private ContactsIntentResolver mIntentResolver;
+    private ContactsRequest mRequest;
+    private ContactBrowseListFragment mListFragment;
+    private PhoneNumberInteraction mPhoneNumberCallInteraction;
+    private PhoneNumberInteraction mSendTextMessageInteraction;
+    private ContactDeletionInteraction mContactDeletionInteraction;
+    private SearchEditText mSearchEditText;
+
+    public ContactSearchActivity() {
+        mIntentResolver = new ContactsIntentResolver(this);
+    }
+
+    @Override
+    protected void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+
+        // Extract relevant information from the intent
+        mRequest = mIntentResolver.resolveIntent(getIntent());
+        if (!mRequest.isValid()) {
+            setResult(RESULT_CANCELED);
+            finish();
+            return;
+        }
+
+        setTitle(mRequest.getActivityTitle());
+
+        setContentView(R.layout.contacts_search_content);
+
+        if (mListFragment == null) {
+            mListFragment = createContactSearchFragment();
+            getFragmentManager().openTransaction()
+                    .replace(R.id.list_container, mListFragment)
+                    .commit();
+        }
+
+        mSearchEditText = (SearchEditText)findViewById(R.id.search_src_text);
+        mSearchEditText.setText(mRequest.getQueryString());
+        mSearchEditText.setOnFilterTextListener(new OnFilterTextListener() {
+            @Override
+            public void onFilterChange(String queryString) {
+                mListFragment.setQueryString(queryString);
+            }
+
+            @Override
+            public void onCancelSearch() {
+                finish();
+            }
+        });
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        mSearchEditText.requestFocus();
+    }
+
+
+    private ContactBrowseListFragment createContactSearchFragment() {
+        DefaultContactBrowseListFragment fragment = new DefaultContactBrowseListFragment();
+        fragment.setOnContactListActionListener(new ContactBrowserActionListener());
+        fragment.setContextMenuAdapter(new ContactBrowseListContextMenuAdapter(fragment));
+        fragment.setSearchMode(true);
+        fragment.setDirectorySearchEnabled(true);
+        fragment.setAizyEnabled(false);
+        fragment.setSelectionVisible(true);
+        fragment.setEditMode(mRequest.getActionCode() ==
+                ContactsRequest.ACTION_INSERT_OR_EDIT_CONTACT);
+        return fragment;
+    }
+
+    private final class ContactBrowserActionListener implements OnContactBrowserActionListener {
+        @Override
+        public void onViewContactAction(Uri contactLookupUri) {
+            startActivity(new Intent(Intent.ACTION_VIEW, contactLookupUri));
+        }
+
+        @Override
+        public void onCreateNewContactAction() {
+        }
+
+        @Override
+        public void onEditContactAction(Uri contactLookupUri) {
+            Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
+            Bundle extras = getIntent().getExtras();
+            if (extras != null) {
+                intent.putExtras(extras);
+            }
+            startActivity(intent);
+        }
+
+        @Override
+        public void onAddToFavoritesAction(Uri contactUri) {
+            ContentValues values = new ContentValues(1);
+            values.put(Contacts.STARRED, 1);
+            getContentResolver().update(contactUri, values, null, null);
+        }
+
+        @Override
+        public void onRemoveFromFavoritesAction(Uri contactUri) {
+            ContentValues values = new ContentValues(1);
+            values.put(Contacts.STARRED, 0);
+            getContentResolver().update(contactUri, values, null, null);
+        }
+
+        @Override
+        public void onCallContactAction(Uri contactUri) {
+            getPhoneNumberCallInteraction().startInteraction(contactUri);
+        }
+
+        @Override
+        public void onSmsContactAction(Uri contactUri) {
+            getSendTextMessageInteraction().startInteraction(contactUri);
+        }
+
+        @Override
+        public void onDeleteContactAction(Uri contactUri) {
+            getContactDeletionInteraction().deleteContact(contactUri);
+        }
+
+        @Override
+        public void onFinishAction() {
+            onBackPressed();
+        }
+    }
+
+    private PhoneNumberInteraction getPhoneNumberCallInteraction() {
+        if (mPhoneNumberCallInteraction == null) {
+            mPhoneNumberCallInteraction = new PhoneNumberInteraction(this, false, null);
+        }
+        return mPhoneNumberCallInteraction;
+    }
+
+    private PhoneNumberInteraction getSendTextMessageInteraction() {
+        if (mSendTextMessageInteraction == null) {
+            mSendTextMessageInteraction = new PhoneNumberInteraction(this, true, null);
+        }
+        return mSendTextMessageInteraction;
+    }
+
+    private ContactDeletionInteraction getContactDeletionInteraction() {
+        if (mContactDeletionInteraction == null) {
+            mContactDeletionInteraction = new ContactDeletionInteraction();
+            mContactDeletionInteraction.attachToActivity(this);
+        }
+        return mContactDeletionInteraction;
+    }
+}
diff --git a/src/com/android/contacts/activities/ContactSelectionActivity.java b/src/com/android/contacts/activities/ContactSelectionActivity.java
new file mode 100644
index 0000000..06e5bf3
--- /dev/null
+++ b/src/com/android/contacts/activities/ContactSelectionActivity.java
@@ -0,0 +1,552 @@
+/*
+ * Copyright (C) 2007 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.activities;
+
+import com.android.contacts.R;
+import com.android.contacts.list.ContactEntryListFragment;
+import com.android.contacts.list.ContactPickerFragment;
+import com.android.contacts.list.ContactsIntentResolver;
+import com.android.contacts.list.ContactsRequest;
+import com.android.contacts.list.DefaultContactBrowseListFragment;
+import com.android.contacts.list.OnContactBrowserActionListener;
+import com.android.contacts.list.OnContactPickerActionListener;
+import com.android.contacts.list.OnPhoneNumberPickerActionListener;
+import com.android.contacts.list.OnPostalAddressPickerActionListener;
+import com.android.contacts.list.PhoneNumberPickerFragment;
+import com.android.contacts.list.PostalAddressPickerFragment;
+import com.android.contacts.widget.ContextMenuAdapter;
+import com.android.contacts.widget.SearchEditText;
+import com.android.contacts.widget.SearchEditText.OnFilterTextListener;
+
+import android.app.Activity;
+import android.app.Fragment;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+
+/**
+ * Displays a list of contacts (or phone numbers or postal addresses) for the
+ * purposes of selecting one.
+ */
+public class ContactSelectionActivity extends Activity implements View.OnCreateContextMenuListener {
+    private static final String TAG = "ContactSelectionActivity";
+
+    private static final String KEY_ACTION_CODE = "actionCode";
+
+    private ContactsIntentResolver mIntentResolver;
+    protected ContactEntryListFragment<?> mListFragment;
+
+    private int mActionCode = -1;
+
+    private boolean mSearchInitiated;
+
+    private ContactsRequest mRequest;
+    private SearchEditText mSearchEditText;
+
+    public ContactSelectionActivity() {
+        mIntentResolver = new ContactsIntentResolver(this);
+    }
+
+    @Override
+    public void onAttachFragment(Fragment fragment) {
+        if (fragment instanceof ContactEntryListFragment<?>) {
+            mListFragment = (ContactEntryListFragment<?>) fragment;
+            setupActionListener();
+        }
+    }
+
+    @Override
+    protected void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+
+        if (savedState != null) {
+            mActionCode = savedState.getInt(KEY_ACTION_CODE);
+        }
+
+        // Extract relevant information from the intent
+        mRequest = mIntentResolver.resolveIntent(getIntent());
+        if (!mRequest.isValid()) {
+            setResult(RESULT_CANCELED);
+            finish();
+            return;
+        }
+
+        Intent redirect = mRequest.getRedirectIntent();
+        if (redirect != null) {
+            // Need to start a different activity
+            startActivity(redirect);
+            finish();
+            return;
+        }
+
+        configureActivityTitle();
+        if (mRequest.isSearchMode()) {
+            setContentView(R.layout.contacts_search_content);
+            setupSearchUI();
+        } else {
+            setContentView(R.layout.contact_picker);
+        }
+        configureListFragment();
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putInt(KEY_ACTION_CODE, mActionCode);
+    }
+
+    private void setupSearchUI() {
+        mSearchEditText = (SearchEditText)findViewById(R.id.search_src_text);
+        mSearchEditText.setText(mRequest.getQueryString());
+        mSearchEditText.setOnFilterTextListener(new OnFilterTextListener() {
+            @Override
+            public void onFilterChange(String queryString) {
+                mListFragment.setQueryString(queryString);
+            }
+
+            @Override
+            public void onCancelSearch() {
+                finish();
+            }
+        });
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        if (mRequest.isSearchMode()) {
+            mSearchEditText.requestFocus();
+        }
+    }
+
+    private void configureActivityTitle() {
+        if (mRequest.getActivityTitle() != null) {
+            setTitle(mRequest.getActivityTitle());
+            return;
+        }
+
+        int actionCode = mRequest.getActionCode();
+        switch (actionCode) {
+            case ContactsRequest.ACTION_INSERT_OR_EDIT_CONTACT: {
+                setTitle(R.string.contactPickerActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_CONTACT: {
+                setTitle(R.string.contactPickerActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_OR_CREATE_CONTACT: {
+                setTitle(R.string.contactPickerActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_CREATE_SHORTCUT_CONTACT: {
+                setTitle(R.string.shortcutActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_PHONE: {
+                setTitle(R.string.contactPickerActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_CREATE_SHORTCUT_CALL: {
+                setTitle(R.string.callShortcutActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_CREATE_SHORTCUT_SMS: {
+                setTitle(R.string.messageShortcutActivityTitle);
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_POSTAL: {
+                setTitle(R.string.contactPickerActivityTitle);
+                break;
+            }
+        }
+    }
+
+    /**
+     * Creates the fragment based on the current request.
+     */
+    public void configureListFragment() {
+        if (mActionCode == mRequest.getActionCode()) {
+            return;
+        }
+
+        mActionCode = mRequest.getActionCode();
+        switch (mActionCode) {
+            case ContactsRequest.ACTION_INSERT_OR_EDIT_CONTACT: {
+                DefaultContactBrowseListFragment fragment = new DefaultContactBrowseListFragment();
+                fragment.setEditMode(true);
+                fragment.setCreateContactEnabled(true);
+                fragment.setSearchMode(mRequest.isSearchMode());
+                fragment.setQueryString(mRequest.getQueryString());
+                fragment.setDirectorySearchEnabled(false);
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_CONTACT: {
+                ContactPickerFragment fragment = new ContactPickerFragment();
+                fragment.setSearchMode(mRequest.isSearchMode());
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_OR_CREATE_CONTACT: {
+                ContactPickerFragment fragment = new ContactPickerFragment();
+                fragment.setCreateContactEnabled(!mRequest.isSearchMode());
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_CREATE_SHORTCUT_CONTACT: {
+                ContactPickerFragment fragment = new ContactPickerFragment();
+                fragment.setCreateContactEnabled(!mRequest.isSearchMode());
+                fragment.setSearchMode(mRequest.isSearchMode());
+                fragment.setQueryString(mRequest.getQueryString());
+                fragment.setDirectorySearchEnabled(mRequest.isDirectorySearchEnabled());
+                fragment.setShortcutRequested(true);
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_PHONE: {
+                PhoneNumberPickerFragment fragment = new PhoneNumberPickerFragment();
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_CREATE_SHORTCUT_CALL: {
+                PhoneNumberPickerFragment fragment = new PhoneNumberPickerFragment();
+                fragment.setShortcutAction(Intent.ACTION_CALL);
+                fragment.setSearchMode(mRequest.isSearchMode());
+
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_CREATE_SHORTCUT_SMS: {
+                PhoneNumberPickerFragment fragment = new PhoneNumberPickerFragment();
+                fragment.setShortcutAction(Intent.ACTION_SENDTO);
+                fragment.setSearchMode(mRequest.isSearchMode());
+
+                mListFragment = fragment;
+                break;
+            }
+
+            case ContactsRequest.ACTION_PICK_POSTAL: {
+                PostalAddressPickerFragment fragment = new PostalAddressPickerFragment();
+                mListFragment = fragment;
+                break;
+            }
+
+            default:
+                throw new IllegalStateException("Invalid action code: " + mActionCode);
+        }
+
+        mListFragment.setLegacyCompatibilityMode(mRequest.isLegacyCompatibilityMode());
+        mListFragment.setContactsRequest(mRequest);
+        getFragmentManager().openTransaction()
+                .replace(R.id.list_container, mListFragment)
+                .commit();
+    }
+
+    public void setupActionListener() {
+        if (mListFragment instanceof DefaultContactBrowseListFragment) {
+            ((DefaultContactBrowseListFragment) mListFragment).setOnContactListActionListener(
+                    new ContactBrowserActionListener());
+        } else if (mListFragment instanceof ContactPickerFragment) {
+            ((ContactPickerFragment) mListFragment).setOnContactPickerActionListener(
+                    new ContactPickerActionListener());
+        } else if (mListFragment instanceof PhoneNumberPickerFragment) {
+            ((PhoneNumberPickerFragment) mListFragment).setOnPhoneNumberPickerActionListener(
+                    new PhoneNumberPickerActionListener());
+        } else if (mListFragment instanceof PostalAddressPickerFragment) {
+            ((PostalAddressPickerFragment) mListFragment).setOnPostalAddressPickerActionListener(
+                    new PostalAddressPickerActionListener());
+        } else {
+            throw new IllegalStateException("Unsupported list fragment type: " + mListFragment);
+        }
+    }
+
+    private final class ContactBrowserActionListener implements OnContactBrowserActionListener {
+        @Override
+        public void onViewContactAction(Uri contactLookupUri) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void onCreateNewContactAction() {
+            Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+            Bundle extras = getIntent().getExtras();
+            if (extras != null) {
+                intent.putExtras(extras);
+            }
+            startActivity(intent);
+        }
+
+        @Override
+        public void onEditContactAction(Uri contactLookupUri) {
+            Intent intent = new Intent(Intent.ACTION_EDIT, contactLookupUri);
+            Bundle extras = getIntent().getExtras();
+            if (extras != null) {
+                intent.putExtras(extras);
+            }
+            startActivity(intent);
+        }
+
+        @Override
+        public void onAddToFavoritesAction(Uri contactUri) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void onRemoveFromFavoritesAction(Uri contactUri) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void onCallContactAction(Uri contactUri) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void onSmsContactAction(Uri contactUri) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void onDeleteContactAction(Uri contactUri) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void onFinishAction() {
+            onBackPressed();
+        }
+    }
+
+    private final class ContactPickerActionListener implements OnContactPickerActionListener {
+        @Override
+        public void onCreateNewContactAction() {
+            Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+            startActivityAndForwardResult(intent);
+        }
+
+        @Override
+        public void onPickContactAction(Uri contactUri) {
+            Intent intent = new Intent();
+            setResult(RESULT_OK, intent.setData(contactUri));
+            finish();
+        }
+
+        @Override
+        public void onShortcutIntentCreated(Intent intent) {
+            setResult(RESULT_OK, intent);
+            finish();
+        }
+    }
+
+    private final class PhoneNumberPickerActionListener implements
+            OnPhoneNumberPickerActionListener {
+        @Override
+        public void onPickPhoneNumberAction(Uri dataUri) {
+            Intent intent = new Intent();
+            setResult(RESULT_OK, intent.setData(dataUri));
+            finish();
+        }
+
+        @Override
+        public void onShortcutIntentCreated(Intent intent) {
+            setResult(RESULT_OK, intent);
+            finish();
+        }
+    }
+
+    private final class PostalAddressPickerActionListener implements
+            OnPostalAddressPickerActionListener {
+        @Override
+        public void onPickPostalAddressAction(Uri dataUri) {
+            Intent intent = new Intent();
+            setResult(RESULT_OK, intent.setData(dataUri));
+            finish();
+        }
+    }
+
+    public void startActivityAndForwardResult(final Intent intent) {
+        intent.setFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT);
+
+        // Forward extras to the new activity
+        Bundle extras = getIntent().getExtras();
+        if (extras != null) {
+            intent.putExtras(extras);
+        }
+        startActivity(intent);
+        finish();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+
+        MenuInflater inflater = getMenuInflater();
+        if (!mListFragment.isSearchMode()) {
+            inflater.inflate(R.menu.search, menu);
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_search: {
+                onSearchRequested();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+// TODO
+//        if (mProviderStatus != ProviderStatus.STATUS_NORMAL) {
+//            return;
+//        }
+
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            mListFragment.startSearch(initialQuery);
+        }
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        switch (requestCode) {
+//            case SUBACTIVITY_NEW_CONTACT:
+//                if (resultCode == RESULT_OK) {
+//                    returnPickerResult(null, data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME),
+//                            data.getData());
+//                    setRe
+//                }
+//                break;
+
+//            case SUBACTIVITY_VIEW_CONTACT:
+//                if (resultCode == RESULT_OK) {
+//                    mAdapter.notifyDataSetChanged();
+//                }
+//                break;
+//
+//            case SUBACTIVITY_DISPLAY_GROUP:
+//                // Mark as just created so we re-run the view query
+////                mJustCreated = true;
+//                break;
+//
+            case ContactEntryListFragment.ACTIVITY_REQUEST_CODE_PICKER:
+                if (resultCode == RESULT_OK) {
+                    mListFragment.onPickerResult(data);
+                }
+
+// TODO fix or remove multipicker code
+//                else if (resultCode == RESULT_CANCELED && mMode == MODE_PICK_MULTIPLE_PHONES) {
+//                    // Finish the activity if the sub activity was canceled as back key is used
+//                    // to confirm user selection in MODE_PICK_MULTIPLE_PHONES.
+//                    finish();
+//                }
+//                break;
+        }
+    }
+
+    @Override
+    public boolean onContextItemSelected(MenuItem item) {
+        ContextMenuAdapter menuAdapter = mListFragment.getContextMenuAdapter();
+        if (menuAdapter != null) {
+            return menuAdapter.onContextItemSelected(item);
+        }
+
+        return super.onContextItemSelected(item);
+    }
+
+    /**
+     * Event handler for the use case where the user starts typing without
+     * bringing up the search UI first.
+     */
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if (!mSearchInitiated && !mRequest.isSearchMode()) {
+            int unicodeChar = event.getUnicodeChar();
+            if (unicodeChar != 0) {
+                mSearchInitiated = true;
+                startSearch(new String(new int[]{unicodeChar}, 0, 1), false, null, false);
+                return true;
+            }
+        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        // TODO move to the fragment
+        switch (keyCode) {
+//            case KeyEvent.KEYCODE_CALL: {
+//                if (callSelection()) {
+//                    return true;
+//                }
+//                break;
+//            }
+
+            case KeyEvent.KEYCODE_DEL: {
+                if (deleteSelection()) {
+                    return true;
+                }
+                break;
+            }
+        }
+
+        return super.onKeyDown(keyCode, event);
+    }
+
+    private boolean deleteSelection() {
+        // TODO move to the fragment
+//        if (mActionCode == ContactsRequest.ACTION_DEFAULT) {
+//            final int position = mListView.getSelectedItemPosition();
+//            if (position != ListView.INVALID_POSITION) {
+//                Uri contactUri = getContactUri(position);
+//                if (contactUri != null) {
+//                    doContactDelete(contactUri);
+//                    return true;
+//                }
+//            }
+//        }
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/activities/ContactsFrontDoor.java b/src/com/android/contacts/activities/ContactsFrontDoor.java
new file mode 100644
index 0000000..d8ffd7a
--- /dev/null
+++ b/src/com/android/contacts/activities/ContactsFrontDoor.java
@@ -0,0 +1,52 @@
+/*
+ * 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.activities;
+
+import com.android.contacts.DialtactsActivity;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.content.res.Configuration;
+import android.os.Bundle;
+
+public class ContactsFrontDoor extends Activity {
+    public static final String EXTRA_FRONT_DOOR = "front_door";
+
+    @Override
+    public void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+
+        Intent intent = new Intent();
+        intent.setFlags(
+                Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS | Intent.FLAG_ACTIVITY_FORWARD_RESULT);
+        intent.putExtra(EXTRA_FRONT_DOOR, true);
+
+        // The user launched the config based front door, pick the right activity to go to
+        Configuration config = getResources().getConfiguration();
+        int screenLayoutSize = config.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
+        if (screenLayoutSize == Configuration.SCREENLAYOUT_SIZE_XLARGE) {
+            // XL screen, use two pane UI
+            intent.setClass(this, ContactBrowserActivity.class);
+        } else {
+            // Default to the normal dialtacts layout
+            intent.setClass(this, DialtactsActivity.class);
+        }
+
+        startActivity(intent);
+        finish();
+    }
+}
diff --git a/src/com/android/contacts/activities/ShowOrCreateActivity.java b/src/com/android/contacts/activities/ShowOrCreateActivity.java
new file mode 100755
index 0000000..5eb7106
--- /dev/null
+++ b/src/com/android/contacts/activities/ShowOrCreateActivity.java
@@ -0,0 +1,258 @@
+/*
+ * Copyright (C) 2009 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.activities;
+
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.util.Constants;
+import com.android.contacts.util.NotifyingAsyncQueryHandler;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.ContentUris;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Intents;
+import android.provider.ContactsContract.PhoneLookup;
+import android.provider.ContactsContract.RawContacts;
+import android.util.Log;
+
+/**
+ * Handle several edge cases around showing or possibly creating contacts in
+ * connected with a specific E-mail address or phone number. Will search based
+ * on incoming {@link Intent#getData()} as described by
+ * {@link Intents#SHOW_OR_CREATE_CONTACT}.
+ * <ul>
+ * <li>If no matching contacts found, will prompt user with dialog to add to a
+ * contact, then will use {@link Intent#ACTION_INSERT_OR_EDIT} to let create new
+ * contact or edit new data into an existing one.
+ * <li>If one matching contact found, directly show {@link Intent#ACTION_VIEW}
+ * that specific contact.
+ * <li>If more than one matching found, show list of matching contacts using
+ * {@link Intent#ACTION_SEARCH}.
+ * </ul>
+ */
+public final class ShowOrCreateActivity extends Activity implements
+        NotifyingAsyncQueryHandler.AsyncQueryListener {
+    static final String TAG = "ShowOrCreateActivity";
+    static final boolean LOGD = false;
+
+    static final String[] PHONES_PROJECTION = new String[] {
+        PhoneLookup._ID,
+    };
+
+    static final String[] CONTACTS_PROJECTION = new String[] {
+        RawContacts.CONTACT_ID,
+    };
+
+    static final int CONTACT_ID_INDEX = 0;
+
+    static final int CREATE_CONTACT_DIALOG = 1;
+
+    static final int QUERY_TOKEN = 42;
+
+    private NotifyingAsyncQueryHandler mQueryHandler;
+
+    private Bundle mCreateExtras;
+    private String mCreateDescrip;
+    private boolean mCreateForce;
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+
+        // Create handler if doesn't exist, otherwise cancel any running
+        if (mQueryHandler == null) {
+            mQueryHandler = new NotifyingAsyncQueryHandler(this, this);
+        } else {
+            mQueryHandler.cancelOperation(QUERY_TOKEN);
+        }
+
+        final Intent intent = getIntent();
+        final Uri data = intent.getData();
+
+        // Unpack scheme and target data from intent
+        String scheme = null;
+        String ssp = null;
+        if (data != null) {
+            scheme = data.getScheme();
+            ssp = data.getSchemeSpecificPart();
+        }
+
+        // Build set of extras for possible use when creating contact
+        mCreateExtras = new Bundle();
+        Bundle originalExtras = intent.getExtras();
+        if (originalExtras != null) {
+            mCreateExtras.putAll(originalExtras);
+        }
+
+        // Read possible extra with specific title
+        mCreateDescrip = intent.getStringExtra(Intents.EXTRA_CREATE_DESCRIPTION);
+        if (mCreateDescrip == null) {
+            mCreateDescrip = ssp;
+        }
+
+        // Allow caller to bypass dialog prompt
+        mCreateForce = intent.getBooleanExtra(Intents.EXTRA_FORCE_CREATE, false);
+
+        // Handle specific query request
+        if (Constants.SCHEME_MAILTO.equals(scheme)) {
+            mCreateExtras.putString(Intents.Insert.EMAIL, ssp);
+
+            Uri uri = Uri.withAppendedPath(Email.CONTENT_FILTER_URI, Uri.encode(ssp));
+            mQueryHandler.startQuery(QUERY_TOKEN, null, uri, CONTACTS_PROJECTION, null, null, null);
+
+        } else if (Constants.SCHEME_TEL.equals(scheme)) {
+            mCreateExtras.putString(Intents.Insert.PHONE, ssp);
+
+            Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, ssp);
+            mQueryHandler.startQuery(QUERY_TOKEN, null, uri, PHONES_PROJECTION, null, null, null);
+
+        } else {
+            Log.w(TAG, "Invalid intent:" + getIntent());
+            finish();
+        }
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+        if (mQueryHandler != null) {
+            mQueryHandler.cancelOperation(QUERY_TOKEN);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onQueryComplete(int token, Object cookie, Cursor cursor) {
+        if (cursor == null) {
+            // Bail when problem running query in background
+            finish();
+            return;
+        }
+
+        // Count contacts found by query
+        int count = 0;
+        long contactId = -1;
+        try {
+            count = cursor.getCount();
+            if (count == 1 && cursor.moveToFirst()) {
+                // Try reading ID if only one contact returned
+                contactId = cursor.getLong(CONTACT_ID_INDEX);
+            }
+        } finally {
+            cursor.close();
+        }
+
+        if (count == 1 && contactId != -1) {
+            // If we only found one item, jump right to viewing it
+            final Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+            final Intent viewIntent = new Intent(Intent.ACTION_VIEW, contactUri);
+            startActivity(viewIntent);
+            finish();
+
+        } else if (count > 1) {
+            // If more than one, show pick list
+            Intent listIntent = new Intent(Intent.ACTION_SEARCH);
+            listIntent.setComponent(new ComponentName(this, ContactBrowserActivity.class));
+            listIntent.putExtras(mCreateExtras);
+            startActivity(listIntent);
+            finish();
+
+        } else {
+            // No matching contacts found
+            if (mCreateForce) {
+                // Forced to create new contact
+                Intent createIntent = new Intent(Intent.ACTION_INSERT, RawContacts.CONTENT_URI);
+                createIntent.putExtras(mCreateExtras);
+                createIntent.setType(RawContacts.CONTENT_TYPE);
+
+                startActivity(createIntent);
+                finish();
+
+            } else {
+	        showDialog(CREATE_CONTACT_DIALOG);
+           }
+        }
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int id) {
+        switch(id) {
+	    case CREATE_CONTACT_DIALOG:
+                // Prompt user to insert or edit contact
+                final Intent createIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
+                createIntent.putExtras(mCreateExtras);
+                createIntent.setType(RawContacts.CONTENT_ITEM_TYPE);
+
+                final CharSequence message = getResources().getString(
+                        R.string.add_contact_dlg_message_fmt, mCreateDescrip);
+
+                return new AlertDialog.Builder(this)
+                        .setTitle(R.string.add_contact_dlg_title)
+                        .setMessage(message)
+                        .setPositiveButton(android.R.string.ok,
+                                new IntentClickListener(this, createIntent))
+                        .setNegativeButton(android.R.string.cancel,
+                                new IntentClickListener(this, null))
+                        .create();
+        }
+	return super.onCreateDialog(id);
+    }
+
+    /**
+     * Listener for {@link DialogInterface} that launches a given {@link Intent}
+     * when clicked. When clicked, this also closes the parent using
+     * {@link Activity#finish()}.
+     */
+    private static class IntentClickListener implements DialogInterface.OnClickListener {
+        private Activity mParent;
+        private Intent mIntent;
+
+        /**
+         * @param parent {@link Activity} to use for launching target.
+         * @param intent Target {@link Intent} to launch when clicked.
+         */
+        public IntentClickListener(Activity parent, Intent intent) {
+            mParent = parent;
+            mIntent = intent;
+        }
+
+        public void onClick(DialogInterface dialog, int which) {
+            if (mIntent != null) {
+                mParent.startActivity(mIntent);
+            }
+            mParent.finish();
+        }
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            ContactsSearchManager.startSearch(this, initialQuery);
+        }
+    }
+}
diff --git a/src/com/android/contacts/interactions/ContactDeletionInteraction.java b/src/com/android/contacts/interactions/ContactDeletionInteraction.java
new file mode 100644
index 0000000..76ca76e
--- /dev/null
+++ b/src/com/android/contacts/interactions/ContactDeletionInteraction.java
@@ -0,0 +1,201 @@
+/*
+ * 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.interactions;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.AccountTypes;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.content.DialogInterface;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.RawContacts;
+import android.util.Log;
+
+// TODO: This should respect the lookup element. The Id might by now refer to a different contact
+/**
+ * An interaction invoked to delete a contact.
+ */
+public class ContactDeletionInteraction {
+
+    private static final String TAG = "ContactDeletionInteraction";
+
+    public static final String EXTRA_KEY_CONTACT_URI = "contactUri";
+    public static final String EXTRA_KEY_MESSAGE_ID = "messageId";
+
+    private static final String[] RAW_CONTACTS_PROJECTION = new String[] {
+        RawContacts._ID, //0
+        RawContacts.ACCOUNT_TYPE, //1
+    };
+
+    private final class RawContactLoader extends CursorLoader {
+        private final Uri mContactUri;
+
+        private RawContactLoader(Context context, Uri contactUri) {
+            super(context,
+                    RawContacts.CONTENT_URI,
+                    RAW_CONTACTS_PROJECTION,
+                    RawContacts.CONTACT_ID + "=?",
+                    new String[] { String.valueOf(ContentUris.parseId(contactUri)) },
+                    null);
+            this.mContactUri = contactUri;
+        }
+
+        @Override
+        public void deliverResult(Cursor data) {
+            if (data == null || data.getCount() == 0) {
+                Log.e(TAG, "No such contact: " + mContactUri);
+                return;
+            }
+
+            showConfirmationDialog(data, mContactUri);
+        }
+    }
+
+    private final class ConfirmationDialogClickListener implements DialogInterface.OnClickListener {
+        private final Uri mContactUri;
+
+        public ConfirmationDialogClickListener(Uri contactUri) {
+            this.mContactUri = contactUri;
+        }
+
+        public void onClick(DialogInterface dialog, int which) {
+            doDeleteContact(mContactUri);
+        }
+    }
+
+    private Context mContext;
+    private CursorLoader mLoader;
+
+    public void attachToActivity(Activity activity) {
+        setContext(activity);
+    }
+
+    /* Visible for testing */
+    void setContext(Context context) {
+        mContext = context;
+    }
+
+    public void deleteContact(Uri contactUri) {
+        if (mLoader != null) {
+            mLoader.destroy();
+        }
+        mLoader = new RawContactLoader(mContext, contactUri);
+        startLoading(mLoader);
+    }
+
+    protected void showConfirmationDialog(Cursor cursor, Uri contactUri) {
+        int  writableSourcesCnt = 0;
+        int  readOnlySourcesCnt = 0;
+
+        AccountTypes sources = getSources();
+        try {
+            while (cursor.moveToNext()) {
+                final long rawContactId = cursor.getLong(0);
+                final String accountType = cursor.getString(1);
+                BaseAccountType contactsSource = sources.getInflatedSource(accountType,
+                        BaseAccountType.LEVEL_SUMMARY);
+                boolean readonly = contactsSource != null && contactsSource.readOnly;
+                if (readonly) {
+                    readOnlySourcesCnt ++;
+                } else {
+                    writableSourcesCnt ++;
+                }
+            }
+        } finally {
+            cursor.close();
+        }
+
+        int messageId;
+        if (readOnlySourcesCnt > 0 && writableSourcesCnt > 0) {
+            messageId = R.string.readOnlyContactDeleteConfirmation;
+        } else if (readOnlySourcesCnt > 0 && writableSourcesCnt == 0) {
+            messageId = R.string.readOnlyContactWarning;
+        } else if (readOnlySourcesCnt == 0 && writableSourcesCnt > 1) {
+            messageId = R.string.multipleContactDeleteConfirmation;
+        } else {
+            messageId = R.string.deleteConfirmation;
+        }
+
+        Bundle bundle = new Bundle();
+        bundle.putParcelable(EXTRA_KEY_CONTACT_URI, contactUri);
+        bundle.putInt(EXTRA_KEY_MESSAGE_ID, messageId);
+
+        showDialog(bundle);
+    }
+
+    /**
+     * Creates a delete confirmation dialog and returns it.  Returns null if the
+     * id is not for a deletion confirmation.
+     */
+    public Dialog onCreateDialog(int id, Bundle bundle) {
+        if (id != R.id.dialog_delete_contact_confirmation) {
+            return null;
+        }
+
+        return new AlertDialog.Builder(mContext)
+                .setTitle(R.string.deleteConfirmation_title)
+                .setIcon(android.R.drawable.ic_dialog_alert)
+                .setMessage(R.string.deleteConfirmation)
+                .setNegativeButton(android.R.string.cancel, null)
+                .setPositiveButton(android.R.string.ok, null)
+                .create();
+    }
+
+    public boolean onPrepareDialog(int id, Dialog dialog, Bundle bundle) {
+        if (id != R.id.dialog_delete_contact_confirmation) {
+            return false;
+        }
+
+        Uri contactUri = bundle.getParcelable(EXTRA_KEY_CONTACT_URI);
+        int messageId = bundle.getInt(EXTRA_KEY_MESSAGE_ID, R.string.deleteConfirmation);
+
+        ((AlertDialog)dialog).setMessage(mContext.getText(messageId));
+        ((AlertDialog)dialog).setButton(DialogInterface.BUTTON_POSITIVE,
+                mContext.getText(android.R.string.ok),
+                new ConfirmationDialogClickListener(contactUri));
+
+        return true;
+    }
+
+    protected void doDeleteContact(Uri contactUri) {
+        mContext.getContentResolver().delete(contactUri, null, null);
+    }
+
+    /* Visible for testing */
+    void startLoading(Loader<Cursor> loader) {
+        loader.startLoading();
+    }
+
+    /* Visible for testing */
+    AccountTypes getSources() {
+        return AccountTypes.getInstance(mContext);
+    }
+
+    /* Visible for testing */
+    void showDialog(Bundle bundle) {
+        ((Activity)mContext).showDialog(R.id.dialog_delete_contact_confirmation, bundle);
+    }
+}
diff --git a/src/com/android/contacts/interactions/ImportExportInteraction.java b/src/com/android/contacts/interactions/ImportExportInteraction.java
new file mode 100644
index 0000000..1055672
--- /dev/null
+++ b/src/com/android/contacts/interactions/ImportExportInteraction.java
@@ -0,0 +1,217 @@
+/*
+ * 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.interactions;
+
+import com.android.contacts.R;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.util.AccountSelectionUtil;
+import com.android.contacts.vcard.ExportVCardActivity;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+import android.telephony.TelephonyManager;
+import android.util.Log;
+import android.view.ContextThemeWrapper;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.List;
+
+/**
+ * An interaction invoked to import/export contacts.
+ */
+public class ImportExportInteraction {
+
+    private static final String TAG = "ImportExportInteraction";
+
+    private final String[] LOOKUP_PROJECTION = new String[] {
+            Contacts.LOOKUP_KEY
+    };
+
+    private final Context mContext;
+
+    public ImportExportInteraction(Context context) {
+        this.mContext = context;
+    }
+
+    /**
+     * Creates a {@link Dialog} that allows the user to choose between a bulk import
+     * and bulk export task across all contacts.
+     */
+    public void startInteraction() {
+        showDialog(R.id.dialog_import_export_options, null);
+    }
+
+    public Dialog onCreateDialog(int id, Bundle bundle) {
+        switch (id) {
+            case R.id.dialog_import_export_options: {
+                return createOptionsDialog();
+            }
+            case R.string.import_from_sim:
+            case R.string.import_from_sdcard: {
+                return AccountSelectionUtil.getSelectAccountDialog(mContext, id);
+            }
+            case R.id.dialog_sdcard_not_found: {
+                return new AlertDialog.Builder(mContext)
+                        .setTitle(R.string.no_sdcard_title)
+                        .setIcon(android.R.drawable.ic_dialog_alert)
+                        .setMessage(R.string.no_sdcard_message)
+                        .setPositiveButton(android.R.string.ok, null).create();
+            }
+        }
+
+        return null;
+    }
+
+    private Dialog createOptionsDialog() {
+        // Wrap our context to inflate list items using the correct theme
+        final Resources res = mContext.getResources();
+        final LayoutInflater dialogInflater = (LayoutInflater)mContext
+                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+        // Adapter that shows a list of string resources
+        final ArrayAdapter<Integer> adapter = new ArrayAdapter<Integer>(mContext,
+                android.R.layout.select_dialog_item) {
+            @Override
+            public View getView(int position, View convertView, ViewGroup parent) {
+                if (convertView == null) {
+                    convertView = dialogInflater.inflate(android.R.layout.select_dialog_item,
+                            parent, false);
+                }
+
+                final int resId = this.getItem(position);
+                ((TextView)convertView).setText(resId);
+                return convertView;
+            }
+        };
+
+        if (TelephonyManager.getDefault().hasIccCard()) {
+            adapter.add(R.string.import_from_sim);
+        }
+        if (res.getBoolean(R.bool.config_allow_import_from_sdcard)) {
+            adapter.add(R.string.import_from_sdcard);
+        }
+        if (res.getBoolean(R.bool.config_allow_export_to_sdcard)) {
+            adapter.add(R.string.export_to_sdcard);
+        }
+        if (res.getBoolean(R.bool.config_allow_share_visible_contacts)) {
+            adapter.add(R.string.share_visible_contacts);
+        }
+
+        final DialogInterface.OnClickListener clickListener =
+                new DialogInterface.OnClickListener() {
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.dismiss();
+
+                final int resId = adapter.getItem(which);
+                switch (resId) {
+                    case R.string.import_from_sim:
+                    case R.string.import_from_sdcard: {
+                        handleImportRequest(resId);
+                        break;
+                    }
+                    case R.string.export_to_sdcard: {
+                        Intent exportIntent = new Intent(mContext, ExportVCardActivity.class);
+                        mContext.startActivity(exportIntent);
+                        break;
+                    }
+                    case R.string.share_visible_contacts: {
+                        doShareVisibleContacts();
+                        break;
+                    }
+                    default: {
+                        Log.e(TAG, "Unexpected resource: " +
+                                mContext.getResources().getResourceEntryName(resId));
+                    }
+                }
+            }
+        };
+
+        return new AlertDialog.Builder(mContext)
+                .setTitle(R.string.dialog_import_export)
+                .setNegativeButton(android.R.string.cancel, null)
+                .setSingleChoiceItems(adapter, -1, clickListener)
+                .create();
+    }
+
+    private void doShareVisibleContacts() {
+
+        // TODO move the query into a loader
+        final Cursor cursor = mContext.getContentResolver().query(Contacts.CONTENT_URI,
+                LOOKUP_PROJECTION, Contacts.IN_VISIBLE_GROUP + "!=0", null, null);
+        try {
+            if (!cursor.moveToFirst()) {
+                Toast.makeText(mContext, R.string.share_error, Toast.LENGTH_SHORT).show();
+                return;
+            }
+
+            StringBuilder uriListBuilder = new StringBuilder();
+            int index = 0;
+            while (cursor.moveToNext()) {
+                if (index != 0)
+                    uriListBuilder.append(':');
+                uriListBuilder.append(cursor.getString(0));
+                index++;
+            }
+            Uri uri = Uri.withAppendedPath(
+                    Contacts.CONTENT_MULTI_VCARD_URI,
+                    Uri.encode(uriListBuilder.toString()));
+
+            final Intent intent = new Intent(Intent.ACTION_SEND);
+            intent.setType(Contacts.CONTENT_VCARD_TYPE);
+            intent.putExtra(Intent.EXTRA_STREAM, uri);
+            mContext.startActivity(intent);
+        } finally {
+            cursor.close();
+        }
+    }
+
+    private void handleImportRequest(int resId) {
+        // There are three possibilities:
+        // - more than one accounts -> ask the user
+        // - just one account -> use the account without asking the user
+        // - no account -> use phone-local storage without asking the user
+        final AccountTypes sources = AccountTypes.getInstance(mContext);
+        final List<Account> accountList = sources.getAccounts(true);
+        final int size = accountList.size();
+        if (size > 1) {
+            showDialog(resId, null);
+            return;
+        }
+
+        AccountSelectionUtil.doImport(mContext, resId, (size == 1 ? accountList.get(0) : null));
+    }
+
+    /* Visible for testing */
+    void showDialog(int dialogId, Bundle bundle) {
+        ((Activity)mContext).showDialog(dialogId, bundle);
+    }
+}
diff --git a/src/com/android/contacts/interactions/PhoneNumberInteraction.java b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
new file mode 100644
index 0000000..ac3c3c8
--- /dev/null
+++ b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
@@ -0,0 +1,365 @@
+/*
+ * 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.interactions;
+
+
+import com.android.contacts.Collapser;
+import com.android.contacts.Collapser.Collapsible;
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.BaseAccountType.StringInflater;
+import com.android.contacts.model.AccountTypes;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnClickListener;
+import android.content.DialogInterface.OnDismissListener;
+import android.content.Intent;
+import android.content.Loader;
+import android.content.Loader.OnLoadCompleteListener;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.telephony.PhoneNumberUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.CheckBox;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * Initiates phone calls or a text message.
+ */
+public class PhoneNumberInteraction
+        implements OnLoadCompleteListener<Cursor>, OnClickListener {
+
+    public static final String EXTRA_KEY_ITEMS = "items";
+
+    /**
+     * A model object for capturing a phone number for a given contact.
+     */
+    static class PhoneItem implements Parcelable, Collapsible<PhoneItem> {
+        long id;
+        String phoneNumber;
+        String accountType;
+        long type;
+        String label;
+
+        public static Parcelable.Creator<PhoneItem> CREATOR = new Creator<PhoneItem>() {
+
+            public PhoneItem[] newArray(int size) {
+                return new PhoneItem[size];
+            }
+
+            public PhoneItem createFromParcel(Parcel source) {
+                PhoneItem item = new PhoneItem();
+                item.id = source.readLong();
+                item.phoneNumber = source.readString();
+                item.accountType = source.readString();
+                item.type = source.readLong();
+                item.label = source.readString();
+                return item;
+            }
+        };
+
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeLong(id);
+            dest.writeString(phoneNumber);
+            dest.writeString(accountType);
+            dest.writeLong(type);
+            dest.writeString(label);
+        }
+
+        public int describeContents() {
+            return 0;
+        }
+
+        public boolean collapseWith(PhoneItem phoneItem) {
+            if (!shouldCollapseWith(phoneItem)) {
+                return false;
+            }
+            // Just keep the number and id we already have.
+            return true;
+        }
+
+        public boolean shouldCollapseWith(PhoneItem phoneItem) {
+            if (PhoneNumberUtils.compareStrictly(phoneNumber, phoneItem.phoneNumber)) {
+                return true;
+            }
+            return false;
+        }
+
+        @Override
+        public String toString() {
+            return phoneNumber;
+        }
+    }
+
+    /**
+     * A list adapter that populates the list of contact's phone numbers.
+     */
+    private class PhoneItemAdapter extends ArrayAdapter<PhoneItem> {
+        private final AccountTypes mSources;
+
+        public PhoneItemAdapter(Context context) {
+            super(context, R.layout.phone_disambig_item, android.R.id.text2);
+            mSources = AccountTypes.getInstance(context);
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            View view = super.getView(position, convertView, parent);
+
+            PhoneItem item = getItem(position);
+            BaseAccountType source = mSources.getInflatedSource(item.accountType,
+                    BaseAccountType.LEVEL_SUMMARY);
+
+            // Obtain a string representation of the phone type specific to the
+            // ContactSource associated with that phone number
+            TextView typeView = (TextView)view.findViewById(android.R.id.text1);
+            DataKind kind = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
+            if (kind != null) {
+                ContentValues values = new ContentValues();
+                values.put(Phone.TYPE, item.type);
+                values.put(Phone.LABEL, item.label);
+                StringInflater header = mSendTextMessage ? kind.actionAltHeader : kind.actionHeader;
+                typeView.setText(header.inflateUsing(getContext(), values));
+            } else {
+                typeView.setText(R.string.call_other);
+            }
+            return view;
+        }
+    }
+
+    private static final String[] PHONE_NUMBER_PROJECTION = new String[] {
+            Phone._ID,
+            Phone.NUMBER,
+            Phone.IS_SUPER_PRIMARY,
+            RawContacts.ACCOUNT_TYPE,
+            Phone.TYPE,
+            Phone.LABEL
+    };
+
+    private static final String PHONE_NUMBER_SELECTION = Data.MIMETYPE + "='"
+            + Phone.CONTENT_ITEM_TYPE + "' AND " + Phone.NUMBER + " NOT NULL";
+
+    private final Context mContext;
+    private final OnDismissListener mDismissListener;
+    private final boolean mSendTextMessage;
+
+    private CursorLoader mLoader;
+
+    public PhoneNumberInteraction(Context context, boolean sendTextMessage,
+            DialogInterface.OnDismissListener dismissListener) {
+        mContext = context;
+        mSendTextMessage = sendTextMessage;
+        mDismissListener = dismissListener;
+    }
+
+    private void performAction(String phoneNumber) {
+        Intent intent;
+        if (mSendTextMessage) {
+            intent = new Intent(
+                    Intent.ACTION_SENDTO, Uri.fromParts("sms", phoneNumber, null));
+        } else {
+            intent = new Intent(
+                    Intent.ACTION_CALL_PRIVILEGED, Uri.fromParts("tel", phoneNumber, null));
+
+        }
+        startActivity(intent);
+    }
+
+    /**
+     * Initiates the interaction. This may result in a phone call or sms message started
+     * or a disambiguation dialog to determine which phone number should be used.
+     */
+    public void startInteraction(Uri contactUri) {
+        if (mLoader != null) {
+            mLoader.destroy();
+        }
+
+        mLoader = new CursorLoader(mContext,
+                Uri.withAppendedPath(contactUri, Contacts.Data.CONTENT_DIRECTORY),
+                PHONE_NUMBER_PROJECTION,
+                PHONE_NUMBER_SELECTION,
+                null,
+                null);
+        mLoader.registerListener(0, this);
+        startLoading(mLoader);
+    }
+
+    @Override
+    public void onLoadComplete(Loader<Cursor> loader, Cursor cursor) {
+        if (cursor == null) {
+            onDismiss();
+            return;
+        }
+
+        ArrayList<PhoneItem> phoneList = new ArrayList<PhoneItem>();
+        String primaryPhone = null;
+        try {
+            while (cursor.moveToNext()) {
+                if (cursor.getInt(cursor.getColumnIndex(Phone.IS_SUPER_PRIMARY)) != 0) {
+                    // Found super primary, call it.
+                    primaryPhone = cursor.getString(cursor.getColumnIndex(Phone.NUMBER));
+                    break;
+                }
+
+                PhoneItem item = new PhoneItem();
+                item.id = cursor.getLong(cursor.getColumnIndex(Data._ID));
+                item.phoneNumber = cursor.getString(cursor.getColumnIndex(Phone.NUMBER));
+                item.accountType =
+                        cursor.getString(cursor.getColumnIndex(RawContacts.ACCOUNT_TYPE));
+                item.type = cursor.getInt(cursor.getColumnIndex(Phone.TYPE));
+                item.label = cursor.getString(cursor.getColumnIndex(Phone.LABEL));
+
+                phoneList.add(item);
+            }
+        } finally {
+            cursor.close();
+        }
+
+        if (primaryPhone != null) {
+            performAction(primaryPhone);
+            onDismiss();
+            return;
+        }
+
+        Collapser.collapseList(phoneList);
+
+        if (phoneList.size() == 0) {
+            onDismiss();
+        } else if (phoneList.size() == 1) {
+            onDismiss();
+            performAction(phoneList.get(0).phoneNumber);
+        } else {
+            Bundle bundle = new Bundle();
+            bundle.putParcelableArrayList(EXTRA_KEY_ITEMS, phoneList);
+            showDialog(getDialogId(), bundle);
+        }
+    }
+
+    private void onDismiss() {
+        if (mDismissListener != null) {
+            mDismissListener.onDismiss(null);
+        }
+    }
+
+    private int getDialogId() {
+        return mSendTextMessage
+                ? R.id.dialog_phone_number_message_disambiguation
+                : R.id.dialog_phone_number_call_disambiguation;
+    }
+
+    public Dialog onCreateDialog(int id, Bundle bundle) {
+        if (id != getDialogId()) {
+            return null;
+        }
+
+        LayoutInflater inflater = LayoutInflater.from(mContext);
+        View setPrimaryView = inflater.inflate(R.layout.set_primary_checkbox, null);
+        AlertDialog dialog = new AlertDialog.Builder(mContext)
+                .setAdapter(new PhoneItemAdapter(mContext), this)
+                .setView(setPrimaryView)
+                .setTitle(mSendTextMessage
+                        ? R.string.sms_disambig_title
+                        : R.string.call_disambig_title)
+                .create();
+        dialog.setOnDismissListener(mDismissListener);
+        return dialog;
+    }
+
+    public boolean onPrepareDialog(int id, Dialog dialog, Bundle bundle) {
+        if (id != getDialogId()) {
+            return false;
+        }
+
+        ArrayList<PhoneItem> phoneList = bundle.getParcelableArrayList(EXTRA_KEY_ITEMS);
+
+        AlertDialog alertDialog = (AlertDialog)dialog;
+        PhoneItemAdapter adapter = (PhoneItemAdapter)alertDialog.getListView().getAdapter();
+        adapter.clear();
+        adapter.addAll(phoneList);
+
+        return true;
+    }
+
+    /**
+     * Handles the user selection in the disambiguation dialog.
+     */
+    @Override
+    public void onClick(DialogInterface dialog, int which) {
+        AlertDialog alertDialog = (AlertDialog)dialog;
+        PhoneItemAdapter adapter = (PhoneItemAdapter)alertDialog.getListView().getAdapter();
+        PhoneItem phoneItem = adapter.getItem(which);
+        if (phoneItem != null) {
+            long id = phoneItem.id;
+            String phone = phoneItem.phoneNumber;
+
+            CheckBox checkBox = (CheckBox)alertDialog.findViewById(R.id.setPrimary);
+            if (checkBox.isChecked()) {
+                makePrimary(id);
+            }
+
+            performAction(phone);
+        }
+    }
+
+    /**
+     * Makes the selected phone number primary.
+     */
+    void makePrimary(long id) {
+        // TODO use a Saver
+        ContentValues values = new ContentValues(1);
+        values.put(Data.IS_SUPER_PRIMARY, 1);
+        Uri uri = ContentUris.withAppendedId(Data.CONTENT_URI, id);
+        mContext.getContentResolver().update(uri, values, null, null);
+    }
+
+    /* Visible for testing */
+    void showDialog(int dialogId, Bundle bundle) {
+        Activity activity = (Activity)mContext;
+        if (!activity.isFinishing()) {
+            activity.showDialog(dialogId, bundle);
+        }
+    }
+
+    /* Visible for testing */
+    void startActivity(Intent intent) {
+        mContext.startActivity(intent);
+    }
+
+    /* Visible for testing */
+    void startLoading(Loader<Cursor> loader) {
+        loader.startLoading();
+    }
+}
diff --git a/src/com/android/contacts/list/ContactBrowseListContextMenuAdapter.java b/src/com/android/contacts/list/ContactBrowseListContextMenuAdapter.java
new file mode 100644
index 0000000..f2a53ca
--- /dev/null
+++ b/src/com/android/contacts/list/ContactBrowseListContextMenuAdapter.java
@@ -0,0 +1,146 @@
+/*
+ * 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 com.android.contacts.R;
+import com.android.contacts.util.PhoneCapabilityTester;
+import com.android.contacts.widget.ContextMenuAdapter;
+
+import android.content.Context;
+import android.net.Uri;
+import android.util.Log;
+import android.view.ContextMenu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.widget.AdapterView;
+
+/**
+ * A contextual menu adapter for the basic contact list.
+ */
+public class ContactBrowseListContextMenuAdapter implements ContextMenuAdapter {
+
+    private static final int MENU_ITEM_VIEW_CONTACT = 1;
+    private static final int MENU_ITEM_CALL = 2;
+    private static final int MENU_ITEM_SEND_SMS = 3;
+    private static final int MENU_ITEM_EDIT = 4;
+    private static final int MENU_ITEM_DELETE = 5;
+    private static final int MENU_ITEM_TOGGLE_STAR = 6;
+
+    private static final String TAG = "LightContactBrowserContextMenuAdapter";
+
+    private final ContactBrowseListFragment mContactListFragment;
+
+    public ContactBrowseListContextMenuAdapter(ContactBrowseListFragment fragment) {
+        this.mContactListFragment = fragment;
+    }
+
+    @Override
+    public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
+        AdapterView.AdapterContextMenuInfo info;
+        try {
+             info = (AdapterView.AdapterContextMenuInfo) menuInfo;
+        } catch (ClassCastException e) {
+            Log.wtf(TAG, "Bad menuInfo", e);
+            return;
+        }
+
+        ContactListAdapter adapter = mContactListFragment.getAdapter();
+        int headerViewsCount = mContactListFragment.getListView().getHeaderViewsCount();
+        int position = info.position - headerViewsCount;
+
+        // Setup the menu header
+        menu.setHeaderTitle(adapter.getContactDisplayName(position));
+
+        // View contact details
+        menu.add(0, MENU_ITEM_VIEW_CONTACT, 0, R.string.menu_viewContact);
+
+        if (adapter.getHasPhoneNumber(position)) {
+            final Context context = mContactListFragment.getContext();
+            boolean hasPhoneApp = PhoneCapabilityTester.isPhone(context);
+            boolean hasSmsApp = PhoneCapabilityTester.isSmsIntentRegistered(context);
+            // Calling contact
+            if (hasPhoneApp) menu.add(0, MENU_ITEM_CALL, 0, R.string.menu_call);
+            // Send SMS item
+            if (hasSmsApp) menu.add(0, MENU_ITEM_SEND_SMS, 0, R.string.menu_sendSMS);
+        }
+
+        // Star toggling
+        if (!adapter.isContactStarred(position)) {
+            menu.add(0, MENU_ITEM_TOGGLE_STAR, 0, R.string.menu_addStar);
+        } else {
+            menu.add(0, MENU_ITEM_TOGGLE_STAR, 0, R.string.menu_removeStar);
+        }
+
+        // Contact editing
+        menu.add(0, MENU_ITEM_EDIT, 0, R.string.menu_editContact);
+        menu.add(0, MENU_ITEM_DELETE, 0, R.string.menu_deleteContact);
+    }
+
+    @Override
+    public boolean onContextItemSelected(MenuItem item) {
+        AdapterView.AdapterContextMenuInfo info;
+        try {
+             info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
+        } catch (ClassCastException e) {
+            Log.wtf(TAG, "Bad menuInfo", e);
+            return false;
+        }
+
+        ContactListAdapter adapter = mContactListFragment.getAdapter();
+        int headerViewsCount = mContactListFragment.getListView().getHeaderViewsCount();
+        int position = info.position - headerViewsCount;
+
+        final Uri contactUri = adapter.getContactUri(position);
+        switch (item.getItemId()) {
+            case MENU_ITEM_VIEW_CONTACT: {
+                mContactListFragment.viewContact(contactUri);
+                return true;
+            }
+
+            case MENU_ITEM_TOGGLE_STAR: {
+                if (adapter.isContactStarred(position)) {
+                    mContactListFragment.removeFromFavorites(contactUri);
+                } else {
+                    mContactListFragment.addToFavorites(contactUri);
+                }
+                return true;
+            }
+
+            case MENU_ITEM_CALL: {
+                mContactListFragment.callContact(contactUri);
+                return true;
+            }
+
+            case MENU_ITEM_SEND_SMS: {
+                mContactListFragment.smsContact(contactUri);
+                return true;
+            }
+
+            case MENU_ITEM_EDIT: {
+                mContactListFragment.editContact(contactUri);
+                return true;
+            }
+
+            case MENU_ITEM_DELETE: {
+                mContactListFragment.deleteContact(contactUri);
+                return true;
+            }
+        }
+
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/list/ContactBrowseListFragment.java b/src/com/android/contacts/list/ContactBrowseListFragment.java
new file mode 100644
index 0000000..f99134b
--- /dev/null
+++ b/src/com/android/contacts/list/ContactBrowseListFragment.java
@@ -0,0 +1,272 @@
+/*
+ * 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 com.android.contacts.R;
+import com.android.contacts.widget.ListViewUtils;
+
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.CursorLoader;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Directory;
+import android.text.TextUtils;
+import android.widget.ListView;
+
+/**
+ * Fragment containing a contact list used for browsing (as compared to
+ * picking a contact with one of the PICK intents).
+ */
+public abstract class ContactBrowseListFragment extends
+        ContactEntryListFragment<ContactListAdapter> {
+
+    private static final String KEY_SELECTED_URI = "selectedUri";
+
+    private static final int SELECTED_ID_LOADER = -3;
+
+    private static final int SELECTION_VISIBILITY_REQUEST_NONE = 0;
+    private static final int SELECTION_VISIBILITY_REQUEST_SMOOTH = 1;
+    private static final int SELECTION_VISIBILITY_REQUEST_INSTANT = 2;
+
+    private Uri mSelectedContactUri;
+    private long mSelectedContactDirectoryId;
+    private String mSelectedContactLookupKey;
+    private int mSelectionVisibilityRequest;
+
+    private OnContactBrowserActionListener mListener;
+
+    private LoaderCallbacks<Cursor> mIdLoaderCallbacks = new LoaderCallbacks<Cursor>() {
+
+        @Override
+        public Loader<Cursor> onCreateLoader(int id, Bundle args) {
+            return new CursorLoader(getContext(),
+                    mSelectedContactUri,
+                    new String[] { Contacts.LOOKUP_KEY },
+                    null,
+                    null,
+                    null);
+        }
+
+        @Override
+        public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
+            String lookupKey = null;
+            if (data != null) {
+                if (data.moveToFirst()) {
+                    lookupKey = data.getString(0);
+                }
+            }
+            if (!TextUtils.equals(mSelectedContactLookupKey, lookupKey)) {
+                mSelectedContactLookupKey = lookupKey;
+                configureContactSelection();
+            }
+            return;
+        }
+    };
+
+    @Override
+    public void restoreSavedState(Bundle savedState) {
+        super.restoreSavedState(savedState);
+
+        if (savedState == null) {
+            return;
+        }
+
+        mSelectedContactUri = savedState.getParcelable(KEY_SELECTED_URI);
+        parseSelectedContactUri();
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putParcelable(KEY_SELECTED_URI, mSelectedContactUri);
+    }
+
+    @Override
+    public void onStart() {
+        // Refresh the currently selected lookup in case it changed while we were sleeping
+        startLoadingContactLookupKey();
+        super.onStart();
+   }
+
+    protected void startLoadingContactLookupKey() {
+        if (isSelectionVisible() && mSelectedContactUri != null &&
+                (mSelectedContactDirectoryId == Directory.DEFAULT ||
+                        mSelectedContactDirectoryId == Directory.LOCAL_INVISIBLE)) {
+            getLoaderManager().restartLoader(SELECTED_ID_LOADER, null, mIdLoaderCallbacks);
+        } else {
+            getLoaderManager().stopLoader(SELECTED_ID_LOADER);
+        }
+    }
+
+    @Override
+    protected void prepareEmptyView() {
+        if (isSearchMode()) {
+            return;
+        } else if (isSyncActive()) {
+            if (hasIccCard()) {
+                setEmptyText(R.string.noContactsHelpTextWithSync);
+            } else {
+                setEmptyText(R.string.noContactsNoSimHelpTextWithSync);
+            }
+        } else {
+            if (hasIccCard()) {
+                setEmptyText(R.string.noContactsHelpText);
+            } else {
+                setEmptyText(R.string.noContactsNoSimHelpText);
+            }
+        }
+    }
+
+    public Uri getSelectedContactUri() {
+        return mSelectedContactUri;
+    }
+
+    public void setSelectedContactUri(Uri uri) {
+        if (mSelectedContactUri == null
+                || (mSelectedContactUri != null && !mSelectedContactUri.equals(uri))) {
+            mSelectedContactUri = uri;
+
+            parseSelectedContactUri();
+
+            if (isAdded()) {
+                // Configure the adapter to show the selection based on the lookup key extracted
+                // from the URI
+                configureAdapter();
+
+                // Also, launch a loader to pick up a new lookup key in case it has changed
+                startLoadingContactLookupKey();
+            }
+        }
+    }
+
+    private void parseSelectedContactUri() {
+        if (mSelectedContactUri != null) {
+            if (!mSelectedContactUri.toString()
+                    .startsWith(Contacts.CONTENT_LOOKUP_URI.toString())) {
+                throw new IllegalStateException(
+                        "Contact list contains a non-lookup URI: " + mSelectedContactUri);
+            }
+
+            String directoryParam =
+                mSelectedContactUri.getQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY);
+            mSelectedContactDirectoryId = TextUtils.isEmpty(directoryParam)
+                    ? Directory.DEFAULT
+                    : Long.parseLong(directoryParam);
+            mSelectedContactLookupKey =
+                    Uri.encode(mSelectedContactUri.getPathSegments().get(2));
+        } else {
+            mSelectedContactDirectoryId = Directory.DEFAULT;
+            mSelectedContactLookupKey = null;
+        }
+    }
+
+    @Override
+    protected void configureAdapter() {
+        super.configureAdapter();
+        configureContactSelection();
+    }
+
+    /**
+     * Configures the adapter with the identity of the currently selected contact.
+     */
+    private void configureContactSelection() {
+        ContactListAdapter adapter = getAdapter();
+        if (adapter == null) {
+            return;
+        }
+
+        adapter.setSelectedContact(mSelectedContactDirectoryId, mSelectedContactLookupKey);
+    }
+
+    public void setOnContactListActionListener(OnContactBrowserActionListener listener) {
+        mListener = listener;
+    }
+
+    public void createNewContact() {
+        mListener.onCreateNewContactAction();
+    }
+
+    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);
+    }
+
+    @Override
+    protected void finish() {
+        super.finish();
+        mListener.onFinishAction();
+    }
+
+    public void requestSelectionOnScreen(boolean smooth) {
+        mSelectionVisibilityRequest = smooth
+                ? SELECTION_VISIBILITY_REQUEST_SMOOTH
+                : SELECTION_VISIBILITY_REQUEST_INSTANT;
+        requestSelectionOnScreenIfNeeded();
+    }
+
+    @Override
+    protected void completeRestoreInstanceState() {
+        super.completeRestoreInstanceState();
+        requestSelectionOnScreenIfNeeded();
+    }
+
+    private void requestSelectionOnScreenIfNeeded() {
+        if (mSelectionVisibilityRequest == SELECTION_VISIBILITY_REQUEST_NONE) {
+            return;
+        }
+
+        ContactListAdapter adapter = getAdapter();
+        if (adapter == null) {
+            return;
+        }
+
+        int position = adapter.getSelectedContactPosition();
+        if (position != -1) {
+            boolean smooth = mSelectionVisibilityRequest == SELECTION_VISIBILITY_REQUEST_SMOOTH;
+            mSelectionVisibilityRequest = SELECTION_VISIBILITY_REQUEST_NONE;
+            ListView listView = getListView();
+            ListViewUtils.requestPositionToScreen(
+                    listView, position + listView.getHeaderViewsCount(), smooth);
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/ContactEntryListAdapter.java b/src/com/android/contacts/list/ContactEntryListAdapter.java
new file mode 100644
index 0000000..f66003d
--- /dev/null
+++ b/src/com/android/contacts/list/ContactEntryListAdapter.java
@@ -0,0 +1,492 @@
+/*
+ * 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 com.android.contacts.R;
+import com.android.contacts.widget.IndexerListAdapter;
+import com.android.contacts.widget.TextWithHighlightingFactory;
+
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.provider.ContactsContract.ContactCounts;
+import android.provider.ContactsContract.Directory;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import java.util.HashSet;
+
+/**
+ * Common base class for various contact-related lists, e.g. contact list, phone number list
+ * etc.
+ */
+public abstract class ContactEntryListAdapter extends IndexerListAdapter {
+
+    private static final String TAG = "ContactEntryListAdapter";
+
+    /**
+     * Indicates whether the {@link Directory#LOCAL_INVISIBLE} directory should
+     * be included in the search.
+     */
+    private static final boolean LOCAL_INVISIBLE_DIRECTORY_ENABLED = false;
+
+    /**
+     * The animation is used here to allocate animated name text views.
+     */
+    private TextWithHighlightingFactory mTextWithHighlightingFactory;
+    private int mDisplayOrder;
+    private int mSortOrder;
+    private boolean mNameHighlightingEnabled;
+
+    private boolean mDisplayPhotos;
+    private boolean mQuickContactEnabled;
+    private ContactPhotoLoader mPhotoLoader;
+
+    private String mQueryString;
+    private char[] mUpperCaseQueryString;
+    private boolean mSearchMode;
+    private boolean mDirectorySearchEnabled;
+    private int mDirectoryResultLimit = Integer.MAX_VALUE;
+
+    private boolean mLoading = true;
+    private boolean mEmptyListEnabled = true;
+
+    private boolean mSelectionVisible;
+
+    public ContactEntryListAdapter(Context context) {
+        super(context, R.layout.list_section, R.id.header_text);
+        addPartitions();
+    }
+
+    protected void addPartitions() {
+        addPartition(createDefaultDirectoryPartition());
+    }
+
+    protected DirectoryPartition createDefaultDirectoryPartition() {
+        DirectoryPartition partition = new DirectoryPartition(true, true);
+        partition.setDirectoryId(Directory.DEFAULT);
+        partition.setDirectoryType(getContext().getString(R.string.contactsList));
+        partition.setPriorityDirectory(true);
+        partition.setPhotoSupported(true);
+        return partition;
+    }
+
+    private int getPartitionByDirectoryId(long id) {
+        int count = getPartitionCount();
+        for (int i = 0; i < count; i++) {
+            Partition partition = getPartition(i);
+            if (partition instanceof DirectoryPartition) {
+                if (((DirectoryPartition)partition).getDirectoryId() == id) {
+                    return i;
+                }
+            }
+        }
+        return -1;
+    }
+
+    public abstract String getContactDisplayName(int position);
+    public abstract void configureLoader(CursorLoader loader, long directoryId);
+
+    /**
+     * Marks all partitions as "loading"
+     */
+    public void onDataReload() {
+        boolean notify = false;
+        int count = getPartitionCount();
+        for (int i = 0; i < count; i++) {
+            Partition partition = getPartition(i);
+            if (partition instanceof DirectoryPartition) {
+                DirectoryPartition directoryPartition = (DirectoryPartition)partition;
+                if (!directoryPartition.isLoading()) {
+                    notify = true;
+                }
+                directoryPartition.setStatus(DirectoryPartition.STATUS_NOT_LOADED);
+            }
+        }
+        if (notify) {
+            notifyDataSetChanged();
+        }
+    }
+
+    public boolean isSearchMode() {
+        return mSearchMode;
+    }
+
+    public void setSearchMode(boolean flag) {
+        mSearchMode = flag;
+    }
+
+    public String getQueryString() {
+        return mQueryString;
+    }
+
+    public void setQueryString(String queryString) {
+        mQueryString = queryString;
+        if (TextUtils.isEmpty(queryString)) {
+            mUpperCaseQueryString = null;
+        } else {
+            mUpperCaseQueryString = queryString.toUpperCase().toCharArray();
+        }
+    }
+
+    public char[] getUpperCaseQueryString() {
+        return mUpperCaseQueryString;
+    }
+
+    public boolean isDirectorySearchEnabled() {
+        return mDirectorySearchEnabled;
+    }
+
+    public void setDirectorySearchEnabled(boolean flag) {
+        mDirectorySearchEnabled = flag;
+    }
+
+    public int getDirectoryResultLimit() {
+        return mDirectoryResultLimit;
+    }
+
+    public void setDirectoryResultLimit(int limit) {
+        this.mDirectoryResultLimit = limit;
+    }
+
+    public int getContactNameDisplayOrder() {
+        return mDisplayOrder;
+    }
+
+    public void setContactNameDisplayOrder(int displayOrder) {
+        mDisplayOrder = displayOrder;
+    }
+
+    public int getSortOrder() {
+        return mSortOrder;
+    }
+
+    public void setSortOrder(int sortOrder) {
+        mSortOrder = sortOrder;
+    }
+
+    public void setNameHighlightingEnabled(boolean flag) {
+        mNameHighlightingEnabled = flag;
+    }
+
+    public boolean isNameHighlightingEnabled() {
+        return mNameHighlightingEnabled;
+    }
+
+    public void setTextWithHighlightingFactory(TextWithHighlightingFactory factory) {
+        mTextWithHighlightingFactory = factory;
+    }
+
+    protected TextWithHighlightingFactory getTextWithHighlightingFactory() {
+        return mTextWithHighlightingFactory;
+    }
+
+    public void setPhotoLoader(ContactPhotoLoader photoLoader) {
+        mPhotoLoader = photoLoader;
+    }
+
+    protected ContactPhotoLoader getPhotoLoader() {
+        return mPhotoLoader;
+    }
+
+    public boolean getDisplayPhotos() {
+        return mDisplayPhotos;
+    }
+
+    public void setDisplayPhotos(boolean displayPhotos) {
+        mDisplayPhotos = displayPhotos;
+    }
+
+    public boolean isEmptyListEnabled() {
+        return mEmptyListEnabled;
+    }
+
+    public void setEmptyListEnabled(boolean flag) {
+        mEmptyListEnabled = flag;
+    }
+
+    public boolean isSelectionVisible() {
+        return mSelectionVisible;
+    }
+
+    public void setSelectionVisible(boolean flag) {
+        this.mSelectionVisible = flag;
+    }
+
+    public boolean isQuickContactEnabled() {
+        return mQuickContactEnabled;
+    }
+
+    public void setQuickContactEnabled(boolean quickContactEnabled) {
+        mQuickContactEnabled = quickContactEnabled;
+    }
+
+    public void configureDirectoryLoader(DirectoryListLoader loader) {
+        loader.setDirectorySearchEnabled(mDirectorySearchEnabled);
+        loader.setLocalInvisibleDirectoryEnabled(LOCAL_INVISIBLE_DIRECTORY_ENABLED);
+    }
+
+    /**
+     * Updates partitions according to the directory meta-data contained in the supplied
+     * cursor.  Takes ownership of the cursor and will close it.
+     */
+    public void changeDirectories(Cursor cursor) {
+        HashSet<Long> directoryIds = new HashSet<Long>();
+
+        int idColumnIndex = cursor.getColumnIndex(Directory._ID);
+        int directoryTypeColumnIndex = cursor.getColumnIndex(DirectoryListLoader.DIRECTORY_TYPE);
+        int displayNameColumnIndex = cursor.getColumnIndex(Directory.DISPLAY_NAME);
+        int photoSupportColumnIndex = cursor.getColumnIndex(Directory.PHOTO_SUPPORT);
+
+        // TODO preserve the order of partition to match those of the cursor
+        // Phase I: add new directories
+        cursor.moveToPosition(-1);
+        while (cursor.moveToNext()) {
+            long id = cursor.getLong(idColumnIndex);
+            directoryIds.add(id);
+            if (getPartitionByDirectoryId(id) == -1) {
+                DirectoryPartition partition = new DirectoryPartition(false, true);
+                partition.setDirectoryId(id);
+                partition.setDirectoryType(cursor.getString(directoryTypeColumnIndex));
+                partition.setDisplayName(cursor.getString(displayNameColumnIndex));
+                int photoSupport = cursor.getInt(photoSupportColumnIndex);
+                partition.setPhotoSupported(photoSupport == Directory.PHOTO_SUPPORT_THUMBNAIL_ONLY
+                        || photoSupport == Directory.PHOTO_SUPPORT_FULL);
+                addPartition(partition);
+            }
+        }
+
+        // Phase II: remove deleted directories
+        int count = getPartitionCount();
+        for (int i = count; --i >= 0; ) {
+            Partition partition = getPartition(i);
+            if (partition instanceof DirectoryPartition) {
+                long id = ((DirectoryPartition)partition).getDirectoryId();
+                if (!directoryIds.contains(id)) {
+                    removePartition(i);
+                }
+            }
+        }
+
+        invalidate();
+        notifyDataSetChanged();
+    }
+
+    @Override
+    public void changeCursor(int partitionIndex, Cursor cursor) {
+        if (partitionIndex >= getPartitionCount()) {
+            // There is no partition for this data
+            return;
+        }
+
+        Partition partition = getPartition(partitionIndex);
+        if (partition instanceof DirectoryPartition) {
+            ((DirectoryPartition)partition).setStatus(DirectoryPartition.STATUS_LOADED);
+        }
+
+        super.changeCursor(partitionIndex, cursor);
+
+        if (isSectionHeaderDisplayEnabled() && partitionIndex == getIndexedPartition()) {
+            updateIndexer(cursor);
+        }
+    }
+
+    public void changeCursor(Cursor cursor) {
+        changeCursor(0, cursor);
+    }
+
+    /**
+     * Updates the indexer, which is used to produce section headers.
+     */
+    private void updateIndexer(Cursor cursor) {
+        if (cursor == null) {
+            setIndexer(null);
+            return;
+        }
+
+        Bundle bundle = cursor.getExtras();
+        if (bundle.containsKey(ContactCounts.EXTRA_ADDRESS_BOOK_INDEX_TITLES)) {
+            String sections[] =
+                    bundle.getStringArray(ContactCounts.EXTRA_ADDRESS_BOOK_INDEX_TITLES);
+            int counts[] = bundle.getIntArray(ContactCounts.EXTRA_ADDRESS_BOOK_INDEX_COUNTS);
+            setIndexer(new ContactsSectionIndexer(sections, counts));
+        } else {
+            setIndexer(null);
+        }
+    }
+
+    @Override
+    public int getViewTypeCount() {
+        // We need a separate view type for each item type, plus another one for
+        // each type with header, plus one for "other".
+        return getItemViewTypeCount() * 2 + 1;
+    }
+
+    @Override
+    public int getItemViewType(int partitionIndex, int position) {
+        int type = super.getItemViewType(partitionIndex, position);
+        if (isSectionHeaderDisplayEnabled() && partitionIndex == getIndexedPartition()) {
+            Placement placement = getItemPlacementInSection(position);
+            return placement.firstInSection ? type : getItemViewTypeCount() + type;
+        } else {
+            return type;
+        }
+    }
+
+    @Override
+    public boolean isEmpty() {
+        // TODO
+//        if (contactsListActivity.mProviderStatus != ProviderStatus.STATUS_NORMAL) {
+//            return true;
+//        }
+
+        if (!mEmptyListEnabled) {
+            return false;
+        } else if (isSearchMode()) {
+            return TextUtils.isEmpty(getQueryString());
+        } else if (mLoading) {
+            // We don't want the empty state to show when loading.
+            return false;
+        } else {
+            return super.isEmpty();
+        }
+    }
+
+    public boolean isLoading() {
+        int count = getPartitionCount();
+        for (int i = 0; i < count; i++) {
+            Partition partition = getPartition(i);
+            if (partition instanceof DirectoryPartition
+                    && ((DirectoryPartition) partition).isLoading()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public boolean areAllPartitionsEmpty() {
+        int count = getPartitionCount();
+        for (int i = 0; i < count; i++) {
+            if (!isPartitionEmpty(i)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Changes visibility parameters for the default directory partition.
+     */
+    public void configureDefaultPartition(boolean showIfEmpty, boolean hasHeader) {
+        int defaultPartitionIndex = -1;
+        int count = getPartitionCount();
+        for (int i = 0; i < count; i++) {
+            Partition partition = getPartition(i);
+            if (partition instanceof DirectoryPartition &&
+                    ((DirectoryPartition)partition).getDirectoryId() == Directory.DEFAULT) {
+                defaultPartitionIndex = i;
+                break;
+            }
+        }
+        if (defaultPartitionIndex != -1) {
+            setShowIfEmpty(defaultPartitionIndex, showIfEmpty);
+            setHasHeader(defaultPartitionIndex, hasHeader);
+        }
+    }
+
+    @Override
+    protected View newHeaderView(Context context, int partition, Cursor cursor,
+            ViewGroup parent) {
+        LayoutInflater inflater = LayoutInflater.from(context);
+        return inflater.inflate(R.layout.directory_header, parent, false);
+    }
+
+    @Override
+    protected void bindHeaderView(View view, int partitionIndex, Cursor cursor) {
+        Partition partition = getPartition(partitionIndex);
+        if (!(partition instanceof DirectoryPartition)) {
+            return;
+        }
+
+        DirectoryPartition directoryPartition = (DirectoryPartition)partition;
+        long directoryId = directoryPartition.getDirectoryId();
+        TextView labelTextView = (TextView)view.findViewById(R.id.label);
+        TextView displayNameTextView = (TextView)view.findViewById(R.id.display_name);
+        if (directoryId == Directory.DEFAULT || directoryId == Directory.LOCAL_INVISIBLE) {
+            labelTextView.setText(R.string.local_search_label);
+            displayNameTextView.setText(null);
+        } else {
+            labelTextView.setText(R.string.directory_search_label);
+            displayNameTextView.setText(buildDirectoryName(directoryPartition.getDirectoryType(),
+                    directoryPartition.getDisplayName()));
+        }
+
+        TextView countText = (TextView)view.findViewById(R.id.count);
+        if (directoryPartition.isLoading()) {
+            countText.setText(R.string.search_results_searching);
+        } else {
+            int count = cursor == null ? 0 : cursor.getCount();
+            if (directoryId != Directory.DEFAULT && directoryId != Directory.LOCAL_INVISIBLE
+                    && count >= getDirectoryResultLimit()) {
+                countText.setText(mContext.getString(
+                        R.string.foundTooManyContacts, getDirectoryResultLimit()));
+            } else {
+                countText.setText(getQuantityText(
+                        count, R.string.listFoundAllContactsZero, R.plurals.searchFoundContacts));
+            }
+        }
+    }
+
+    private CharSequence buildDirectoryName(String directoryType, String directoryName) {
+        String title;
+        if (!TextUtils.isEmpty(directoryName)) {
+            title = directoryName;
+            // TODO: STOPSHIP - remove this once this is done by both directory providers
+            int atIndex = title.indexOf('@');
+            if (atIndex != -1 && atIndex < title.length() - 2) {
+                final char firstLetter = Character.toUpperCase(title.charAt(atIndex + 1));
+                title = firstLetter + title.substring(atIndex + 2);
+            }
+        } else {
+            title = directoryType;
+        }
+
+        return title;
+    }
+
+    // TODO: fix PluralRules to handle zero correctly and use Resources.getQuantityText directly
+    public String getQuantityText(int count, int zeroResourceId, int pluralResourceId) {
+        if (count == 0) {
+            return getContext().getString(zeroResourceId);
+        } else {
+            String format = getContext().getResources()
+                    .getQuantityText(pluralResourceId, count).toString();
+            return String.format(format, count);
+        }
+    }
+
+    public boolean isPhotoSupported(int partitionIndex) {
+        Partition partition = getPartition(partitionIndex);
+        if (partition instanceof DirectoryPartition) {
+            return ((DirectoryPartition) partition).isPhotoSupported();
+        }
+        return true;
+    }
+}
diff --git a/src/com/android/contacts/list/ContactEntryListFragment.java b/src/com/android/contacts/list/ContactEntryListFragment.java
new file mode 100644
index 0000000..548b984
--- /dev/null
+++ b/src/com/android/contacts/list/ContactEntryListFragment.java
@@ -0,0 +1,1031 @@
+/*
+ * 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 com.android.common.widget.CompositeCursorAdapter.Partition;
+import com.android.contacts.ContactListEmptyView;
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.preference.ContactsPreferences;
+import com.android.contacts.widget.ContextMenuAdapter;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.LoaderManager;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.content.IContentService;
+import android.content.Intent;
+import android.content.Loader;
+import android.database.ContentObserver;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.os.Parcelable;
+import android.os.RemoteException;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Directory;
+import android.provider.ContactsContract.ProviderStatus;
+import android.provider.Settings;
+import android.telephony.TelephonyManager;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.View.OnFocusChangeListener;
+import android.view.View.OnTouchListener;
+import android.view.ViewGroup;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.TextView;
+
+/**
+ * Common base class for various contact-related list fragments.
+ */
+public abstract class ContactEntryListFragment<T extends ContactEntryListAdapter>
+        extends Fragment
+        implements OnItemClickListener, OnScrollListener, OnFocusChangeListener, OnTouchListener,
+                LoaderCallbacks<Cursor> {
+
+    // TODO: Make this protected. This should not be used from the ContactBrowserActivity but
+    // instead use the new startActivityWithResultFromFragment API
+    public static final int ACTIVITY_REQUEST_CODE_PICKER = 1;
+
+    private static final String TAG = "ContactEntryListFragment";
+
+    private static final String KEY_LIST_STATE = "liststate";
+    private static final String KEY_SECTION_HEADER_DISPLAY_ENABLED = "sectionHeaderDisplayEnabled";
+    private static final String KEY_PHOTO_LOADER_ENABLED = "photoLoaderEnabled";
+    private static final String KEY_QUICK_CONTACT_ENABLED = "quickContactEnabled";
+    private static final String KEY_SEARCH_MODE = "searchMode";
+    private static final String KEY_AIZY_ENABLED = "aizyEnabled";
+    private static final String KEY_QUERY_STRING = "queryString";
+    private static final String KEY_DIRECTORY_SEARCH_ENABLED = "directorySearchEnabled";
+    private static final String KEY_SELECTION_VISIBLE = "selectionVisible";
+    private static final String KEY_REQUEST = "request";
+    private static final String KEY_LEGACY_COMPATIBILITY = "legacyCompatibility";
+    private static final String KEY_DIRECTORY_RESULT_LIMIT = "directoryResultLimit";
+
+    private static final String DIRECTORY_ID_ARG_KEY = "directoryId";
+
+    private static final int DIRECTORY_LOADER_ID = -1;
+
+    private static final int DIRECTORY_SEARCH_DELAY_MILLIS = 300;
+    private static final int DIRECTORY_SEARCH_MESSAGE = 1;
+
+    private boolean mSectionHeaderDisplayEnabled;
+    private boolean mPhotoLoaderEnabled;
+    private boolean mQuickContactEnabled = true;
+    private boolean mSearchMode;
+    private boolean mAizyEnabled;
+    private String mQueryString;
+    private boolean mDirectorySearchEnabled;
+    private boolean mSelectionVisible;
+    private ContactsRequest mRequest;
+    private boolean mLegacyCompatibility;
+
+    private T mAdapter;
+    private View mView;
+    private ListView mListView;
+    private ContactListAizyView mAizy;
+
+    /**
+     * Used for keeping track of the scroll state of the list.
+     */
+    private Parcelable mListState;
+
+    private int mDisplayOrder;
+    private int mSortOrder;
+    private int mDirectoryResultLimit;
+
+    private ContextMenuAdapter mContextMenuAdapter;
+    private ContactPhotoLoader mPhotoLoader;
+    private ContactListEmptyView mEmptyView;
+    private ProviderStatusLoader mProviderStatusLoader;
+    private ContactsPreferences mContactsPrefs;
+
+    private int mProviderStatus = ProviderStatus.STATUS_NORMAL;
+
+    private boolean mForceLoad;
+    private boolean mLoadDirectoryList;
+
+    /**
+     * Indicates whether we are doing the initial complete load of data (false) or
+     * a refresh caused by a change notification (true)
+     */
+    private boolean mLoadPriorityDirectoriesOnly;
+
+    private Context mContext;
+
+    private LoaderManager mLoaderManager;
+
+    private Handler mDelayedDirectorySearchHandler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            if (msg.what == DIRECTORY_SEARCH_MESSAGE) {
+                loadDirectoryPartition(msg.arg1, (DirectoryPartition) msg.obj);
+            }
+        }
+    };
+
+    protected abstract View inflateView(LayoutInflater inflater, ViewGroup container);
+    protected abstract T createListAdapter();
+
+    /**
+     * @param position Please note that the position is already adjusted for
+     *            header views, so "0" means the first list item below header
+     *            views.
+     */
+    protected abstract void onItemClick(int position, long id);
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        setContext(activity);
+        setLoaderManager(super.getLoaderManager());
+    }
+
+    /**
+     * Sets a context for the fragment in the unit test environment.
+     */
+    public void setContext(Context context) {
+        mContext = context;
+        configurePhotoLoader();
+    }
+
+    public Context getContext() {
+        return mContext;
+    }
+
+    /**
+     * Overrides a loader manager for use in unit tests.
+     */
+    public void setLoaderManager(LoaderManager loaderManager) {
+        mLoaderManager = loaderManager;
+    }
+
+    @Override
+    public LoaderManager getLoaderManager() {
+        return mLoaderManager;
+    }
+
+    public T getAdapter() {
+        return mAdapter;
+    }
+
+    @Override
+    public View getView() {
+        return mView;
+    }
+
+    public ListView getListView() {
+        return mListView;
+    }
+
+    public ContactListEmptyView getEmptyView() {
+        return mEmptyView;
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putBoolean(KEY_SECTION_HEADER_DISPLAY_ENABLED, mSectionHeaderDisplayEnabled);
+        outState.putBoolean(KEY_PHOTO_LOADER_ENABLED, mPhotoLoaderEnabled);
+        outState.putBoolean(KEY_QUICK_CONTACT_ENABLED, mQuickContactEnabled);
+        outState.putBoolean(KEY_SEARCH_MODE, mSearchMode);
+        outState.putBoolean(KEY_AIZY_ENABLED, mAizyEnabled);
+        outState.putBoolean(KEY_DIRECTORY_SEARCH_ENABLED, mDirectorySearchEnabled);
+        outState.putBoolean(KEY_SELECTION_VISIBLE, mSelectionVisible);
+        outState.putBoolean(KEY_LEGACY_COMPATIBILITY, mLegacyCompatibility);
+        outState.putString(KEY_QUERY_STRING, mQueryString);
+        outState.putInt(KEY_DIRECTORY_RESULT_LIMIT, mDirectoryResultLimit);
+        outState.putParcelable(KEY_REQUEST, mRequest);
+
+        if (mListView != null) {
+            mListState = mListView.onSaveInstanceState();
+            outState.putParcelable(KEY_LIST_STATE, mListState);
+        }
+    }
+
+    @Override
+    public void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+        mContactsPrefs = new ContactsPreferences(mContext);
+        restoreSavedState(savedState);
+    }
+
+    public void restoreSavedState(Bundle savedState) {
+        if (savedState == null) {
+            return;
+        }
+
+        mSectionHeaderDisplayEnabled = savedState.getBoolean(KEY_SECTION_HEADER_DISPLAY_ENABLED);
+        mPhotoLoaderEnabled = savedState.getBoolean(KEY_PHOTO_LOADER_ENABLED);
+        mQuickContactEnabled = savedState.getBoolean(KEY_QUICK_CONTACT_ENABLED);
+        mSearchMode = savedState.getBoolean(KEY_SEARCH_MODE);
+        mAizyEnabled = savedState.getBoolean(KEY_AIZY_ENABLED);
+        mDirectorySearchEnabled = savedState.getBoolean(KEY_DIRECTORY_SEARCH_ENABLED);
+        mSelectionVisible = savedState.getBoolean(KEY_SELECTION_VISIBLE);
+        mLegacyCompatibility = savedState.getBoolean(KEY_LEGACY_COMPATIBILITY);
+        mQueryString = savedState.getString(KEY_QUERY_STRING);
+        mDirectoryResultLimit = savedState.getInt(KEY_DIRECTORY_RESULT_LIMIT);
+        mRequest = savedState.getParcelable(KEY_REQUEST);
+
+        // Retrieve list state. This will be applied in onLoadFinished
+        mListState = savedState.getParcelable(KEY_LIST_STATE);
+    }
+
+    /**
+     * Returns the parsed intent that started the activity hosting this fragment.
+     */
+    public ContactsRequest getContactsRequest() {
+        return mRequest;
+    }
+
+    /**
+     * Sets a parsed intent that started the activity hosting this fragment.
+     */
+    public void setContactsRequest(ContactsRequest request) {
+        mRequest = request;
+    }
+
+    @Override
+    public void onStart() {
+        mContactsPrefs.registerChangeListener(mPreferencesChangeListener);
+
+        if (mProviderStatusLoader == null) {
+            mProviderStatusLoader = new ProviderStatusLoader(mContext);
+        }
+
+        loadPreferences();
+
+        if (mListView instanceof ContactEntryListView) {
+            ContactEntryListView listView = (ContactEntryListView)mListView;
+            listView.setSelectionVisible(isSelectionVisible());
+        }
+
+        mForceLoad = false;
+        mLoadDirectoryList = true;
+        mLoadPriorityDirectoriesOnly = true;
+
+        startLoading();
+        super.onStart();
+    }
+
+    protected void startLoading() {
+        configureAdapter();
+        int partitionCount = mAdapter.getPartitionCount();
+        for (int i = 0; i < partitionCount; i++) {
+            Partition partition = mAdapter.getPartition(i);
+            if (partition instanceof DirectoryPartition) {
+                DirectoryPartition directoryPartition = (DirectoryPartition)partition;
+                if (directoryPartition.getStatus() == DirectoryPartition.STATUS_NOT_LOADED) {
+                    if (directoryPartition.isPriorityDirectory() || !mLoadPriorityDirectoriesOnly) {
+                        startLoadingDirectoryPartition(i);
+                    }
+                }
+            } else {
+                getLoaderManager().initLoader(i, null, this);
+            }
+        }
+
+        // Next time this method is called, we should start loading non-priority directories
+        mLoadPriorityDirectoriesOnly = false;
+    }
+
+    @Override
+    public Loader<Cursor> onCreateLoader(int id, Bundle args) {
+        if (id == DIRECTORY_LOADER_ID) {
+            DirectoryListLoader loader = new DirectoryListLoader(mContext);
+            mAdapter.configureDirectoryLoader(loader);
+            return loader;
+        } else {
+            CursorLoader loader = new CursorLoader(mContext, null, null, null, null, null);
+            long directoryId = args != null && args.containsKey(DIRECTORY_ID_ARG_KEY)
+                    ? args.getLong(DIRECTORY_ID_ARG_KEY)
+                    : Directory.DEFAULT;
+            mAdapter.configureLoader(loader, directoryId);
+            return loader;
+        }
+    }
+
+    private void startLoadingDirectoryPartition(int partitionIndex) {
+        DirectoryPartition partition = (DirectoryPartition)mAdapter.getPartition(partitionIndex);
+        partition.setStatus(DirectoryPartition.STATUS_LOADING);
+        long directoryId = partition.getDirectoryId();
+        if (mForceLoad) {
+            if (directoryId == Directory.DEFAULT) {
+                loadDirectoryPartition(partitionIndex, partition);
+            } else {
+                loadDirectoryPartitionDelayed(partitionIndex, partition);
+            }
+        } else {
+            Bundle args = new Bundle();
+            args.putLong(DIRECTORY_ID_ARG_KEY, directoryId);
+            getLoaderManager().initLoader(partitionIndex, args, this);
+        }
+    }
+
+    /**
+     * Queues up a delayed request to search the specified directory. Since
+     * directory search will likely introduce a lot of network traffic, we want
+     * to wait for a pause in the user's typing before sending a directory request.
+     */
+    private void loadDirectoryPartitionDelayed(int partitionIndex, DirectoryPartition partition) {
+        mDelayedDirectorySearchHandler.removeMessages(DIRECTORY_SEARCH_MESSAGE, partition);
+        Message msg = mDelayedDirectorySearchHandler.obtainMessage(
+                DIRECTORY_SEARCH_MESSAGE, partitionIndex, 0, partition);
+        mDelayedDirectorySearchHandler.sendMessageDelayed(msg, DIRECTORY_SEARCH_DELAY_MILLIS);
+    }
+
+    /**
+     * Loads the directory partition.
+     */
+    protected void loadDirectoryPartition(int partitionIndex, DirectoryPartition partition) {
+        Bundle args = new Bundle();
+        args.putLong(DIRECTORY_ID_ARG_KEY, partition.getDirectoryId());
+        getLoaderManager().restartLoader(partitionIndex, args, this);
+    }
+
+    /**
+     * Cancels all queued directory loading requests.
+     */
+    private void removePendingDirectorySearchRequests() {
+        mDelayedDirectorySearchHandler.removeMessages(DIRECTORY_SEARCH_MESSAGE);
+    }
+
+    @Override
+    public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
+        if (!checkProviderStatus(false)) {
+            if (data != null) {
+                data.close();
+            }
+            return;
+        }
+
+        int loaderId = loader.getId();
+        if (loaderId == DIRECTORY_LOADER_ID) {
+            mAdapter.changeDirectories(data);
+            startLoading();
+        } else {
+            onPartitionLoaded(loaderId, data);
+            if (isDirectorySearchEnabled()) {
+                if (mLoadDirectoryList) {
+                    mLoadDirectoryList = false;
+                    getLoaderManager().initLoader(DIRECTORY_LOADER_ID, null, this);
+                } else {
+                    startLoading();
+                }
+            }
+
+        }
+
+// TODO fix the empty view
+//            if (mEmptyView != null && (data == null || data.getCount() == 0)) {
+//                prepareEmptyView();
+//            }
+    }
+
+    protected void onPartitionLoaded(int partitionIndex, Cursor data) {
+        mAdapter.changeCursor(partitionIndex, data);
+        showCount(partitionIndex, data);
+        if (partitionIndex == mAdapter.getIndexedPartition()) {
+            mAizy.setIndexer(mAdapter.getIndexer(), data.getCount());
+        }
+
+        // TODO should probably only restore instance state after all directories are loaded
+        completeRestoreInstanceState();
+    }
+
+    @Override
+    public void onStop() {
+        super.onStop();
+        mContactsPrefs.unregisterChangeListener();
+        mAdapter.clearPartitions();
+    }
+
+    protected void reloadData() {
+        removePendingDirectorySearchRequests();
+        mAdapter.onDataReload();
+        mLoadPriorityDirectoriesOnly = true;
+        mForceLoad = true;
+        startLoading();
+    }
+
+    /**
+     * Configures the empty view. It is called when we are about to populate
+     * the list with an empty cursor.
+     */
+    protected void prepareEmptyView() {
+    }
+
+    /**
+     * Shows the count of entries included in the list. The default
+     * implementation does nothing.
+     */
+    protected void showCount(int partitionIndex, Cursor data) {
+    }
+
+    /**
+     * Provides logic that dismisses this fragment. The default implementation
+     * does nothing.
+     */
+    protected void finish() {
+    }
+
+    public void setSectionHeaderDisplayEnabled(boolean flag) {
+        mSectionHeaderDisplayEnabled = flag;
+        if (mAdapter != null) {
+            mAdapter.setSectionHeaderDisplayEnabled(flag);
+        }
+        configureAizy();
+    }
+
+    public boolean isSectionHeaderDisplayEnabled() {
+        return mSectionHeaderDisplayEnabled;
+    }
+
+    public void setAizyEnabled(boolean flag) {
+        mAizyEnabled = flag;
+        configureAizy();
+    }
+
+    public boolean isAizyEnabled() {
+        return mAizyEnabled;
+    }
+
+    private void configureAizy() {
+        boolean hasAisy = isAizyEnabled() && isSectionHeaderDisplayEnabled();
+
+        if (mListView != null) {
+            mListView.setFastScrollEnabled(!hasAisy);
+            mListView.setVerticalScrollBarEnabled(!hasAisy);
+        }
+        if (mAizy != null) {
+            if (hasAisy) {
+                mAizy.setVisibility(View.VISIBLE);
+            } else if (isAizyEnabled()) {
+                mAizy.setVisibility(View.INVISIBLE);
+            } else {
+                mAizy.setVisibility(View.GONE);
+            }
+        }
+    }
+
+    public void setPhotoLoaderEnabled(boolean flag) {
+        mPhotoLoaderEnabled = flag;
+        configurePhotoLoader();
+    }
+
+    public boolean isPhotoLoaderEnabled() {
+        return mPhotoLoaderEnabled;
+    }
+
+    /**
+     * Returns true if the list is supposed to visually highlight the selected item.
+     */
+    public boolean isSelectionVisible() {
+        return mSelectionVisible;
+    }
+
+    public void setSelectionVisible(boolean flag) {
+        this.mSelectionVisible = flag;
+    }
+
+    public void setQuickContactEnabled(boolean flag) {
+        this.mQuickContactEnabled = flag;
+    }
+
+    public void setSearchMode(boolean flag) {
+        if (mSearchMode != flag) {
+            mSearchMode = flag;
+            setSectionHeaderDisplayEnabled(!mSearchMode);
+
+            if (mAdapter != null) {
+                mAdapter.clearPartitions();
+                mAdapter.setSearchMode(flag);
+                mAdapter.setPinnedPartitionHeadersEnabled(flag);
+                mAdapter.configureDefaultPartition(false, flag);
+                reloadData();
+            }
+
+            if (mListView != null) {
+                mListView.setFastScrollEnabled(!flag);
+            }
+        }
+    }
+
+    public boolean isSearchMode() {
+        return mSearchMode;
+    }
+
+    public String getQueryString() {
+        return mQueryString;
+    }
+
+    public void setQueryString(String queryString) {
+        if (!TextUtils.equals(mQueryString, queryString)) {
+            mQueryString = queryString;
+            if (mAdapter != null) {
+                mAdapter.setQueryString(queryString);
+                reloadData();
+            }
+        }
+    }
+
+    public boolean isDirectorySearchEnabled() {
+        return mDirectorySearchEnabled;
+    }
+
+    public void setDirectorySearchEnabled(boolean flag) {
+        mDirectorySearchEnabled = flag;
+    }
+
+    public boolean isLegacyCompatibilityMode() {
+        return mLegacyCompatibility;
+    }
+
+    public void setLegacyCompatibilityMode(boolean flag) {
+        mLegacyCompatibility = flag;
+    }
+
+    protected int getContactNameDisplayOrder() {
+        return mDisplayOrder;
+    }
+
+    protected void setContactNameDisplayOrder(int displayOrder) {
+        mDisplayOrder = displayOrder;
+        if (mAdapter != null) {
+            mAdapter.setContactNameDisplayOrder(displayOrder);
+        }
+    }
+
+    public int getSortOrder() {
+        return mSortOrder;
+    }
+
+    public void setSortOrder(int sortOrder) {
+        mSortOrder = sortOrder;
+        if (mAdapter != null) {
+            mAdapter.setSortOrder(sortOrder);
+        }
+    }
+
+    public void setDirectoryResultLimit(int limit) {
+        mDirectoryResultLimit = limit;
+    }
+
+    public void setContextMenuAdapter(ContextMenuAdapter adapter) {
+        mContextMenuAdapter = adapter;
+        if (mListView != null) {
+            mListView.setOnCreateContextMenuListener(adapter);
+        }
+    }
+
+    public ContextMenuAdapter getContextMenuAdapter() {
+        return mContextMenuAdapter;
+    }
+
+    protected void loadPreferences() {
+        setContactNameDisplayOrder(mContactsPrefs.getDisplayOrder());
+        setSortOrder(mContactsPrefs.getSortOrder());
+        if (mListView instanceof ContactEntryListView) {
+            ContactEntryListView listView = (ContactEntryListView)mListView;
+            listView.setHighlightNamesWhenScrolling(isNameHighlighingEnabled());
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        onCreateView(inflater, container);
+
+        mAdapter = createListAdapter();
+
+        boolean searchMode = isSearchMode();
+        mAdapter.setSearchMode(searchMode);
+        mAdapter.configureDefaultPartition(false, searchMode);
+        mAdapter.setPhotoLoader(mPhotoLoader);
+        mListView.setAdapter(mAdapter);
+
+        if (!isSearchMode()) {
+            mListView.setFocusableInTouchMode(true);
+            mListView.requestFocus();
+        }
+
+        return mView;
+    }
+
+    protected void onCreateView(LayoutInflater inflater, ViewGroup container) {
+        mView = inflateView(inflater, container);
+
+        mListView = (ListView)mView.findViewById(android.R.id.list);
+        if (mListView == null) {
+            throw new RuntimeException(
+                    "Your content must have a ListView whose id attribute is " +
+                    "'android.R.id.list'");
+        }
+
+        View emptyView = mView.findViewById(com.android.internal.R.id.empty);
+        if (emptyView != null) {
+            mListView.setEmptyView(emptyView);
+            if (emptyView instanceof ContactListEmptyView) {
+                mEmptyView = (ContactListEmptyView)emptyView;
+            }
+        }
+
+        mListView.setOnItemClickListener(this);
+        mListView.setOnFocusChangeListener(this);
+        mListView.setOnTouchListener(this);
+        mListView.setFastScrollEnabled(!isSearchMode());
+
+        // Tell list view to not show dividers. We'll do it ourself so that we can *not* show
+        // them when an A-Z headers is visible.
+        mListView.setDividerHeight(0);
+
+        // We manually save/restore the listview state
+        mListView.setSaveEnabled(false);
+
+        if (mContextMenuAdapter != null) {
+            mListView.setOnCreateContextMenuListener(mContextMenuAdapter);
+        }
+
+        mAizy = (ContactListAizyView) mView.findViewById(R.id.contacts_list_aizy);
+        mAizy.setListener(new ContactListAizyView.Listener() {
+            @Override
+            public void onScroll(int position) {
+                mListView.smoothScrollToPositionFromTop(position + mListView.getHeaderViewsCount(),
+                        0);
+            }
+        });
+
+        configureAizy();
+        configurePhotoLoader();
+    }
+
+    protected void configurePhotoLoader() {
+        if (isPhotoLoaderEnabled() && mContext != null) {
+            if (mPhotoLoader == null) {
+                mPhotoLoader = new ContactPhotoLoader(mContext, R.drawable.ic_contact_list_picture);
+            }
+            if (mListView != null) {
+                mListView.setOnScrollListener(this);
+            }
+            if (mAdapter != null) {
+                mAdapter.setPhotoLoader(mPhotoLoader);
+            }
+        }
+    }
+
+    protected void configureAdapter() {
+        if (mAdapter == null) {
+            return;
+        }
+
+        mAdapter.setQuickContactEnabled(mQuickContactEnabled);
+        mAdapter.setQueryString(mQueryString);
+        mAdapter.setDirectorySearchEnabled(mDirectorySearchEnabled);
+        mAdapter.setPinnedPartitionHeadersEnabled(mSearchMode);
+        mAdapter.setContactNameDisplayOrder(mDisplayOrder);
+        mAdapter.setSortOrder(mSortOrder);
+        mAdapter.setNameHighlightingEnabled(isNameHighlighingEnabled());
+        mAdapter.setSectionHeaderDisplayEnabled(mSectionHeaderDisplayEnabled);
+        mAdapter.setSelectionVisible(mSelectionVisible);
+        mAdapter.setDirectoryResultLimit(mDirectoryResultLimit);
+    }
+
+    protected boolean isNameHighlighingEnabled() {
+        // When sort order and display order contradict each other, we want to
+        // highlight the part of the name used for sorting.
+        if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY &&
+                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE) {
+            return true;
+        } else if (mSortOrder == ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE &&
+                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    @Override
+    public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
+            int totalItemCount) {
+        if (isAizyEnabled()) {
+            mAizy.listOnScroll(firstVisibleItem);
+        }
+    }
+
+    public void onScrollStateChanged(AbsListView view, int scrollState) {
+        if (scrollState == OnScrollListener.SCROLL_STATE_FLING) {
+            mPhotoLoader.pause();
+        } else if (isPhotoLoaderEnabled()) {
+            mPhotoLoader.resume();
+        }
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+
+        registerProviderStatusObserver();
+
+        if (isPhotoLoaderEnabled()) {
+            mPhotoLoader.resume();
+        }
+    }
+
+    @Override
+    public void onDestroy() {
+        if (isPhotoLoaderEnabled()) {
+            mPhotoLoader.stop();
+        }
+        super.onDestroy();
+    }
+
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        hideSoftKeyboard();
+
+        int adjPosition = position - mListView.getHeaderViewsCount();
+        if (adjPosition >= 0) {
+            onItemClick(adjPosition, id);
+        }
+    }
+
+    private void hideSoftKeyboard() {
+        // Hide soft keyboard, if visible
+        InputMethodManager inputMethodManager = (InputMethodManager)
+                mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
+        inputMethodManager.hideSoftInputFromWindow(mListView.getWindowToken(), 0);
+    }
+
+    /**
+     * Dismisses the soft keyboard when the list takes focus.
+     */
+    public void onFocusChange(View view, boolean hasFocus) {
+        if (view == mListView && hasFocus) {
+            hideSoftKeyboard();
+        }
+    }
+
+    /**
+     * Dismisses the soft keyboard when the list is touched.
+     */
+    public boolean onTouch(View view, MotionEvent event) {
+        if (view == mListView) {
+            hideSoftKeyboard();
+        }
+        return false;
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        removePendingDirectorySearchRequests();
+        unregisterProviderStatusObserver();
+    }
+
+    /**
+     * Dismisses the search UI along with the keyboard if the filter text is empty.
+     */
+    public void onClose() {
+        hideSoftKeyboard();
+        finish();
+    }
+
+    /**
+     * Restore the list state after the adapter is populated.
+     */
+    protected void completeRestoreInstanceState() {
+        if (mListState != null) {
+            mListView.onRestoreInstanceState(mListState);
+            mListState = null;
+        }
+    }
+
+    private ContentObserver mProviderStatusObserver = new ContentObserver(new Handler()) {
+        @Override
+        public void onChange(boolean selfChange) {
+            checkProviderStatus(true);
+        }
+    };
+
+    /**
+     * Register an observer for provider status changes - we will need to
+     * reflect them in the UI.
+     */
+    private void registerProviderStatusObserver() {
+        mContext.getContentResolver().registerContentObserver(ProviderStatus.CONTENT_URI,
+                false, mProviderStatusObserver);
+    }
+
+    /**
+     * Register an observer for provider status changes - we will need to
+     * reflect them in the UI.
+     */
+    private void unregisterProviderStatusObserver() {
+        mContext.getContentResolver().unregisterContentObserver(mProviderStatusObserver);
+    }
+
+    /**
+     * Obtains the contacts provider status and configures the UI accordingly.
+     *
+     * @param loadData true if the method needs to start a query when the
+     *            provider is in the normal state
+     * @return true if the provider status is normal
+     */
+    private boolean checkProviderStatus(boolean loadData) {
+        View importFailureView = findViewById(R.id.import_failure);
+        if (importFailureView == null) {
+            return true;
+        }
+
+        // This query can be performed on the UI thread because
+        // the API explicitly allows such use.
+        Cursor cursor = mContext.getContentResolver().query(ProviderStatus.CONTENT_URI,
+                new String[] { ProviderStatus.STATUS, ProviderStatus.DATA1 }, null, null, null);
+        if (cursor != null) {
+            try {
+                if (cursor.moveToFirst()) {
+                    int status = cursor.getInt(0);
+                    if (status != mProviderStatus) {
+                        mProviderStatus = status;
+                        switch (status) {
+                            case ProviderStatus.STATUS_NORMAL:
+                                mAdapter.notifyDataSetInvalidated();
+                                if (loadData) {
+                                    reloadData();
+                                }
+                                break;
+
+                            case ProviderStatus.STATUS_CHANGING_LOCALE:
+                                setEmptyText(R.string.locale_change_in_progress);
+                                mAdapter.changeCursor(null);
+                                mAdapter.notifyDataSetInvalidated();
+                                break;
+
+                            case ProviderStatus.STATUS_UPGRADING:
+                                setEmptyText(R.string.upgrade_in_progress);
+                                mAdapter.changeCursor(null);
+                                mAdapter.notifyDataSetInvalidated();
+                                break;
+
+                            case ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY:
+                                long size = cursor.getLong(1);
+                                String message = mContext.getResources().getString(
+                                        R.string.upgrade_out_of_memory, new Object[] {size});
+                                TextView messageView = (TextView) findViewById(R.id.emptyText);
+                                messageView.setText(message);
+                                messageView.setVisibility(View.VISIBLE);
+                                configureImportFailureView(importFailureView);
+                                mAdapter.changeCursor(null);
+                                mAdapter.notifyDataSetInvalidated();
+                                break;
+                        }
+                    }
+                }
+            } finally {
+                cursor.close();
+            }
+        }
+
+        importFailureView.setVisibility(
+                mProviderStatus == ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY
+                        ? View.VISIBLE
+                        : View.GONE);
+        return mProviderStatus == ProviderStatus.STATUS_NORMAL;
+    }
+
+    private void configureImportFailureView(View importFailureView) {
+
+        OnClickListener listener = new OnClickListener(){
+
+            public void onClick(View v) {
+                switch(v.getId()) {
+                    case R.id.import_failure_uninstall_apps: {
+                        // TODO break into a separate method
+                        startActivity(new Intent(Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS));
+                        break;
+                    }
+                    case R.id.import_failure_retry_upgrade: {
+                        // Send a provider status update, which will trigger a retry
+                        ContentValues values = new ContentValues();
+                        values.put(ProviderStatus.STATUS, ProviderStatus.STATUS_UPGRADING);
+                        mContext.getContentResolver().update(ProviderStatus.CONTENT_URI,
+                                values, null, null);
+                        break;
+                    }
+                }
+            }};
+
+        Button uninstallApps = (Button) findViewById(R.id.import_failure_uninstall_apps);
+        uninstallApps.setOnClickListener(listener);
+
+        Button retryUpgrade = (Button) findViewById(R.id.import_failure_retry_upgrade);
+        retryUpgrade.setOnClickListener(listener);
+    }
+
+    private View findViewById(int id) {
+        return mView.findViewById(id);
+    }
+
+    // TODO: fix PluralRules to handle zero correctly and use Resources.getQuantityText directly
+    public String getQuantityText(int count, int zeroResourceId, int pluralResourceId) {
+        if (count == 0) {
+            return mContext.getString(zeroResourceId);
+        } else {
+            String format = mContext.getResources()
+                    .getQuantityText(pluralResourceId, count).toString();
+            return String.format(format, count);
+        }
+    }
+
+    protected void setEmptyText(int resourceId) {
+        TextView empty = (TextView) getEmptyView().findViewById(R.id.emptyText);
+        empty.setText(mContext.getText(resourceId));
+        empty.setVisibility(View.VISIBLE);
+    }
+
+    // TODO redesign into an async task or loader
+    protected boolean isSyncActive() {
+        Account[] accounts = AccountManager.get(mContext).getAccounts();
+        if (accounts != null && accounts.length > 0) {
+            IContentService contentService = ContentResolver.getContentService();
+            for (Account account : accounts) {
+                try {
+                    if (contentService.isSyncActive(account, ContactsContract.AUTHORITY)) {
+                        return true;
+                    }
+                } catch (RemoteException e) {
+                    Log.e(TAG, "Could not get the sync status");
+                }
+            }
+        }
+        return false;
+    }
+
+    protected boolean hasIccCard() {
+        TelephonyManager telephonyManager =
+                (TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE);
+        return telephonyManager.hasIccCard();
+    }
+
+    /**
+     * Processes a user request to start search. This may be triggered by the
+     * search key, a menu item or some other user action.
+     */
+    public void startSearch(String initialQuery) {
+        ContactsSearchManager.startSearch(getActivity(), initialQuery, mRequest);
+    }
+
+    /**
+     * Processes a result returned by the contact picker.
+     */
+    public void onPickerResult(Intent data) {
+        throw new UnsupportedOperationException("Picker result handler is not implemented.");
+    }
+
+    // TODO integrate into picker fragments
+//    protected Uri buildCallingPackageUri(Uri uri) {
+//        String callingPackage = getContext().getCallingPackage();
+//        if (!TextUtils.isEmpty(callingPackage)) {
+//            uri = uri.buildUpon().appendQueryParameter(
+//                    ContactsContract.REQUESTING_PACKAGE_PARAM_KEY, callingPackage).build();
+//        }
+//    }
+    private ContactsPreferences.ChangeListener mPreferencesChangeListener =
+            new ContactsPreferences.ChangeListener() {
+        @Override
+        public void onChange() {
+            loadPreferences();
+            reloadData();
+        }
+    };
+}
diff --git a/src/com/android/contacts/list/ContactEntryListView.java b/src/com/android/contacts/list/ContactEntryListView.java
new file mode 100644
index 0000000..7ef7732
--- /dev/null
+++ b/src/com/android/contacts/list/ContactEntryListView.java
@@ -0,0 +1,128 @@
+/*
+ * 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 com.android.contacts.widget.PinnedHeaderListView;
+import com.android.contacts.widget.TextHighlightingAnimation;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.PixelFormat;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.widget.AbsListView;
+import android.widget.ListAdapter;
+
+/**
+ * A custom list view for a list of contacts or contact-related entries.  It handles
+ * animation of names on scroll.
+ */
+public class ContactEntryListView extends PinnedHeaderListView {
+
+    private static final int TEXT_HIGHLIGHTING_ANIMATION_DURATION = 350;
+
+    private final TextHighlightingAnimation mHighlightingAnimation =
+            new ContactNameHighlightingAnimation(this, TEXT_HIGHLIGHTING_ANIMATION_DURATION);
+
+    private boolean mHighlightNamesWhenScrolling;
+    private Drawable mDefaultSelector;
+    private boolean mSelectionVisible;
+
+    public ContactEntryListView(Context context) {
+        this(context, null);
+    }
+
+    public ContactEntryListView(Context context, AttributeSet attrs) {
+        this(context, attrs, com.android.internal.R.attr.listViewStyle);
+    }
+
+    public ContactEntryListView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        mDefaultSelector = getSelector();
+    }
+
+    public TextHighlightingAnimation getTextHighlightingAnimation() {
+        return mHighlightingAnimation;
+    }
+
+    public boolean getHighlightNamesWhenScrolling() {
+        return mHighlightNamesWhenScrolling;
+    }
+
+    public void setHighlightNamesWhenScrolling(boolean flag) {
+        mHighlightNamesWhenScrolling = flag;
+    }
+
+    public void setSelectionVisible(boolean selectionVisible) {
+        if (selectionVisible != mSelectionVisible) {
+            mSelectionVisible = selectionVisible;
+            if (selectionVisible) {
+                // When a persistent selection is handled by the adapter,
+                // we want to disable the standard selection drawing.
+                setSelector(new EmptyDrawable());
+            } else {
+                setSelector(mDefaultSelector);
+            }
+        }
+    }
+
+    @Override
+    public void setAdapter(ListAdapter adapter) {
+        super.setAdapter(adapter);
+        if (adapter instanceof ContactEntryListAdapter) {
+            ((ContactEntryListAdapter)adapter)
+                    .setTextWithHighlightingFactory(mHighlightingAnimation);
+        }
+    }
+
+    @Override
+    public void onScrollStateChanged(AbsListView view, int scrollState) {
+        super.onScrollStateChanged(view, scrollState);
+        if (mHighlightNamesWhenScrolling) {
+            if (scrollState != OnScrollListener.SCROLL_STATE_IDLE) {
+                mHighlightingAnimation.startHighlighting();
+            } else {
+                mHighlightingAnimation.stopHighlighting();
+            }
+        }
+    }
+
+    /**
+     * A drawable that is ignored.  We have to use an empty drawable instead
+     * of null, because ListView does not allow selection to be null.
+     */
+    private class EmptyDrawable extends Drawable {
+
+        @Override
+        public void draw(Canvas canvas) {
+        }
+
+        @Override
+        public int getOpacity() {
+            return PixelFormat.OPAQUE;
+        }
+
+        @Override
+        public void setAlpha(int alpha) {
+        }
+
+        @Override
+        public void setColorFilter(ColorFilter cf) {
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/ContactListAdapter.java b/src/com/android/contacts/list/ContactListAdapter.java
new file mode 100644
index 0000000..7e2c4c2
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListAdapter.java
@@ -0,0 +1,329 @@
+/*
+ * 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.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.ContactCounts;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.Directory;
+import android.provider.ContactsContract.SearchSnippetColumns;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListView;
+import android.widget.QuickContactBadge;
+
+import java.util.List;
+
+/**
+ * A cursor adapter for the {@link ContactsContract.Contacts#CONTENT_TYPE} content type.
+ */
+public abstract class ContactListAdapter extends ContactEntryListAdapter {
+
+    protected static final String[] PROJECTION_CONTACT = new String[] {
+        Contacts._ID,                           // 0
+        Contacts.DISPLAY_NAME_PRIMARY,          // 1
+        Contacts.DISPLAY_NAME_ALTERNATIVE,      // 2
+        Contacts.SORT_KEY_PRIMARY,              // 3
+        Contacts.STARRED,                       // 4
+        Contacts.CONTACT_PRESENCE,              // 5
+        Contacts.PHOTO_ID,                      // 6
+        Contacts.PHOTO_THUMBNAIL_URI,           // 7
+        Contacts.LOOKUP_KEY,                    // 8
+        Contacts.PHONETIC_NAME,                 // 9
+        Contacts.HAS_PHONE_NUMBER,              // 10
+    };
+
+    protected static final String[] PROJECTION_DATA = new String[] {
+        Data.CONTACT_ID,                        // 0
+        Data.DISPLAY_NAME_PRIMARY,              // 1
+        Data.DISPLAY_NAME_ALTERNATIVE,          // 2
+        Data.SORT_KEY_PRIMARY,                  // 3
+        Data.STARRED,                           // 4
+        Data.CONTACT_PRESENCE,                  // 5
+        Data.PHOTO_ID,                          // 6
+        Data.PHOTO_THUMBNAIL_URI,               // 7
+        Data.LOOKUP_KEY,                        // 8
+        Data.PHONETIC_NAME,                     // 9
+        Data.HAS_PHONE_NUMBER,                  // 10
+    };
+
+    protected static final String[] FILTER_PROJECTION = new String[] {
+        Contacts._ID,                           // 0
+        Contacts.DISPLAY_NAME_PRIMARY,          // 1
+        Contacts.DISPLAY_NAME_ALTERNATIVE,      // 2
+        Contacts.SORT_KEY_PRIMARY,              // 3
+        Contacts.STARRED,                       // 4
+        Contacts.CONTACT_PRESENCE,              // 5
+        Contacts.PHOTO_ID,                      // 6
+        Contacts.PHOTO_THUMBNAIL_URI,           // 7
+        Contacts.LOOKUP_KEY,                    // 8
+        Contacts.PHONETIC_NAME,                 // 9
+        Contacts.HAS_PHONE_NUMBER,              // 10
+        SearchSnippetColumns.SNIPPET_MIMETYPE,  // 11
+        SearchSnippetColumns.SNIPPET_DATA1,     // 12
+        SearchSnippetColumns.SNIPPET_DATA4,     // 13
+    };
+
+    protected static final int CONTACT_ID_COLUMN_INDEX = 0;
+    protected static final int CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX = 1;
+    protected static final int CONTACT_DISPLAY_NAME_ALTERNATIVE_COLUMN_INDEX = 2;
+    protected static final int CONTACT_SORT_KEY_PRIMARY_COLUMN_INDEX = 3;
+    protected static final int CONTACT_STARRED_COLUMN_INDEX = 4;
+    protected static final int CONTACT_PRESENCE_STATUS_COLUMN_INDEX = 5;
+    protected static final int CONTACT_PHOTO_ID_COLUMN_INDEX = 6;
+    protected static final int CONTACT_PHOTO_URI_COLUMN_INDEX = 7;
+    protected static final int CONTACT_LOOKUP_KEY_COLUMN_INDEX = 8;
+    protected static final int CONTACT_PHONETIC_NAME_COLUMN_INDEX = 9;
+    protected static final int CONTACT_HAS_PHONE_COLUMN_INDEX = 10;
+    protected static final int CONTACT_SNIPPET_MIMETYPE_COLUMN_INDEX = 11;
+    protected static final int CONTACT_SNIPPET_DATA1_COLUMN_INDEX = 12;
+    protected static final int CONTACT_SNIPPET_DATA4_COLUMN_INDEX = 13;
+
+    private CharSequence mUnknownNameText;
+    private int mDisplayNameColumnIndex;
+    private int mAlternativeDisplayNameColumnIndex;
+
+    private long mSelectedContactDirectoryId;
+    private String mSelectedContactLookupKey;
+
+    private ContactListFilter mFilter;
+    private List<ContactListFilter> mAllFilters;
+
+    public ContactListAdapter(Context context) {
+        super(context);
+
+        mUnknownNameText = context.getText(android.R.string.unknownName);
+    }
+
+    public CharSequence getUnknownNameText() {
+        return mUnknownNameText;
+    }
+
+    /**
+     * Returns a full set of all available list filters.
+     */
+    public List<ContactListFilter> getAllFilters() {
+        return mAllFilters;
+    }
+
+    /**
+     * Returns the currently selected filter.
+     */
+    public ContactListFilter getFilter() {
+        return mFilter;
+    }
+
+    public void setFilter(ContactListFilter filter, List<ContactListFilter> allFilters) {
+        mFilter = filter;
+        mAllFilters = allFilters;
+    }
+
+    public long getSelectedContactDirectoryId() {
+        return mSelectedContactDirectoryId;
+    }
+
+    public String getSelectedContactLookupKey() {
+        return mSelectedContactLookupKey;
+    }
+
+    public void setSelectedContact(long selectedDirectoryId, String lookupKey) {
+        if (mSelectedContactDirectoryId != selectedDirectoryId ||
+                !TextUtils.equals(mSelectedContactLookupKey, lookupKey)) {
+            this.mSelectedContactDirectoryId = selectedDirectoryId;
+            this.mSelectedContactLookupKey = lookupKey;
+            notifyDataSetChanged();
+        }
+    }
+
+    protected static Uri buildSectionIndexerUri(Uri uri) {
+        return uri.buildUpon()
+                .appendQueryParameter(ContactCounts.ADDRESS_BOOK_INDEX_EXTRAS, "true").build();
+    }
+
+    public boolean getHasPhoneNumber(int position) {
+        return ((Cursor)getItem(position)).getInt(CONTACT_HAS_PHONE_COLUMN_INDEX) != 0;
+    }
+
+    public boolean isContactStarred(int position) {
+        return ((Cursor)getItem(position)).getInt(CONTACT_STARRED_COLUMN_INDEX) != 0;
+    }
+
+    @Override
+    public String getContactDisplayName(int position) {
+        return ((Cursor)getItem(position)).getString(mDisplayNameColumnIndex);
+    }
+
+    @Override
+    public void setContactNameDisplayOrder(int displayOrder) {
+        super.setContactNameDisplayOrder(displayOrder);
+        if (getContactNameDisplayOrder() == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
+            mDisplayNameColumnIndex = CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX;
+            mAlternativeDisplayNameColumnIndex = CONTACT_DISPLAY_NAME_ALTERNATIVE_COLUMN_INDEX;
+        } else {
+            mDisplayNameColumnIndex = CONTACT_DISPLAY_NAME_ALTERNATIVE_COLUMN_INDEX;
+            mAlternativeDisplayNameColumnIndex = CONTACT_DISPLAY_NAME_PRIMARY_COLUMN_INDEX;
+        }
+    }
+
+    /**
+     * Builds the {@link Contacts#CONTENT_LOOKUP_URI} for the given
+     * {@link ListView} position.
+     */
+    public Uri getContactUri(int position) {
+        int partitionIndex = getPartitionForPosition(position);
+        Cursor item = (Cursor)getItem(position);
+        return item != null ? getContactUri(partitionIndex, item) : null;
+    }
+
+    public Uri getContactUri(int partitionIndex, Cursor cursor) {
+        long contactId = cursor.getLong(CONTACT_ID_COLUMN_INDEX);
+        String lookupKey = cursor.getString(CONTACT_LOOKUP_KEY_COLUMN_INDEX);
+        Uri uri = Contacts.getLookupUri(contactId, lookupKey);
+        long directoryId = ((DirectoryPartition)getPartition(partitionIndex)).getDirectoryId();
+        if (directoryId != Directory.DEFAULT) {
+            uri = uri.buildUpon().appendQueryParameter(
+                    ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(directoryId)).build();
+        }
+        return uri;
+    }
+
+    /**
+     * Returns true if the specified contact is selected in the list. For a
+     * contact to be shown as selected, we need both the directory and and the
+     * lookup key to be the same. We are paying no attention to the contactId,
+     * because it is volatile, especially in the case of directories.
+     */
+    public boolean isSelectedContact(int partitionIndex, Cursor cursor) {
+        long directoryId = ((DirectoryPartition)getPartition(partitionIndex)).getDirectoryId();
+        return getSelectedContactDirectoryId() == directoryId
+                && TextUtils.equals(getSelectedContactLookupKey(),
+                        cursor.getString(CONTACT_LOOKUP_KEY_COLUMN_INDEX));
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final ContactListItemView view = new ContactListItemView(context, null);
+        view.setUnknownNameText(mUnknownNameText);
+        view.setTextWithHighlightingFactory(getTextWithHighlightingFactory());
+        view.setQuickContactEnabled(isQuickContactEnabled());
+        view.setActivatedStateSupported(isSelectionVisible());
+        return view;
+    }
+
+    protected void bindSectionHeaderAndDivider(ContactListItemView view, int position) {
+        Placement placement = getItemPlacementInSection(position);
+        view.setSectionHeader(placement.firstInSection ? placement.sectionHeader : null);
+        view.setDividerVisible(!placement.lastInSection);
+    }
+
+    protected void bindPhoto(final ContactListItemView view, int partitionIndex, Cursor cursor) {
+        if (!isPhotoSupported(partitionIndex)) {
+            view.removePhotoView();
+            return;
+        }
+
+        // Set the photo, if available
+        long photoId = 0;
+        if (!cursor.isNull(CONTACT_PHOTO_ID_COLUMN_INDEX)) {
+            photoId = cursor.getLong(CONTACT_PHOTO_ID_COLUMN_INDEX);
+        }
+
+        if (photoId != 0) {
+            getPhotoLoader().loadPhoto(view.getPhotoView(), photoId);
+        } else {
+            final String photoUriString = cursor.getString(CONTACT_PHOTO_URI_COLUMN_INDEX);
+            final Uri photoUri = photoUriString == null ? null : Uri.parse(photoUriString);
+            getPhotoLoader().loadPhoto(view.getPhotoView(), photoUri);
+        }
+    }
+
+    protected void bindQuickContact(
+            final ContactListItemView view, int partitionIndex, Cursor cursor) {
+        long photoId = 0;
+        if (!cursor.isNull(CONTACT_PHOTO_ID_COLUMN_INDEX)) {
+            photoId = cursor.getLong(CONTACT_PHOTO_ID_COLUMN_INDEX);
+        }
+
+        QuickContactBadge quickContact = view.getQuickContact();
+        quickContact.assignContactUri(getContactUri(partitionIndex, cursor));
+        getPhotoLoader().loadPhoto(quickContact, photoId);
+    }
+
+    protected void bindName(final ContactListItemView view, Cursor cursor) {
+        view.showDisplayName(cursor, mDisplayNameColumnIndex, isNameHighlightingEnabled(),
+                mAlternativeDisplayNameColumnIndex);
+        view.showPhoneticName(cursor, CONTACT_PHONETIC_NAME_COLUMN_INDEX);
+    }
+
+    protected void bindPresence(final ContactListItemView view, Cursor cursor) {
+        view.showPresence(cursor, CONTACT_PRESENCE_STATUS_COLUMN_INDEX);
+    }
+
+    protected void bindSearchSnippet(final ContactListItemView view, Cursor cursor) {
+        view.showSnippet(cursor, CONTACT_SNIPPET_MIMETYPE_COLUMN_INDEX,
+                CONTACT_SNIPPET_DATA1_COLUMN_INDEX, CONTACT_SNIPPET_DATA4_COLUMN_INDEX);
+    }
+
+    public int getSelectedContactPosition() {
+        if (mSelectedContactLookupKey == null) {
+            return -1;
+        }
+
+        Cursor cursor = null;
+        int partitionIndex = -1;
+        int partitionCount = getPartitionCount();
+        for (int i = 0; i < partitionCount; i++) {
+            DirectoryPartition partition = (DirectoryPartition) getPartition(i);
+            if (partition.getDirectoryId() == mSelectedContactDirectoryId) {
+                partitionIndex = i;
+                break;
+            }
+        }
+        if (partitionIndex == -1) {
+            return -1;
+        }
+
+        cursor = getCursor(partitionIndex);
+        if (cursor == null) {
+            return -1;
+        }
+
+        cursor.moveToPosition(-1);      // Reset cursor
+        int offset = -1;
+        while (cursor.moveToNext()) {
+            String lookupKey = cursor.getString(CONTACT_LOOKUP_KEY_COLUMN_INDEX);
+            if (mSelectedContactLookupKey.equals(lookupKey)) {
+                offset = cursor.getPosition();
+                break;
+            }
+        }
+        if (offset == -1) {
+            return -1;
+        }
+
+        int position = getPositionForPartition(partitionIndex) + offset;
+        if (hasHeader(partitionIndex)) {
+            position++;
+        }
+        return position;
+    }
+}
diff --git a/src/com/android/contacts/list/ContactListAizyView.java b/src/com/android/contacts/list/ContactListAizyView.java
new file mode 100644
index 0000000..34ab7b5
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListAizyView.java
@@ -0,0 +1,244 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.PopupWindow;
+import android.widget.SectionIndexer;
+import android.widget.TextView;
+
+/**
+ * A View that displays the sections given by an Indexer and their relative sizes. For
+ * English and similar languages, this is an A to Z list (where only the used letters are
+ * displayed). As the sections are shown in their relative sizes, this View can be used as a
+ * scrollbar.
+ */
+public class ContactListAizyView extends View {
+    private static final String TAG = "ContactListAizyView";
+
+    private SectionIndexer mIndexer;
+    private int mItemCount;
+    private int[] mSectionPositions;
+
+    private Listener mListener;
+    private float mPosition;
+
+    private int mPreviewPosition;
+    private PopupWindow mPreviewPopupWindow;
+    private TextView mPreviewPopupTextView;
+    private boolean mPreviewPopupVisible;
+    private final int[] mWindowOffset = new int[2];
+
+    private ResourceValues mResourceValues;
+
+    public ContactListAizyView(Context context) {
+        super(context);
+    }
+
+    public ContactListAizyView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    public ContactListAizyView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+
+        mResourceValues = new ResourceValues(getContext().getResources());
+
+        final LayoutInflater inflater =
+                (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        mPreviewPopupWindow = new PopupWindow(
+                inflater.inflate(R.layout.aizy_popup_window, null, false),
+                mResourceValues.getPreviewWidth(), mResourceValues.getPreviewHeight());
+        mPreviewPopupWindow.setAnimationStyle(R.style.AizyPreviewPopupAnimation);
+        mPreviewPopupTextView =
+                (TextView) mPreviewPopupWindow.getContentView().findViewById(R.id.caption);
+    }
+
+    public void setIndexer(SectionIndexer indexer, int itemCount) {
+        mIndexer = indexer;
+        mItemCount = itemCount;
+        if (mIndexer == null) {
+            mSectionPositions = null;
+            return;
+        }
+
+        // Read the section positions
+        final Object[] sections = mIndexer.getSections();
+        final int sectionCount = sections.length;
+        if (mSectionPositions == null || mSectionPositions.length != sectionCount) {
+            mSectionPositions = new int[sectionCount];
+        }
+        for (int i = 0; i < sectionCount; i++) {
+            mSectionPositions[i] = mIndexer.getPositionForSection(i);
+        }
+
+    }
+
+    public void setListener(Listener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        setMeasuredDimension(resolveSize(0, widthMeasureSpec), resolveSize(0, heightMeasureSpec));
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        if (mIndexer == null) return;
+
+        drawLineAndText(canvas);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        getLocationInWindow(mWindowOffset);
+
+        final int previewX = mWindowOffset[0] + getWidth();
+        final int previewY = (int) event.getY() + mWindowOffset[1]
+                - mPreviewPopupWindow.getHeight() / 2;
+        final boolean previewPopupVisible =
+            event.getActionMasked() == MotionEvent.ACTION_MOVE ||
+            event.getActionMasked() == MotionEvent.ACTION_DOWN;
+        if (previewPopupVisible != mPreviewPopupVisible) {
+            if (previewPopupVisible) {
+                mPreviewPopupWindow.showAtLocation(this, Gravity.LEFT | Gravity.TOP,
+                        previewX, previewY);
+            } else {
+                mPreviewPopupWindow.dismiss();
+            }
+            mPreviewPopupVisible = previewPopupVisible;
+        } else {
+            mPreviewPopupWindow.update(previewX, previewY, -1, -1);
+        }
+        final float yFactor = (float) getHeight() / mItemCount;
+        final int position = Math.max(0, (int) (event.getY() / yFactor));
+        if (mIndexer != null) {
+            final int index = mIndexer.getSectionForPosition(position);
+            final Object[] sections = mIndexer.getSections();
+            final String caption =
+                    (index != -1 && index < sections.length) ? sections[index].toString() : "";
+            mPreviewPopupTextView.setText(caption);
+        }
+
+        if (mListener != null) mListener.onScroll(position);
+        mPreviewPosition = position;
+
+        super.onTouchEvent(event);
+        return true;
+    }
+
+    private void drawLineAndText(Canvas canvas) {
+        final float yFactor = (float) getHeight() / mItemCount;
+
+        final Paint paint = new Paint();
+
+        paint.setColor(mResourceValues.getLineColor());
+        paint.setAntiAlias(true);
+
+        // TODO: Decide whether to use this feature and remove this flag
+        final boolean useSections = false;
+
+        // Draw sections
+        final float centerX = getWidth() * 0.5f;
+        if (useSections) {
+            for (int i = 1; i < mSectionPositions.length; i++) {
+                final float y1 = mSectionPositions[i - 1] * yFactor;
+                final float y2 = mSectionPositions[i] * yFactor;
+                canvas.drawLine(
+                        centerX, y1 + 1.0f,
+                        centerX, y2 - 1.0f,
+                        paint);
+            }
+        } else {
+            canvas.drawLine(
+                    centerX, 0.0f,
+                    centerX, getHeight(),
+                    paint);
+        }
+
+        // Draw knob
+        final Drawable knob = mResourceValues.getKnobDrawable();
+        final int w = knob.getIntrinsicWidth();
+        final int h = knob.getIntrinsicWidth();
+        final float y;
+//        if (mPreviewPopupWindow.) {
+//            y = mPreviewPosition * yFactor;
+//        } else {
+            y = mPosition * yFactor;
+//        }
+        knob.setBounds(
+                (int) (centerX - w / 2.0f), (int) (y - h / 2.0f),
+                (int) (centerX + w / 2.0f), (int) (y + h / 2.0f));
+        knob.draw(canvas);
+    }
+
+    public void listOnScroll(int firstVisibleItem) {
+        mPosition = firstVisibleItem;
+        invalidate();
+    }
+
+    private static class ResourceValues {
+        private int mLineColor;
+        private Drawable mKnobDrawable;
+        private int mPreviewWidth;
+        private int mPreviewHeight;
+
+        public int getLineColor() {
+            return mLineColor;
+        }
+
+        public Drawable getKnobDrawable() {
+            return mKnobDrawable;
+        }
+
+        public int getPreviewWidth() {
+            return mPreviewWidth;
+        }
+
+        public int getPreviewHeight() {
+            return mPreviewHeight;
+        }
+
+        public ResourceValues(Resources resources) {
+            mLineColor = resources.getColor(R.color.aizy_line_color);
+            mKnobDrawable = resources.getDrawable(R.drawable.temp_aizy_knob);
+            mPreviewWidth = resources.getDimensionPixelSize(R.dimen.aizy_preview_width);
+            mPreviewHeight = resources.getDimensionPixelSize(R.dimen.aizy_preview_height);
+        }
+    }
+
+    public interface Listener {
+        void onScroll(int position);
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/list/ContactListFilter.java b/src/com/android/contacts/list/ContactListFilter.java
new file mode 100644
index 0000000..0189bbb
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListFilter.java
@@ -0,0 +1,162 @@
+/*
+ * 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.content.SharedPreferences;
+import android.graphics.drawable.Drawable;
+import android.text.TextUtils;
+
+/**
+ * Contact list filter parameters.
+ */
+public final class ContactListFilter implements Comparable<ContactListFilter> {
+
+    public static final int FILTER_TYPE_DEFAULT = -1;
+    public static final int FILTER_TYPE_ALL_ACCOUNTS = -2;
+    public static final int FILTER_TYPE_CUSTOM = -3;
+    public static final int FILTER_TYPE_STARRED = -4;
+    public static final int FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY = -5;
+
+    public static final int FILTER_TYPE_ACCOUNT = 0;
+    public static final int FILTER_TYPE_GROUP = 1;
+
+    private static final String KEY_FILTER_TYPE = "filter.type";
+    private static final String KEY_ACCOUNT_NAME = "filter.accountName";
+    private static final String KEY_ACCOUNT_TYPE = "filter.accountType";
+    private static final String KEY_GROUP_ID = "filter.groupId";
+
+    public int filterType;
+    public String accountType;
+    public String accountName;
+    public Drawable icon;
+    public long groupId;
+    public String title;
+
+    public ContactListFilter(int filterType) {
+        this.filterType = filterType;
+    }
+
+    public ContactListFilter(
+            String accountType, String accountName, Drawable icon, String title) {
+        this.filterType = ContactListFilter.FILTER_TYPE_ACCOUNT;
+        this.accountType = accountType;
+        this.accountName = accountName;
+        this.icon = icon;
+        this.title = title;
+    }
+
+    public ContactListFilter(
+            String accountType, String accountName, long groupId, String title) {
+        this.filterType = ContactListFilter.FILTER_TYPE_GROUP;
+        this.accountType = accountType;
+        this.accountName = accountName;
+        this.groupId = groupId;
+        this.title = title;
+    }
+
+    /**
+     * Returns true if this filter is based on data and may become invalid over time.
+     */
+    public boolean isValidationRequired() {
+        return filterType == FILTER_TYPE_ACCOUNT || filterType == FILTER_TYPE_GROUP;
+    }
+
+    @Override
+    public String toString() {
+        switch (filterType) {
+            case ContactListFilter.FILTER_TYPE_ACCOUNT:
+                return "account: " + accountType + " " + accountName;
+            case ContactListFilter.FILTER_TYPE_GROUP:
+                return "group: " + accountType + " " + accountName + " " + title + "(" + groupId
+                        + ")";
+        }
+        return super.toString();
+    }
+
+    @Override
+    public int compareTo(ContactListFilter another) {
+        int res = accountType.compareTo(another.accountType);
+        if (res != 0) {
+            return res;
+        }
+
+        res = accountName.compareTo(another.accountName);
+        if (res != 0) {
+            return res;
+        }
+
+        if (filterType != another.filterType) {
+            return filterType - another.filterType;
+        }
+
+        String title1 = title != null ? title : "";
+        String title2 = another.title != null ? another.title : "";
+        return title1.compareTo(title2);
+    }
+
+    @Override
+    public int hashCode() {
+        int code = filterType;
+        if (accountType != null) {
+            code = code * 31 + accountType.hashCode();
+            code = code * 31 + accountName.hashCode();
+        }
+        if (groupId != 0) {
+            code = code * 31 + (int) groupId;
+        }
+        return code;
+    }
+
+    @Override
+    public boolean equals(Object other) {
+        if (this == other) {
+            return true;
+        }
+
+        if (!(other instanceof ContactListFilter)) {
+            return false;
+        }
+
+        ContactListFilter otherFilter = (ContactListFilter) other;
+        return filterType == otherFilter.filterType
+                && TextUtils.equals(accountName, otherFilter.accountName)
+                && TextUtils.equals(accountType, otherFilter.accountType)
+                && groupId == otherFilter.groupId;
+    }
+
+    public static void storeToPreferences(SharedPreferences prefs, ContactListFilter filter) {
+        prefs.edit()
+            .putInt(KEY_FILTER_TYPE, filter == null ? FILTER_TYPE_DEFAULT : filter.filterType)
+            .putString(KEY_ACCOUNT_NAME, filter == null ? null : filter.accountName)
+            .putString(KEY_ACCOUNT_TYPE, filter == null ? null : filter.accountType)
+            .putLong(KEY_GROUP_ID, filter == null ? -1 : filter.groupId)
+            .apply();
+    }
+
+    public static ContactListFilter restoreFromPreferences(SharedPreferences prefs) {
+        int filterType = prefs.getInt(KEY_FILTER_TYPE, FILTER_TYPE_DEFAULT);
+        if (filterType == FILTER_TYPE_DEFAULT) {
+            return null;
+        }
+
+        ContactListFilter filter = new ContactListFilter(filterType);
+        filter.accountName = prefs.getString(KEY_ACCOUNT_NAME, null);
+        filter.accountType = prefs.getString(KEY_ACCOUNT_TYPE, null);
+        filter.groupId = prefs.getLong(KEY_GROUP_ID, -1);
+        return filter;
+    }
+}
diff --git a/src/com/android/contacts/list/ContactListFilterController.java b/src/com/android/contacts/list/ContactListFilterController.java
new file mode 100644
index 0000000..934fa49
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListFilterController.java
@@ -0,0 +1,356 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.app.Activity;
+import android.app.LoaderManager;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.Context;
+import android.content.Loader;
+import android.content.SharedPreferences;
+import android.content.res.TypedArray;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.preference.PreferenceManager;
+import android.util.SparseArray;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.BaseAdapter;
+import android.widget.ListPopupWindow;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Controls a list of {@link ContactListFilter}'s.
+ */
+public class ContactListFilterController
+        implements LoaderCallbacks<List<ContactListFilter>>, OnClickListener, OnItemClickListener {
+
+    public interface ContactListFilterListener {
+        void onContactListFiltersLoaded();
+        void onContactListFilterChanged();
+        void onContactListFilterCustomizationRequest();
+    }
+
+    private static final int MESSAGE_REFRESH_FILTERS = 0;
+
+    /**
+     * The delay before the contact filter list is refreshed. This is needed because
+     * during contact sync we will get lots of notifications in rapid succession. This
+     * delay will prevent the slowly changing list of filters from reloading too often.
+     */
+    private static final int FILTER_SPINNER_REFRESH_DELAY_MILLIS = 5000;
+
+    private Context mContext;
+    private LoaderManager mLoaderManager;
+    private boolean mEnabled = true;
+    private List<ContactListFilterListener> mListeners = new ArrayList<ContactListFilterListener>();
+    private ListPopupWindow mPopup;
+    private int mPopupWidth = -1;
+    private SparseArray<ContactListFilter> mFilters;
+    private ArrayList<ContactListFilter> mFilterList;
+    private int mNextFilterId = 1;
+    private View mAnchor;
+    private FilterListAdapter mFilterListAdapter;
+    private ContactListFilter mFilter;
+    private boolean mFiltersLoaded;
+    private final Handler mHandler = new Handler() {
+
+        @Override
+        public void handleMessage(Message msg) {
+            if (msg.what == MESSAGE_REFRESH_FILTERS) {
+                loadFilters();
+            }
+        }
+    };
+
+    private int mAccountCount;
+
+    public ContactListFilterController(Activity activity) {
+        mContext = activity;
+        mLoaderManager = activity.getLoaderManager();
+    }
+
+    public void setEnabled(boolean flag) {
+        mEnabled = flag;
+    }
+
+    public void addListener(ContactListFilterListener listener) {
+        mListeners.add(listener);
+    }
+
+    public void removeListener(ContactListFilterListener listener) {
+        mListeners.remove(listener);
+    }
+
+    public void setAnchor(View anchor) {
+        mAnchor = anchor;
+        mAnchor.setOnClickListener(this);
+    }
+
+    public ContactListFilter getFilter() {
+        return mFilter;
+    }
+
+    public List<ContactListFilter> getFilterList() {
+        return mFilterList;
+    }
+
+    public boolean isLoaded() {
+        return mFiltersLoaded;
+    }
+
+    public void startLoading() {
+        // Set the "ready" flag right away - we only want to start the loader once
+        mFiltersLoaded = false;
+        mFilter = ContactListFilter.restoreFromPreferences(getSharedPreferences());
+        loadFilters();
+    }
+
+    private SharedPreferences getSharedPreferences() {
+        return PreferenceManager.getDefaultSharedPreferences(mContext);
+    }
+
+    private void loadFilters() {
+        mLoaderManager.restartLoader(R.id.contact_list_filter_loader, null, this);
+    }
+
+    @Override
+    public ContactListFilterLoader onCreateLoader(int id, Bundle args) {
+        return new ContactListFilterLoader(mContext);
+    }
+
+    @Override
+    public void onLoadFinished(
+            Loader<List<ContactListFilter>> loader, List<ContactListFilter> filters) {
+        if (mFilters == null) {
+            mFilters = new SparseArray<ContactListFilter>(filters.size());
+            mFilterList = new ArrayList<ContactListFilter>();
+        } else {
+            mFilters.clear();
+            mFilterList.clear();
+        }
+
+        boolean filterValid = mFilter != null && !mFilter.isValidationRequired();
+
+        mAccountCount = 0;
+        int count = filters.size();
+        for (int index = 0; index < count; index++) {
+            if (filters.get(index).filterType == ContactListFilter.FILTER_TYPE_ACCOUNT) {
+                mAccountCount++;
+            }
+        }
+
+        if (mAccountCount > 1) {
+            mFilters.append(mNextFilterId++,
+                    new ContactListFilter(ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS));
+            mFilters.append(mNextFilterId++,
+                    new ContactListFilter(ContactListFilter.FILTER_TYPE_STARRED));
+        }
+
+        for (int index = 0; index < count; index++) {
+            ContactListFilter filter = filters.get(index);
+
+            boolean firstAndOnly = mAccountCount == 1
+                    && filter.filterType == ContactListFilter.FILTER_TYPE_ACCOUNT;
+
+            // If we only have one account, don't show it as "account", instead show it as "all"
+            if (firstAndOnly) {
+                filter = new ContactListFilter(ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS);
+            }
+
+            mFilters.append(mNextFilterId++, filter);
+            mFilterList.add(filter);
+
+            if (filter.equals(mFilter)) {
+                // Refresh the filter in case the title got changed
+                mFilter = filter;
+                filterValid = true;
+            }
+
+            if (firstAndOnly) {
+                mFilters.append(mNextFilterId++,
+                        new ContactListFilter(ContactListFilter.FILTER_TYPE_STARRED));
+            }
+        }
+
+        mFilters.append(mNextFilterId++,
+                new ContactListFilter(ContactListFilter.FILTER_TYPE_CUSTOM));
+
+        boolean filterChanged = false;
+        if (mFilter == null  || !filterValid) {
+            filterChanged = mFilter != null;
+            mFilter = getDefaultFilter();
+        }
+
+        if (mFilterListAdapter == null) {
+            mFilterListAdapter = new FilterListAdapter();
+        } else {
+            mFilterListAdapter.notifyDataSetChanged();
+        }
+
+        if (filterChanged) {
+            mFiltersLoaded = true;
+            notifyContactListFilterChanged();
+        } else if (!mFiltersLoaded) {
+            mFiltersLoaded = true;
+            notifyContacListFiltersLoaded();
+        }
+    }
+
+    public void postDelayedRefresh() {
+        if (!mHandler.hasMessages(MESSAGE_REFRESH_FILTERS)) {
+            mHandler.sendEmptyMessageDelayed(
+                    MESSAGE_REFRESH_FILTERS, FILTER_SPINNER_REFRESH_DELAY_MILLIS);
+        }
+    }
+
+    private void setContactListFilter(int filterId) {
+        ContactListFilter filter;
+        if (filterId == ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS) {
+            filter = new ContactListFilter(ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS);
+        } else if (filterId == ContactListFilter.FILTER_TYPE_CUSTOM) {
+            filter = new ContactListFilter(ContactListFilter.FILTER_TYPE_CUSTOM);
+        } else if (filterId == ContactListFilter.FILTER_TYPE_STARRED) {
+            filter = new ContactListFilter(ContactListFilter.FILTER_TYPE_STARRED);
+        } else {
+            filter = mFilters.get(filterId);
+            if (filter == null) {
+                filter = getDefaultFilter();
+            }
+        }
+
+        setContactListFilter(filter, true);
+    }
+
+    public void setContactListFilter(ContactListFilter filter, boolean persistent) {
+        if (!filter.equals(mFilter)) {
+            mFilter = filter;
+            ContactListFilter.storeToPreferences(getSharedPreferences(), mFilter);
+            if (mListeners != null) {
+               notifyContactListFilterChanged();
+            }
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (!mFiltersLoaded || !mEnabled) {
+            return;
+        }
+
+        if (mPopupWidth == -1) {
+            TypedArray a = mContext.obtainStyledAttributes(null, R.styleable.ContactBrowser);
+            mPopupWidth = a.getDimensionPixelSize(
+                    R.styleable.ContactBrowser_contact_filter_popup_width, -1);
+            a.recycle();
+
+            if (mPopupWidth == -1) {
+                mPopupWidth = mAnchor.getWidth();
+            }
+        }
+
+        mPopup = new ListPopupWindow(mContext, null);
+        mPopup.setWidth(mPopupWidth);
+        mPopup.setAdapter(mFilterListAdapter);
+        mPopup.setAnchorView(mAnchor);
+        mPopup.setOnItemClickListener(this);
+        mPopup.setModal(true);
+        mPopup.show();
+    }
+
+    @Override
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        mPopup.dismiss();
+        if (mFilters.get((int) id).filterType == ContactListFilter.FILTER_TYPE_CUSTOM) {
+            notifyContactListFilterCustomizationRequest();
+        } else {
+            setContactListFilter((int) id);
+        }
+    }
+
+    public void selectCustomFilter() {
+        mFilter = new ContactListFilter(ContactListFilter.FILTER_TYPE_CUSTOM);
+        notifyContactListFilterChanged();
+    }
+
+    private ContactListFilter getDefaultFilter() {
+        return mFilters.size() > 0 ? mFilters.valueAt(0) : null;
+    }
+
+    private void notifyContacListFiltersLoaded() {
+        for (ContactListFilterListener listener : mListeners) {
+            listener.onContactListFiltersLoaded();
+        }
+    }
+
+    private void notifyContactListFilterChanged() {
+        for (ContactListFilterListener listener : mListeners) {
+            listener.onContactListFilterChanged();
+        }
+    }
+
+    private void notifyContactListFilterCustomizationRequest() {
+        for (ContactListFilterListener listener : mListeners) {
+            listener.onContactListFilterCustomizationRequest();
+        }
+    }
+
+    private class FilterListAdapter extends BaseAdapter {
+        private LayoutInflater mLayoutInflater;
+
+        public FilterListAdapter() {
+            mLayoutInflater = LayoutInflater.from(mContext);
+        }
+
+        @Override
+        public int getCount() {
+            return mFilters.size();
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return mFilters.keyAt(position);
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return mFilters.valueAt(position);
+        }
+
+        public View getView(int position, View convertView, ViewGroup parent) {
+            ContactListFilterView view;
+            if (convertView != null) {
+                view = (ContactListFilterView) convertView;
+            } else {
+                view = (ContactListFilterView) mLayoutInflater.inflate(
+                        R.layout.filter_spinner_item, parent, false);
+            }
+            view.setMultipleAccounts(mAccountCount > 1);
+            view.setContactListFilter(mFilters.valueAt(position));
+            view.bindView(true);
+            return view;
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/ContactListFilterLoader.java b/src/com/android/contacts/list/ContactListFilterLoader.java
new file mode 100644
index 0000000..ae791ab
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListFilterLoader.java
@@ -0,0 +1,129 @@
+/*
+ * 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 com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.AccountTypes;
+
+import android.accounts.Account;
+import android.content.AsyncTaskLoader;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.Cursor;
+import android.graphics.drawable.Drawable;
+import android.provider.ContactsContract.Groups;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+/**
+ * A loader for the data needed for the group selector.
+ */
+public class ContactListFilterLoader extends AsyncTaskLoader<List<ContactListFilter>> {
+
+    private static final class GroupQuery {
+        public static final String[] COLUMNS = {
+            Groups._ID,
+            Groups.ACCOUNT_TYPE,
+            Groups.ACCOUNT_NAME,
+            Groups.TITLE,
+            Groups.AUTO_ADD,
+        };
+
+        public static final int ID = 0;
+        public static final int ACCOUNT_TYPE = 1;
+        public static final int ACCOUNT_NAME = 2;
+        public static final int TITLE = 3;
+        public static final int IS_DEFAULT_GROUP = 4;       // Using the AUTO_ADD group as default
+
+        private static final String SELECTION =
+                Groups.DELETED + "=0 AND " + Groups.FAVORITES + "=0";
+    }
+
+    public ContactListFilterLoader(Context context) {
+        super(context);
+    }
+
+    @Override
+    public List<ContactListFilter> loadInBackground() {
+
+        ArrayList<ContactListFilter> results = new ArrayList<ContactListFilter>();
+        Context context = getContext();
+        final AccountTypes sources = AccountTypes.getInstance(context);
+        ArrayList<Account> accounts = sources.getAccounts(false);
+        for (Account account : accounts) {
+            BaseAccountType source = sources.getInflatedSource(
+                    account.type, BaseAccountType.LEVEL_SUMMARY);
+            Drawable icon = source != null ? source.getDisplayIcon(getContext()) : null;
+            results.add(new ContactListFilter(account.type, account.name, icon, account.name));
+        }
+
+        HashSet<Account> accountsWithGroups = new HashSet<Account>();
+        ContentResolver resolver = context.getContentResolver();
+
+        Cursor cursor = resolver.query(
+                Groups.CONTENT_URI, GroupQuery.COLUMNS, GroupQuery.SELECTION, null, null);
+        try {
+            while (cursor.moveToNext()) {
+                long groupId = cursor.getLong(GroupQuery.ID);
+                String accountType = cursor.getString(GroupQuery.ACCOUNT_TYPE);
+                String accountName = cursor.getString(GroupQuery.ACCOUNT_NAME);
+                boolean defaultGroup = false;
+                if (!cursor.isNull(GroupQuery.IS_DEFAULT_GROUP)) {
+                    defaultGroup = cursor.getInt(GroupQuery.IS_DEFAULT_GROUP) != 0;
+                }
+                if (defaultGroup) {
+                    // Find the filter for this account and set the default group ID
+                    for (ContactListFilter filter : results) {
+                        if (filter.accountName.equals(accountName)
+                                && filter.accountType.equals(accountType)) {
+                            filter.groupId = groupId;
+                            break;
+                        }
+                    }
+                } else {
+                    String title = cursor.getString(GroupQuery.TITLE);
+                    results.add(new ContactListFilter(accountType, accountName, groupId, title));
+                }
+            }
+        } finally {
+            cursor.close();
+        }
+
+        Collections.sort(results);
+
+        return results;
+    }
+
+    @Override
+    public void destroy() {
+        stopLoading();
+    }
+
+    @Override
+    public void startLoading() {
+        cancelLoad();
+        forceLoad();
+    }
+
+    @Override
+    public void stopLoading() {
+        cancelLoad();
+    }
+}
diff --git a/src/com/android/contacts/list/ContactListFilterView.java b/src/com/android/contacts/list/ContactListFilterView.java
new file mode 100644
index 0000000..e065e91
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListFilterView.java
@@ -0,0 +1,168 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+/**
+ * Contact list filter parameters.
+ */
+public class ContactListFilterView extends LinearLayout {
+
+    private ImageView mIcon;
+    private TextView mLabel;
+    private TextView mIndentedLabel;
+    private View mGroupView;
+    private ContactListFilter mFilter;
+    private boolean mMultipleAccounts;
+    private TextView mGroupLabel;
+    private TextView mAccountLabel;
+
+    public ContactListFilterView(Context context) {
+        super(context);
+    }
+
+    public ContactListFilterView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public void setContactListFilter(ContactListFilter filter) {
+        mFilter = filter;
+    }
+
+    public ContactListFilter getContactListFilter() {
+        return mFilter;
+    }
+
+    public void setMultipleAccounts(boolean flag) {
+        this.mMultipleAccounts = flag;
+    }
+
+    public void bindView(boolean dropdown) {
+        if (mLabel == null) {
+            mIcon = (ImageView) findViewById(R.id.icon);
+            mLabel = (TextView) findViewById(R.id.label);
+            mIndentedLabel = (TextView) findViewById(R.id.indented_label);
+            mGroupView = findViewById(R.id.group);
+            mGroupLabel = (TextView) findViewById(R.id.group_label);
+            mAccountLabel = (TextView) findViewById(R.id.account_label);
+        }
+
+        if (mFilter == null) {
+            mLabel.setText(R.string.contactsList);
+            mLabel.setVisibility(View.VISIBLE);
+            return;
+        }
+
+        if (!dropdown) {
+            if (mFilter.filterType == ContactListFilter.FILTER_TYPE_GROUP && mMultipleAccounts) {
+                mLabel.setVisibility(View.GONE);
+                mGroupView.setVisibility(View.VISIBLE);
+            } else {
+                mLabel.setVisibility(View.VISIBLE);
+                mGroupView.setVisibility(View.GONE);
+            }
+        }
+
+        switch (mFilter.filterType) {
+            case ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS: {
+                bindView(R.drawable.ic_contact_list_filter_all,
+                        R.string.list_filter_all_accounts);
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_STARRED: {
+                bindView(R.drawable.ic_contact_list_filter_starred,
+                        R.string.list_filter_all_starred);
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_CUSTOM: {
+                bindView(R.drawable.ic_contact_list_filter_custom,
+                        dropdown ? R.string.list_filter_customize : R.string.list_filter_custom);
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY: {
+                bindView(0, R.string.list_filter_phones);
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_ACCOUNT: {
+                if (mIcon != null) {
+                    mIcon.setVisibility(View.VISIBLE);
+                    if (mFilter.icon != null) {
+                        mIcon.setImageDrawable(mFilter.icon);
+                    } else {
+                        mIcon.setImageResource(R.drawable.unknown_source);
+                    }
+                }
+                mLabel.setText(mFilter.accountName);
+                mLabel.setVisibility(View.VISIBLE);
+                if (dropdown) {
+                    mIndentedLabel.setVisibility(View.GONE);
+                }
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_GROUP: {
+                if (mIcon != null) {
+                    mIcon.setVisibility(View.INVISIBLE);
+                }
+                if (dropdown) {
+                    if (mMultipleAccounts) {
+                        mLabel.setVisibility(View.GONE);
+                        mIndentedLabel.setText(mFilter.title);
+                        mIndentedLabel.setVisibility(View.VISIBLE);
+                    } else {
+                        mLabel.setText(mFilter.title);
+                        mLabel.setVisibility(View.VISIBLE);
+                        mIndentedLabel.setVisibility(View.GONE);
+                    }
+                } else {
+                    if (mMultipleAccounts) {
+                        mGroupLabel.setText(mFilter.title);
+                        mAccountLabel.setText(mFilter.accountName);
+                    } else {
+                        mLabel.setText(mFilter.title);
+                    }
+                }
+                break;
+            }
+        }
+    }
+
+    private void bindView(int iconResource, int textResource) {
+        if (mIcon != null) {
+            if (iconResource != 0) {
+                mIcon.setVisibility(View.VISIBLE);
+                mIcon.setImageResource(iconResource);
+            } else {
+                mIcon.setVisibility(View.INVISIBLE);
+            }
+        }
+
+        mLabel.setText(textResource);
+        mLabel.setVisibility(View.VISIBLE);
+
+        if (mIndentedLabel != null) {
+            mIndentedLabel.setVisibility(View.GONE);
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/ContactListItemView.java b/src/com/android/contacts/list/ContactListItemView.java
new file mode 100644
index 0000000..68560e4
--- /dev/null
+++ b/src/com/android/contacts/list/ContactListItemView.java
@@ -0,0 +1,975 @@
+/*
+ * 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 com.android.contacts.ContactPresenceIconUtil;
+import com.android.contacts.R;
+import com.android.contacts.widget.TextWithHighlighting;
+import com.android.contacts.widget.TextWithHighlightingFactory;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.database.CharArrayBuffer;
+import android.database.Cursor;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Nickname;
+import android.provider.ContactsContract.CommonDataKinds.Organization;
+import android.provider.ContactsContract.Contacts;
+import android.text.SpannableString;
+import android.text.TextUtils;
+import android.text.TextUtils.TruncateAt;
+import android.text.style.ForegroundColorSpan;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.ImageView.ScaleType;
+import android.widget.QuickContactBadge;
+import android.widget.TextView;
+
+/**
+ * A custom view for an item in the contact list.
+ */
+public class ContactListItemView extends ViewGroup {
+
+    private static final int QUICK_CONTACT_BADGE_STYLE =
+            com.android.internal.R.attr.quickContactBadgeStyleWindowMedium;
+
+    protected final Context mContext;
+
+    private final int mPreferredHeight;
+    private final int mVerticalDividerMargin;
+    private final int mPaddingTop;
+    private final int mPaddingRight;
+    private final int mPaddingBottom;
+    private final int mPaddingLeft;
+    private final int mGapBetweenImageAndText;
+    private final int mGapBetweenLabelAndData;
+    private final int mCallButtonPadding;
+    private final int mPresenceIconMargin;
+    private final int mHeaderTextWidth;
+    private final int mPrefixHightlightColor;
+
+    private Drawable mPressedBackgroundDrawable;
+    private Drawable mActivatedBackgroundDrawable;
+
+    private boolean mHorizontalDividerVisible = true;
+    private Drawable mHorizontalDividerDrawable;
+    private int mHorizontalDividerHeight;
+
+    private boolean mVerticalDividerVisible;
+    private Drawable mVerticalDividerDrawable;
+    private int mVerticalDividerWidth;
+
+    private boolean mHeaderVisible;
+    private Drawable mHeaderBackgroundDrawable;
+    private int mHeaderBackgroundHeight;
+    private TextView mHeaderTextView;
+
+    private boolean mQuickContactEnabled = true;
+    private QuickContactBadge mQuickContact;
+    private ImageView mPhotoView;
+    private TextView mNameTextView;
+    private TextView mPhoneticNameTextView;
+    private DontPressWithParentImageView mCallButton;
+    private TextView mLabelView;
+    private TextView mDataView;
+    private TextView mSnippetView;
+    private ImageView mPresenceIcon;
+
+    private char[] mHighlightedPrefix;
+
+    private int mDefaultPhotoViewSize;
+    private int mPhotoViewWidth;
+    private int mPhotoViewHeight;
+    private int mLine1Height;
+    private int mLine2Height;
+    private int mLine3Height;
+    private int mLine4Height;
+
+    private OnClickListener mCallButtonClickListener;
+    private TextWithHighlightingFactory mTextWithHighlightingFactory;
+    private CharArrayBuffer mNameBuffer = new CharArrayBuffer(128);
+    private CharArrayBuffer mDataBuffer = new CharArrayBuffer(128);
+    private CharArrayBuffer mHighlightedTextBuffer = new CharArrayBuffer(128);
+    private TextWithHighlighting mTextWithHighlighting;
+    private CharArrayBuffer mPhoneticNameBuffer = new CharArrayBuffer(128);
+
+    private CharSequence mUnknownNameText;
+
+    private boolean mActivatedStateSupported;
+
+    private ForegroundColorSpan mPrefixColorSpan;
+
+    /**
+     * Special class to allow the parent to be pressed without being pressed itself.
+     * This way the line of a tab can be pressed, but the image itself is not.
+     */
+    // TODO: understand this
+    private static class DontPressWithParentImageView extends ImageView {
+
+        public DontPressWithParentImageView(Context context, AttributeSet attrs) {
+            super(context, attrs);
+        }
+
+        @Override
+        public void setPressed(boolean pressed) {
+            // If the parent is pressed, do not set to pressed.
+            if (pressed && ((View) getParent()).isPressed()) {
+                return;
+            }
+            super.setPressed(pressed);
+        }
+    }
+
+    public ContactListItemView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        mContext = context;
+
+        // Obtain preferred item height from the current theme
+        TypedArray a = context.obtainStyledAttributes(null, com.android.internal.R.styleable.Theme);
+        mPreferredHeight =
+                a.getDimensionPixelSize(android.R.styleable.Theme_listPreferredItemHeight, 0);
+        a.recycle();
+
+        a = getContext().obtainStyledAttributes(attrs,R.styleable.ContactListItemView);
+        mPressedBackgroundDrawable = a.getDrawable(
+                R.styleable.ContactListItemView_pressedBackground);
+        mHeaderBackgroundDrawable = a.getDrawable(
+                R.styleable.ContactListItemView_section_header_background);
+        mHorizontalDividerDrawable = a.getDrawable(
+                R.styleable.ContactListItemView_list_item_divider);
+        mVerticalDividerMargin = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_vertical_divider_margin, 0);
+        mPaddingTop = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_padding_top, 0);
+        mPaddingBottom = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_padding_bottom, 0);
+        mPaddingLeft = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_padding_left, 0);
+        mPaddingRight = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_padding_right, 0);
+        mGapBetweenImageAndText = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_gap_between_image_and_text, 0);
+        mGapBetweenLabelAndData = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_gap_between_label_and_data, 0);
+        mCallButtonPadding = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_call_button_padding, 0);
+        mPresenceIconMargin = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_presence_icon_margin, 0);
+        mHeaderTextWidth = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_header_text_width, 0);
+        mDefaultPhotoViewSize = a.getDimensionPixelOffset(
+                R.styleable.ContactListItemView_list_item_photo_size, 0);
+        mPrefixHightlightColor = a.getColor(
+                R.styleable.ContactListItemView_list_item_prefix_highlight_color, Color.GREEN);
+
+        a.recycle();
+
+        mHeaderBackgroundHeight = mHeaderBackgroundDrawable.getIntrinsicHeight();
+        mHorizontalDividerHeight = mHorizontalDividerDrawable.getIntrinsicHeight();
+    }
+
+    /**
+     * Installs a call button listener.
+     */
+    public void setOnCallButtonClickListener(OnClickListener callButtonClickListener) {
+        mCallButtonClickListener = callButtonClickListener;
+    }
+
+    public void setTextWithHighlightingFactory(TextWithHighlightingFactory factory) {
+        mTextWithHighlightingFactory = factory;
+    }
+
+    public void setUnknownNameText(CharSequence unknownNameText) {
+        mUnknownNameText = unknownNameText;
+    }
+
+    public void setQuickContactEnabled(boolean flag) {
+        mQuickContactEnabled = flag;
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        // We will match parent's width and wrap content vertically, but make sure
+        // height is no less than listPreferredItemHeight.
+        int width = resolveSize(0, widthMeasureSpec);
+        int height = 0;
+
+        mLine1Height = 0;
+        mLine2Height = 0;
+        mLine3Height = 0;
+        mLine4Height = 0;
+
+        // Obtain the natural dimensions of the name text (we only care about height)
+        if (isVisible(mNameTextView)) {
+            mNameTextView.measure(0, 0);
+            mLine1Height = mNameTextView.getMeasuredHeight();
+        }
+
+        if (isVisible(mPhoneticNameTextView)) {
+            mPhoneticNameTextView.measure(0, 0);
+            mLine2Height = mPhoneticNameTextView.getMeasuredHeight();
+        }
+
+        if (isVisible(mLabelView)) {
+            mLabelView.measure(0, 0);
+            mLine3Height = mLabelView.getMeasuredHeight();
+        }
+
+        if (isVisible(mDataView)) {
+            mDataView.measure(0, 0);
+            mLine3Height = Math.max(mLine3Height, mDataView.getMeasuredHeight());
+        }
+
+        if (isVisible(mSnippetView)) {
+            mSnippetView.measure(0, 0);
+            mLine4Height = mSnippetView.getMeasuredHeight();
+        }
+
+        height += mLine1Height + mLine2Height + mLine3Height + mLine4Height
+                + mPaddingTop + mPaddingBottom;
+
+        if (isVisible(mCallButton)) {
+            mCallButton.measure(0, 0);
+        }
+        if (isVisible(mPresenceIcon)) {
+            mPresenceIcon.measure(0, 0);
+        }
+
+        ensurePhotoViewSize();
+
+        height = Math.max(height, mPhotoViewHeight + mPaddingBottom + mPaddingTop);
+
+        if (mHorizontalDividerVisible) {
+            height += mHorizontalDividerHeight;
+        }
+
+        height = Math.max(height, mPreferredHeight);
+
+        if (mHeaderVisible) {
+            mHeaderTextView.measure(
+                    MeasureSpec.makeMeasureSpec(mHeaderTextWidth, MeasureSpec.EXACTLY),
+                    MeasureSpec.makeMeasureSpec(mHeaderBackgroundHeight, MeasureSpec.EXACTLY));
+            height += mHeaderBackgroundHeight;
+        }
+
+        setMeasuredDimension(width, height);
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        int height = bottom - top;
+        int width = right - left;
+
+        // Determine the vertical bounds by laying out the header first.
+        int topBound = 0;
+        int bottomBound = height;
+
+        if (mHeaderVisible) {
+            mHeaderBackgroundDrawable.setBounds(
+                    0,
+                    0,
+                    width,
+                    mHeaderBackgroundHeight);
+            mHeaderTextView.layout(0, 0, width, mHeaderBackgroundHeight);
+            topBound += mHeaderBackgroundHeight;
+        }
+
+        if (mHorizontalDividerVisible) {
+            mHorizontalDividerDrawable.setBounds(
+                    0,
+                    height - mHorizontalDividerHeight,
+                    width,
+                    height);
+            bottomBound -= mHorizontalDividerHeight;
+        }
+
+        if (isActivated()) {
+            ensureActivatedBackgroundDrawable();
+            mActivatedBackgroundDrawable.setBounds(0, topBound, width, bottomBound);
+        }
+
+        if (mPressedBackgroundDrawable != null) {
+            mPressedBackgroundDrawable.setBounds(0, topBound, width, bottomBound);
+        }
+
+        topBound += mPaddingTop;
+        bottomBound -= mPaddingBottom;
+
+        // Positions of views on the left are fixed and so are those on the right side.
+        // The stretchable part of the layout is in the middle.  So, we will start off
+        // by laying out the left and right sides. Then we will allocate the remainder
+        // to the text fields in the middle.
+
+        int leftBound = layoutLeftSide(height, topBound, bottomBound, mPaddingLeft);
+        int rightBound = layoutRightSide(height, topBound, right);
+
+        // Text lines, centered vertically
+        rightBound -= mPaddingRight;
+
+        // Center text vertically
+        int totalTextHeight = mLine1Height + mLine2Height + mLine3Height + mLine4Height;
+        int textTopBound = (bottomBound + topBound - totalTextHeight) / 2;
+
+        if (isVisible(mNameTextView)) {
+            mNameTextView.layout(leftBound,
+                    textTopBound,
+                    rightBound,
+                    textTopBound + mLine1Height);
+        }
+
+        int dataLeftBound = leftBound;
+        if (isVisible(mPhoneticNameTextView)) {
+            mPhoneticNameTextView.layout(leftBound,
+                    textTopBound + mLine1Height,
+                    rightBound,
+                    textTopBound + mLine1Height + mLine2Height);
+        }
+
+        if (isVisible(mLabelView)) {
+            dataLeftBound = leftBound + mLabelView.getMeasuredWidth();
+            mLabelView.layout(leftBound,
+                    textTopBound + mLine1Height + mLine2Height,
+                    dataLeftBound,
+                    textTopBound + mLine1Height + mLine2Height + mLine3Height);
+            dataLeftBound += mGapBetweenLabelAndData;
+        }
+
+        if (isVisible(mDataView)) {
+            mDataView.layout(dataLeftBound,
+                    textTopBound + mLine1Height + mLine2Height,
+                    rightBound,
+                    textTopBound + mLine1Height + mLine2Height + mLine3Height);
+        }
+
+        if (isVisible(mSnippetView)) {
+            mSnippetView.layout(leftBound,
+                    textTopBound + mLine1Height + mLine2Height + mLine3Height,
+                    rightBound,
+                    textTopBound + mLine1Height + mLine2Height + mLine3Height + mLine4Height);
+        }
+    }
+
+    /**
+     * Performs layout of the left side of the view
+     *
+     * @return new left boundary
+     */
+    protected int layoutLeftSide(int height, int topBound, int bottomBound, int leftBound) {
+        View photoView = mQuickContact != null ? mQuickContact : mPhotoView;
+        if (photoView != null) {
+            // Center the photo vertically
+            int photoTop = topBound + (bottomBound - topBound - mPhotoViewHeight) / 2;
+            photoView.layout(
+                    leftBound,
+                    photoTop,
+                    leftBound + mPhotoViewWidth,
+                    photoTop + mPhotoViewHeight);
+            leftBound += mPhotoViewWidth + mGapBetweenImageAndText;
+        }
+        return leftBound;
+    }
+
+    /**
+     * Performs layout of the right side of the view
+     *
+     * @return new right boundary
+     */
+    protected int layoutRightSide(int height, int topBound, int rightBound) {
+        if (isVisible(mCallButton)) {
+            int buttonWidth = mCallButton.getMeasuredWidth();
+            rightBound -= buttonWidth;
+            mCallButton.layout(
+                    rightBound,
+                    topBound,
+                    rightBound + buttonWidth,
+                    height - mHorizontalDividerHeight);
+            mVerticalDividerVisible = true;
+            ensureVerticalDivider();
+            rightBound -= mVerticalDividerWidth;
+            mVerticalDividerDrawable.setBounds(
+                    rightBound,
+                    topBound + mVerticalDividerMargin,
+                    rightBound + mVerticalDividerWidth,
+                    height - mVerticalDividerMargin);
+        } else {
+            mVerticalDividerVisible = false;
+        }
+
+        if (isVisible(mPresenceIcon)) {
+            int iconWidth = mPresenceIcon.getMeasuredWidth();
+            rightBound -= mPresenceIconMargin + iconWidth;
+            mPresenceIcon.layout(
+                    rightBound,
+                    topBound,
+                    rightBound + iconWidth,
+                    height);
+        }
+        return rightBound;
+    }
+
+    protected boolean isVisible(View view) {
+        return view != null && view.getVisibility() == View.VISIBLE;
+    }
+
+    /**
+     * Loads the drawable for the item background used when the item is checked.
+     */
+    private void ensureActivatedBackgroundDrawable() {
+        if (mActivatedBackgroundDrawable == null) {
+            mActivatedBackgroundDrawable = mContext.getResources().getDrawable(
+                    R.drawable.list_item_activated_bg);
+            mActivatedBackgroundDrawable.setBounds(0, 0, getWidth(), getHeight());
+        }
+    }
+
+    /**
+     * Loads the drawable for the vertical divider if it has not yet been loaded.
+     */
+    private void ensureVerticalDivider() {
+        if (mVerticalDividerDrawable == null) {
+            mVerticalDividerDrawable = mContext.getResources().getDrawable(
+                    R.drawable.divider_vertical_dark);
+            mVerticalDividerWidth = mVerticalDividerDrawable.getIntrinsicWidth();
+        }
+    }
+
+    /**
+     * Extracts width and height from the style
+     */
+    private void ensurePhotoViewSize() {
+        if (mPhotoViewWidth == 0 && mPhotoViewHeight == 0) {
+            if (mQuickContactEnabled) {
+                TypedArray a = mContext.obtainStyledAttributes(null,
+                        com.android.internal.R.styleable.ViewGroup_Layout,
+                        QUICK_CONTACT_BADGE_STYLE, 0);
+                mPhotoViewWidth = a.getLayoutDimension(
+                        android.R.styleable.ViewGroup_Layout_layout_width,
+                        ViewGroup.LayoutParams.WRAP_CONTENT);
+                mPhotoViewHeight = a.getLayoutDimension(
+                        android.R.styleable.ViewGroup_Layout_layout_height,
+                        ViewGroup.LayoutParams.WRAP_CONTENT);
+                a.recycle();
+            } else {
+                mPhotoViewWidth = mPhotoViewHeight = mDefaultPhotoViewSize;
+            }
+        }
+    }
+
+    @Override
+    protected void drawableStateChanged() {
+        super.drawableStateChanged();
+        if (mPressedBackgroundDrawable != null) {
+            mPressedBackgroundDrawable.setState(getDrawableState());
+            invalidate();
+        }
+    }
+
+    @Override
+    public void dispatchDraw(Canvas canvas) {
+        if (isPressed() && mPressedBackgroundDrawable != null) {
+            mPressedBackgroundDrawable.draw(canvas);
+        } else if (isActivated()) {
+            mActivatedBackgroundDrawable.draw(canvas);
+        }
+        if (mHeaderVisible) {
+            mHeaderBackgroundDrawable.draw(canvas);
+        }
+        if (mHorizontalDividerVisible) {
+            mHorizontalDividerDrawable.draw(canvas);
+        }
+        if (mVerticalDividerVisible) {
+            mVerticalDividerDrawable.draw(canvas);
+        }
+        super.dispatchDraw(canvas);
+    }
+
+    /**
+     * Sets the flag that determines whether a divider should drawn at the bottom
+     * of the view.
+     */
+    public void setDividerVisible(boolean visible) {
+        mHorizontalDividerVisible = visible;
+    }
+
+    /**
+     * Sets section header or makes it invisible if the title is null.
+     */
+    public void setSectionHeader(String title) {
+        if (!TextUtils.isEmpty(title)) {
+            if (mHeaderTextView == null) {
+                mHeaderTextView = new TextView(mContext);
+                mHeaderTextView.setTypeface(mHeaderTextView.getTypeface(), Typeface.BOLD);
+                mHeaderTextView.setTextColor(mContext.getResources()
+                        .getColor(R.color.section_header_text_color));
+                mHeaderTextView.setTextSize(14);
+                mHeaderTextView.setGravity(Gravity.CENTER);
+                addView(mHeaderTextView);
+            }
+            mHeaderTextView.setText(title);
+            mHeaderTextView.setVisibility(View.VISIBLE);
+            mHeaderVisible = true;
+        } else {
+            if (mHeaderTextView != null) {
+                mHeaderTextView.setVisibility(View.GONE);
+            }
+            mHeaderVisible = false;
+        }
+    }
+
+    /**
+     * Returns the quick contact badge, creating it if necessary.
+     */
+    public QuickContactBadge getQuickContact() {
+        if (!mQuickContactEnabled) {
+            throw new IllegalStateException("QuickContact is disabled for this view");
+        }
+        if (mQuickContact == null) {
+            mQuickContact = new QuickContactBadge(mContext, null, QUICK_CONTACT_BADGE_STYLE);
+            mQuickContact.setExcludeMimes(new String[] { Contacts.CONTENT_ITEM_TYPE });
+            addView(mQuickContact);
+        }
+        return mQuickContact;
+    }
+
+    /**
+     * Returns the photo view, creating it if necessary.
+     */
+    public ImageView getPhotoView() {
+        if (mPhotoView == null) {
+            if (mQuickContactEnabled) {
+                mPhotoView = new ImageView(mContext, null, QUICK_CONTACT_BADGE_STYLE);
+            } else {
+                mPhotoView = new ImageView(mContext);
+            }
+            // Quick contact style used above will set a background - remove it
+            mPhotoView.setBackgroundDrawable(null);
+            addView(mPhotoView);
+        }
+        return mPhotoView;
+    }
+
+    /**
+     * Removes the photo view.  Should not be needed once we start handling different
+     * types of views as different types of views from the List's perspective.
+     */
+    public void removePhotoView() {
+        if (mPhotoView != null) {
+            removeView(mPhotoView);
+            mPhotoView = null;
+        }
+        if (mQuickContact != null) {
+            removeView(mQuickContact);
+            mQuickContact = null;
+        }
+    }
+
+    /**
+     * Sets a word prefix that will be highlighted if encountered in fields like
+     * name and search snippet.
+     * <p>
+     * NOTE: must be all upper-case
+     */
+    public void setHighlightedPrefix(char[] upperCasePrefix) {
+        mHighlightedPrefix = upperCasePrefix;
+    }
+
+    /**
+     * Returns the text view for the contact name, creating it if necessary.
+     */
+    public TextView getNameTextView() {
+        if (mNameTextView == null) {
+            mNameTextView = new TextView(mContext);
+            mNameTextView.setSingleLine(true);
+            mNameTextView.setEllipsize(getTextEllipsis());
+            mNameTextView.setTextAppearance(mContext, android.R.style.TextAppearance_Large);
+            mNameTextView.setGravity(Gravity.CENTER_VERTICAL);
+            addView(mNameTextView);
+        }
+        return mNameTextView;
+    }
+
+    /**
+     * Adds a call button using the supplied arguments as an id and tag.
+     */
+    public void showCallButton(int id, int tag) {
+        if (mCallButton == null) {
+            mCallButton = new DontPressWithParentImageView(mContext, null);
+            mCallButton.setId(id);
+            mCallButton.setOnClickListener(mCallButtonClickListener);
+            mCallButton.setBackgroundResource(R.drawable.call_background);
+            mCallButton.setImageResource(android.R.drawable.sym_action_call);
+            mCallButton.setPadding(mCallButtonPadding, 0, mCallButtonPadding, 0);
+            mCallButton.setScaleType(ScaleType.CENTER);
+            addView(mCallButton);
+        }
+
+        mCallButton.setTag(tag);
+        mCallButton.setVisibility(View.VISIBLE);
+    }
+
+    public void hideCallButton() {
+        if (mCallButton != null) {
+            mCallButton.setVisibility(View.GONE);
+        }
+    }
+
+    /**
+     * Adds or updates a text view for the phonetic name.
+     */
+    public void setPhoneticName(char[] text, int size) {
+        if (text == null || size == 0) {
+            if (mPhoneticNameTextView != null) {
+                mPhoneticNameTextView.setVisibility(View.GONE);
+            }
+        } else {
+            getPhoneticNameTextView();
+            mPhoneticNameTextView.setText(text, 0, size);
+            mPhoneticNameTextView.setVisibility(VISIBLE);
+        }
+    }
+
+    /**
+     * Returns the text view for the phonetic name, creating it if necessary.
+     */
+    public TextView getPhoneticNameTextView() {
+        if (mPhoneticNameTextView == null) {
+            mPhoneticNameTextView = new TextView(mContext);
+            mPhoneticNameTextView.setSingleLine(true);
+            mPhoneticNameTextView.setEllipsize(getTextEllipsis());
+            mPhoneticNameTextView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
+            mPhoneticNameTextView.setTypeface(mPhoneticNameTextView.getTypeface(), Typeface.BOLD);
+            addView(mPhoneticNameTextView);
+        }
+        return mPhoneticNameTextView;
+    }
+
+    /**
+     * Adds or updates a text view for the data label.
+     */
+    public void setLabel(CharSequence text) {
+        if (TextUtils.isEmpty(text)) {
+            if (mLabelView != null) {
+                mLabelView.setVisibility(View.GONE);
+            }
+        } else {
+            getLabelView();
+            mLabelView.setText(text);
+            mLabelView.setVisibility(VISIBLE);
+        }
+    }
+
+    /**
+     * Adds or updates a text view for the data label.
+     */
+    public void setLabel(char[] text, int size) {
+        if (text == null || size == 0) {
+            if (mLabelView != null) {
+                mLabelView.setVisibility(View.GONE);
+            }
+        } else {
+            getLabelView();
+            mLabelView.setText(text, 0, size);
+            mLabelView.setVisibility(VISIBLE);
+        }
+    }
+
+    /**
+     * Returns the text view for the data label, creating it if necessary.
+     */
+    public TextView getLabelView() {
+        if (mLabelView == null) {
+            mLabelView = new TextView(mContext);
+            mLabelView.setSingleLine(true);
+            mLabelView.setEllipsize(getTextEllipsis());
+            mLabelView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
+            mLabelView.setTypeface(mLabelView.getTypeface(), Typeface.BOLD);
+            addView(mLabelView);
+        }
+        return mLabelView;
+    }
+
+    /**
+     * Adds or updates a text view for the data element.
+     */
+    public void setData(char[] text, int size) {
+        if (text == null || size == 0) {
+            if (mDataView != null) {
+                mDataView.setVisibility(View.GONE);
+            }
+            return;
+        } else {
+            getDataView();
+            mDataView.setText(text, 0, size);
+            mDataView.setVisibility(VISIBLE);
+        }
+    }
+
+    /**
+     * Returns the text view for the data text, creating it if necessary.
+     */
+    public TextView getDataView() {
+        if (mDataView == null) {
+            mDataView = new TextView(mContext);
+            mDataView.setSingleLine(true);
+            mDataView.setEllipsize(getTextEllipsis());
+            mDataView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
+            addView(mDataView);
+        }
+        return mDataView;
+    }
+
+    /**
+     * Adds or updates a text view for the search snippet.
+     */
+    public void setSnippet(String text) {
+        if (TextUtils.isEmpty(text)) {
+            if (mSnippetView != null) {
+                mSnippetView.setVisibility(View.GONE);
+            }
+        } else {
+            getSnippetView();
+            setTextWithPrefixHighlighting(mSnippetView, text);
+            mSnippetView.setVisibility(VISIBLE);
+        }
+    }
+
+    /**
+     * Returns the text view for the search snippet, creating it if necessary.
+     */
+    public TextView getSnippetView() {
+        if (mSnippetView == null) {
+            mSnippetView = new TextView(mContext);
+            mSnippetView.setSingleLine(true);
+            mSnippetView.setEllipsize(getTextEllipsis());
+            mSnippetView.setTextAppearance(mContext, android.R.style.TextAppearance_Small);
+            mSnippetView.setTypeface(mSnippetView.getTypeface(), Typeface.BOLD);
+            addView(mSnippetView);
+        }
+        return mSnippetView;
+    }
+
+    /**
+     * Adds or updates the presence icon view.
+     */
+    public void setPresence(Drawable icon) {
+        if (icon != null) {
+            if (mPresenceIcon == null) {
+                mPresenceIcon = new ImageView(mContext);
+                addView(mPresenceIcon);
+            }
+            mPresenceIcon.setImageDrawable(icon);
+            mPresenceIcon.setScaleType(ScaleType.CENTER);
+            mPresenceIcon.setVisibility(View.VISIBLE);
+        } else {
+            if (mPresenceIcon != null) {
+                mPresenceIcon.setVisibility(View.GONE);
+            }
+        }
+    }
+
+    private TruncateAt getTextEllipsis() {
+        return mActivatedStateSupported ? TruncateAt.START : TruncateAt.MARQUEE;
+    }
+
+    public void showDisplayName(Cursor cursor, int nameColumnIndex, boolean highlightingEnabled,
+            int alternativeNameColumnIndex) {
+        cursor.copyStringToBuffer(nameColumnIndex, mNameBuffer);
+        TextView nameView = getNameTextView();
+        int size = mNameBuffer.sizeCopied;
+        if (size != 0) {
+            if (mHighlightedPrefix != null) {
+                setTextWithPrefixHighlighting(nameView, mNameBuffer);
+            } else if (highlightingEnabled) {
+                if (mTextWithHighlighting == null) {
+                    mTextWithHighlighting =
+                            mTextWithHighlightingFactory.createTextWithHighlighting();
+                }
+                cursor.copyStringToBuffer(alternativeNameColumnIndex, mHighlightedTextBuffer);
+                mTextWithHighlighting.setText(mNameBuffer, mHighlightedTextBuffer);
+                nameView.setText(mTextWithHighlighting);
+            } else {
+                nameView.setText(mNameBuffer.data, 0, size);
+            }
+        } else {
+            nameView.setText(mUnknownNameText);
+        }
+    }
+
+    public void showPhoneticName(Cursor cursor, int phoneticNameColumnIndex) {
+        cursor.copyStringToBuffer(phoneticNameColumnIndex, mPhoneticNameBuffer);
+        int phoneticNameSize = mPhoneticNameBuffer.sizeCopied;
+        if (phoneticNameSize != 0) {
+            setPhoneticName(mPhoneticNameBuffer.data, phoneticNameSize);
+        } else {
+            setPhoneticName(null, 0);
+        }
+    }
+
+    /**
+     * Sets the proper icon (star or presence or nothing)
+     */
+    public void showPresence(Cursor cursor, int presenceColumnIndex) {
+        int serverStatus;
+        if (!cursor.isNull(presenceColumnIndex)) {
+            serverStatus = cursor.getInt(presenceColumnIndex);
+
+            // TODO consider caching these drawables
+            Drawable icon = ContactPresenceIconUtil.getPresenceIcon(getContext(), serverStatus);
+            if (icon != null) {
+                setPresence(icon);
+            } else {
+                setPresence(null);
+            }
+        } else {
+            setPresence(null);
+        }
+    }
+
+    /**
+     * Shows search snippet.
+     */
+    public void showSnippet(Cursor cursor, int summarySnippetMimetypeColumnIndex,
+            int summarySnippetData1ColumnIndex, int summarySnippetData4ColumnIndex) {
+        String snippet = null;
+        String snippetMimeType = cursor.getString(summarySnippetMimetypeColumnIndex);
+        if (Email.CONTENT_ITEM_TYPE.equals(snippetMimeType)) {
+            String email = cursor.getString(summarySnippetData1ColumnIndex);
+            if (!TextUtils.isEmpty(email)) {
+                snippet = email;
+            }
+        } else if (Organization.CONTENT_ITEM_TYPE.equals(snippetMimeType)) {
+            String company = cursor.getString(summarySnippetData1ColumnIndex);
+            String title = cursor.getString(summarySnippetData4ColumnIndex);
+            if (!TextUtils.isEmpty(company)) {
+                if (!TextUtils.isEmpty(title)) {
+                    snippet = company + " / " + title;
+                } else {
+                    snippet = company;
+                }
+            } else if (!TextUtils.isEmpty(title)) {
+                snippet = title;
+            }
+        } else if (Nickname.CONTENT_ITEM_TYPE.equals(snippetMimeType)) {
+            String nickname = cursor.getString(summarySnippetData1ColumnIndex);
+            if (!TextUtils.isEmpty(nickname)) {
+                snippet = nickname;
+            }
+        }
+
+        setSnippet(snippet);
+    }
+
+    /**
+     * Shows data element (e.g. phone number).
+     */
+    public void showData(Cursor cursor, int dataColumnIndex) {
+        cursor.copyStringToBuffer(dataColumnIndex, mDataBuffer);
+        setData(mDataBuffer.data, mDataBuffer.sizeCopied);
+    }
+
+    public void setActivatedStateSupported(boolean flag) {
+        this.mActivatedStateSupported = flag;
+    }
+
+    /**
+     * Sets text on the given text view, highlighting the word that matches
+     * the given prefix (see {@link #setHighlightedPrefix}).
+     */
+    private void setTextWithPrefixHighlighting(TextView textView, String text) {
+        mHighlightedTextBuffer.sizeCopied =
+                Math.min(text.length(), mHighlightedTextBuffer.data.length);
+        text.getChars(0, mHighlightedTextBuffer.sizeCopied, mHighlightedTextBuffer.data, 0);
+        setTextWithPrefixHighlighting(textView, mHighlightedTextBuffer);
+    }
+
+    /**
+     * Sets text on the given text view, highlighting the word that matches
+     * the given prefix (see {@link #setHighlightedPrefix}).
+     */
+    private void setTextWithPrefixHighlighting(TextView textView, CharArrayBuffer text) {
+        int index = indexOfWordPrefix(text, mHighlightedPrefix);
+        if (index != -1) {
+            if (mPrefixColorSpan == null) {
+                mPrefixColorSpan = new ForegroundColorSpan(mPrefixHightlightColor);
+            }
+
+            String string = new String(text.data, 0, text.sizeCopied);
+            SpannableString name = new SpannableString(string);
+            name.setSpan(mPrefixColorSpan, index, index + mHighlightedPrefix.length, 0 /* flags */);
+            textView.setText(name);
+        } else {
+            textView.setText(text.data, 0, text.sizeCopied);
+        }
+    }
+
+    /**
+     * Finds the index of the word that starts with the given prefix.  If not found,
+     * returns -1.
+     */
+    private int indexOfWordPrefix(CharArrayBuffer buffer, char[] prefix) {
+        char[] string1 = buffer.data;
+        int count1 = buffer.sizeCopied;
+        int count2 = prefix.length;
+
+        int size = count2;
+        int i = 0;
+        while (i < count1) {
+
+            // Skip non-word characters
+            while (i < count1 && !Character.isLetterOrDigit(string1[i])) {
+                i++;
+            }
+
+            if (i + size > count1) {
+                return -1;
+            }
+
+            // Compare the prefixes
+            int j;
+            for (j = 0; j < size; j++) {
+                if (Character.toUpperCase(string1[i+j]) != prefix[j]) {
+                    break;
+                }
+            }
+            if (j == size) {
+                return i;
+            }
+
+            // Skip this word
+            while (i < count1 && Character.isLetterOrDigit(string1[i])) {
+                i++;
+            }
+        }
+
+        return -1;
+    }
+
+    @Override
+    public void requestLayout() {
+        // We will assume that once measured this will not need to resize
+        // itself, so there is no need to pass the layout request to the parent
+        // view (ListView).
+        forceLayout();
+    }
+}
diff --git a/src/com/android/contacts/list/ContactNameHighlightingAnimation.java b/src/com/android/contacts/list/ContactNameHighlightingAnimation.java
new file mode 100644
index 0000000..05881ce
--- /dev/null
+++ b/src/com/android/contacts/list/ContactNameHighlightingAnimation.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2007 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 com.android.contacts.widget.TextHighlightingAnimation;
+
+import android.view.View;
+import android.widget.ListView;
+
+/**
+ * A {@link TextHighlightingAnimation} that redraws just the contact display name in a
+ * list item.
+ */
+public class ContactNameHighlightingAnimation extends TextHighlightingAnimation {
+    private final ListView mListView;
+    private boolean mSavedScrollingCacheEnabledFlag;
+
+    public ContactNameHighlightingAnimation(ListView listView, int duration) {
+        super(duration);
+        this.mListView = listView;
+    }
+
+    /**
+     * Redraws all visible items of the list corresponding to contacts
+     */
+    @Override
+    protected void invalidate() {
+        int childCount = mListView.getChildCount();
+        for (int i = 0; i < childCount; i++) {
+            View itemView = mListView.getChildAt(i);
+            if (itemView instanceof ContactListItemView) {
+                final ContactListItemView view = (ContactListItemView)itemView;
+                view.getNameTextView().invalidate();
+            }
+        }
+    }
+
+    @Override
+    protected void onAnimationStarted() {
+        mSavedScrollingCacheEnabledFlag = mListView.isScrollingCacheEnabled();
+        mListView.setScrollingCacheEnabled(false);
+    }
+
+    @Override
+    protected void onAnimationEnded() {
+        mListView.setScrollingCacheEnabled(mSavedScrollingCacheEnabledFlag);
+    }
+}
diff --git a/src/com/android/contacts/list/ContactPhotoLoader.java b/src/com/android/contacts/list/ContactPhotoLoader.java
new file mode 100644
index 0000000..83e9131
--- /dev/null
+++ b/src/com/android/contacts/list/ContactPhotoLoader.java
@@ -0,0 +1,479 @@
+/*
+ * 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 com.google.android.collect.Lists;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Handler.Callback;
+import android.os.HandlerThread;
+import android.os.Message;
+import android.provider.ContactsContract.Contacts.Photo;
+import android.provider.ContactsContract.Data;
+import android.util.Log;
+import android.widget.ImageView;
+
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Asynchronously loads contact photos and maintains cache of photos.  The class is
+ * mostly single-threaded.  The only two methods accessed by the loader thread are
+ * {@link #cacheBitmap} and {@link #obtainPhotoIdsAndUrisToLoad}. Those methods access concurrent
+ * hash maps shared with the main thread.
+ */
+public class ContactPhotoLoader implements Callback {
+    private static final String TAG = "ContactPhotoLoader";
+    private static final String LOADER_THREAD_NAME = "ContactPhotoLoader";
+
+    /**
+     * Type of message sent by the UI thread to itself to indicate that some photos
+     * need to be loaded.
+     */
+    private static final int MESSAGE_REQUEST_LOADING = 1;
+
+    /**
+     * Type of message sent by the loader thread to indicate that some photos have
+     * been loaded.
+     */
+    private static final int MESSAGE_PHOTOS_LOADED = 2;
+
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+    private final String[] COLUMNS = new String[] { Photo._ID, Photo.PHOTO };
+
+    /**
+     * The resource ID of the image to be used when the photo is unavailable or being
+     * loaded.
+     */
+    private final int mDefaultResourceId;
+
+    /**
+     * Maintains the state of a particular photo.
+     */
+    private static class BitmapHolder {
+        private static final int NEEDED = 0;
+        private static final int LOADING = 1;
+        private static final int LOADED = 2;
+
+        int state;
+        SoftReference<Bitmap> bitmapRef;
+    }
+
+    /**
+     * A soft cache for photos.
+     */
+    private final ConcurrentHashMap<Object, BitmapHolder> mBitmapCache =
+            new ConcurrentHashMap<Object, BitmapHolder>();
+
+    /**
+     * A map from ImageView to the corresponding photo ID. Please note that this
+     * photo ID may change before the photo loading request is started.
+     */
+    private final ConcurrentHashMap<ImageView, Object> mPendingRequests =
+            new ConcurrentHashMap<ImageView, Object>();
+
+    /**
+     * Handler for messages sent to the UI thread.
+     */
+    private final Handler mMainThreadHandler = new Handler(this);
+
+    /**
+     * Thread responsible for loading photos from the database. Created upon
+     * the first request.
+     */
+    private LoaderThread mLoaderThread;
+
+    /**
+     * A gate to make sure we only send one instance of MESSAGE_PHOTOS_NEEDED at a time.
+     */
+    private boolean mLoadingRequested;
+
+    /**
+     * Flag indicating if the image loading is paused.
+     */
+    private boolean mPaused;
+
+    private final Context mContext;
+
+    /**
+     * Constructor.
+     *
+     * @param context content context
+     * @param defaultResourceId the image resource ID to be used when there is
+     *            no photo for a contact
+     */
+    public ContactPhotoLoader(Context context, int defaultResourceId) {
+        mDefaultResourceId = defaultResourceId;
+        mContext = context;
+    }
+
+    /**
+     * Load photo into the supplied image view.  If the photo is already cached,
+     * it is displayed immediately.  Otherwise a request is sent to load the photo
+     * from the database.
+     */
+    public void loadPhoto(ImageView view, long photoId) {
+        if (photoId == 0) {
+            // No photo is needed
+            view.setImageResource(mDefaultResourceId);
+            mPendingRequests.remove(view);
+        } else {
+            loadPhotoByIdOrUri(view, photoId);
+        }
+    }
+
+    /**
+     * Load photo into the supplied image view.  If the photo is already cached,
+     * it is displayed immediately.  Otherwise a request is sent to load the photo
+     * from the location specified by the URI.
+     */
+    public void loadPhoto(ImageView view, Uri photoUri) {
+        if (photoUri == null) {
+            // No photo is needed
+            view.setImageResource(mDefaultResourceId);
+            mPendingRequests.remove(view);
+        } else {
+            loadPhotoByIdOrUri(view, photoUri);
+        }
+    }
+
+    private void loadPhotoByIdOrUri(ImageView view, Object key) {
+        boolean loaded = loadCachedPhoto(view, key);
+        if (loaded) {
+            mPendingRequests.remove(view);
+        } else {
+            mPendingRequests.put(view, key);
+            if (!mPaused) {
+                // Send a request to start loading photos
+                requestLoading();
+            }
+        }
+    }
+
+    /**
+     * Checks if the photo is present in cache.  If so, sets the photo on the view,
+     * otherwise sets the state of the photo to {@link BitmapHolder#NEEDED} and
+     * temporarily set the image to the default resource ID.
+     */
+    private boolean loadCachedPhoto(ImageView view, Object key) {
+        BitmapHolder holder = mBitmapCache.get(key);
+        if (holder == null) {
+            holder = new BitmapHolder();
+            mBitmapCache.put(key, holder);
+        } else if (holder.state == BitmapHolder.LOADED) {
+            // Null bitmap reference means that database contains no bytes for the photo
+            if (holder.bitmapRef == null) {
+                view.setImageResource(mDefaultResourceId);
+                return true;
+            }
+
+            Bitmap bitmap = holder.bitmapRef.get();
+            if (bitmap != null) {
+                view.setImageBitmap(bitmap);
+                return true;
+            }
+
+            // Null bitmap means that the soft reference was released by the GC
+            // and we need to reload the photo.
+            holder.bitmapRef = null;
+        }
+
+        // The bitmap has not been loaded - should display the placeholder image.
+        view.setImageResource(mDefaultResourceId);
+        holder.state = BitmapHolder.NEEDED;
+        return false;
+    }
+
+    /**
+     * Stops loading images, kills the image loader thread and clears all caches.
+     */
+    public void stop() {
+        pause();
+
+        if (mLoaderThread != null) {
+            mLoaderThread.quit();
+            mLoaderThread = null;
+        }
+
+        mPendingRequests.clear();
+        mBitmapCache.clear();
+    }
+
+    public void clear() {
+        mPendingRequests.clear();
+        mBitmapCache.clear();
+    }
+
+    /**
+     * Temporarily stops loading photos from the database.
+     */
+    public void pause() {
+        mPaused = true;
+    }
+
+    /**
+     * Resumes loading photos from the database.
+     */
+    public void resume() {
+        mPaused = false;
+        if (!mPendingRequests.isEmpty()) {
+            requestLoading();
+        }
+    }
+
+    /**
+     * Sends a message to this thread itself to start loading images.  If the current
+     * view contains multiple image views, all of those image views will get a chance
+     * to request their respective photos before any of those requests are executed.
+     * This allows us to load images in bulk.
+     */
+    private void requestLoading() {
+        if (!mLoadingRequested) {
+            mLoadingRequested = true;
+            mMainThreadHandler.sendEmptyMessage(MESSAGE_REQUEST_LOADING);
+        }
+    }
+
+    /**
+     * Processes requests on the main thread.
+     */
+    public boolean handleMessage(Message msg) {
+        switch (msg.what) {
+            case MESSAGE_REQUEST_LOADING: {
+                mLoadingRequested = false;
+                if (!mPaused) {
+                    if (mLoaderThread == null) {
+                        mLoaderThread = new LoaderThread(mContext.getContentResolver());
+                        mLoaderThread.start();
+                    }
+
+                    mLoaderThread.requestLoading();
+                }
+                return true;
+            }
+
+            case MESSAGE_PHOTOS_LOADED: {
+                if (!mPaused) {
+                    processLoadedImages();
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Goes over pending loading requests and displays loaded photos.  If some of the
+     * photos still haven't been loaded, sends another request for image loading.
+     */
+    private void processLoadedImages() {
+        Iterator<ImageView> iterator = mPendingRequests.keySet().iterator();
+        while (iterator.hasNext()) {
+            ImageView view = iterator.next();
+            Object key = mPendingRequests.get(view);
+            boolean loaded = loadCachedPhoto(view, key);
+            if (loaded) {
+                iterator.remove();
+            }
+        }
+
+        if (!mPendingRequests.isEmpty()) {
+            requestLoading();
+        }
+    }
+
+    /**
+     * Stores the supplied bitmap in cache.
+     */
+    private void cacheBitmap(Object key, byte[] bytes) {
+        if (mPaused) {
+            return;
+        }
+
+        BitmapHolder holder = new BitmapHolder();
+        holder.state = BitmapHolder.LOADED;
+        if (bytes != null) {
+            try {
+                Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, null);
+                holder.bitmapRef = new SoftReference<Bitmap>(bitmap);
+            } catch (OutOfMemoryError e) {
+                // Do nothing - the photo will appear to be missing
+            }
+        }
+        mBitmapCache.put(key, holder);
+    }
+
+    /**
+     * Populates an array of photo IDs that need to be loaded.
+     */
+    private void obtainPhotoIdsAndUrisToLoad(ArrayList<Long> photoIds,
+            ArrayList<String> photoIdsAsStrings, ArrayList<Uri> uris) {
+        photoIds.clear();
+        photoIdsAsStrings.clear();
+        uris.clear();
+
+        /*
+         * Since the call is made from the loader thread, the map could be
+         * changing during the iteration. That's not really a problem:
+         * ConcurrentHashMap will allow those changes to happen without throwing
+         * exceptions. Since we may miss some requests in the situation of
+         * concurrent change, we will need to check the map again once loading
+         * is complete.
+         */
+        Iterator<Object> iterator = mPendingRequests.values().iterator();
+        while (iterator.hasNext()) {
+            Object key = iterator.next();
+            BitmapHolder holder = mBitmapCache.get(key);
+            if (holder != null && holder.state == BitmapHolder.NEEDED) {
+                // Assuming atomic behavior
+                holder.state = BitmapHolder.LOADING;
+                if (key instanceof Long) {
+                    photoIds.add((Long)key);
+                    photoIdsAsStrings.add(key.toString());
+                } else {
+                    uris.add((Uri)key);
+                }
+            }
+        }
+    }
+
+    /**
+     * The thread that performs loading of photos from the database.
+     */
+    private class LoaderThread extends HandlerThread implements Callback {
+        private static final int BUFFER_SIZE = 1024*16;
+
+        private final ContentResolver mResolver;
+        private final StringBuilder mStringBuilder = new StringBuilder();
+        private final ArrayList<Long> mPhotoIds = Lists.newArrayList();
+        private final ArrayList<String> mPhotoIdsAsStrings = Lists.newArrayList();
+        private final ArrayList<Uri> mPhotoUris = Lists.newArrayList();
+        private Handler mLoaderThreadHandler;
+        private byte mBuffer[];
+
+        public LoaderThread(ContentResolver resolver) {
+            super(LOADER_THREAD_NAME);
+            mResolver = resolver;
+        }
+
+        /**
+         * Sends a message to this thread to load requested photos.
+         */
+        public void requestLoading() {
+            if (mLoaderThreadHandler == null) {
+                mLoaderThreadHandler = new Handler(getLooper(), this);
+            }
+            mLoaderThreadHandler.sendEmptyMessage(0);
+        }
+
+        /**
+         * Receives the above message, loads photos and then sends a message
+         * to the main thread to process them.
+         */
+        public boolean handleMessage(Message msg) {
+            loadPhotosFromDatabase();
+            return true;
+        }
+
+        private void loadPhotosFromDatabase() {
+            obtainPhotoIdsAndUrisToLoad(mPhotoIds, mPhotoIdsAsStrings, mPhotoUris);
+
+            int count = mPhotoIds.size();
+            if (count != 0) {
+                mStringBuilder.setLength(0);
+                mStringBuilder.append(Photo._ID + " IN(");
+                for (int i = 0; i < count; i++) {
+                    if (i != 0) {
+                        mStringBuilder.append(',');
+                    }
+                    mStringBuilder.append('?');
+                }
+                mStringBuilder.append(')');
+
+                Cursor cursor = null;
+                try {
+                    cursor = mResolver.query(Data.CONTENT_URI,
+                            COLUMNS,
+                            mStringBuilder.toString(),
+                            mPhotoIdsAsStrings.toArray(EMPTY_STRING_ARRAY),
+                            null);
+
+                    if (cursor != null) {
+                        while (cursor.moveToNext()) {
+                            Long id = cursor.getLong(0);
+                            byte[] bytes = cursor.getBlob(1);
+                            cacheBitmap(id, bytes);
+                            mPhotoIds.remove(id);
+                        }
+                    }
+                } finally {
+                    if (cursor != null) {
+                        cursor.close();
+                    }
+                }
+
+                // Remaining photos were not found in the database - mark the cache accordingly.
+                count = mPhotoIds.size();
+                for (int i = 0; i < count; i++) {
+                    cacheBitmap(mPhotoIds.get(i), null);
+                }
+                mMainThreadHandler.sendEmptyMessage(MESSAGE_PHOTOS_LOADED);
+            }
+
+            count = mPhotoUris.size();
+            for (int i = 0; i < count; i++) {
+                Uri uri = mPhotoUris.get(i);
+                if (mBuffer == null) {
+                    mBuffer = new byte[BUFFER_SIZE];
+                }
+                try {
+                    InputStream is = mResolver.openInputStream(uri);
+                    if (is != null) {
+                        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                        try {
+                            int size;
+                            while ((size = is.read(mBuffer)) != -1) {
+                                baos.write(mBuffer, 0, size);
+                            }
+                        } finally {
+                            is.close();
+                        }
+                        cacheBitmap(uri, baos.toByteArray());
+                        mMainThreadHandler.sendEmptyMessage(MESSAGE_PHOTOS_LOADED);
+                    } else {
+                        Log.v(TAG, "Cannot load photo " + uri);
+                        cacheBitmap(uri, null);
+                    }
+                } catch (Exception ex) {
+                    Log.v(TAG, "Cannot load photo " + uri, ex);
+                    cacheBitmap(uri, null);
+                }
+            }
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/ContactPickerFragment.java b/src/com/android/contacts/list/ContactPickerFragment.java
new file mode 100644
index 0000000..2fa70af
--- /dev/null
+++ b/src/com/android/contacts/list/ContactPickerFragment.java
@@ -0,0 +1,172 @@
+/*
+ * 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 com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.list.ShortcutIntentBuilder.OnShortcutIntentCreatedListener;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+
+/**
+ * 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 ContactPickerFragment extends ContactEntryListFragment<ContactEntryListAdapter>
+        implements OnShortcutIntentCreatedListener {
+
+    private OnContactPickerActionListener mListener;
+    private boolean mCreateContactEnabled;
+    private boolean mShortcutRequested;
+
+    public ContactPickerFragment() {
+        setPhotoLoaderEnabled(true);
+        setSectionHeaderDisplayEnabled(true);
+        setAizyEnabled(true);
+        setQuickContactEnabled(false);
+    }
+
+    public void setOnContactPickerActionListener(OnContactPickerActionListener listener) {
+        mListener = listener;
+    }
+
+    public boolean isCreateContactEnabled() {
+        return mCreateContactEnabled;
+    }
+
+    public void setCreateContactEnabled(boolean flag) {
+        this.mCreateContactEnabled = flag;
+    }
+
+    public boolean isShortcutRequested() {
+        return mShortcutRequested;
+    }
+
+    public void setShortcutRequested(boolean flag) {
+        mShortcutRequested = flag;
+    }
+
+    @Override
+    protected void onCreateView(LayoutInflater inflater, ViewGroup container) {
+        super.onCreateView(inflater, container);
+        if (mCreateContactEnabled) {
+            getListView().addHeaderView(inflater.inflate(R.layout.create_new_contact, null, false));
+        }
+    }
+
+    @Override
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        if (position == 0 && !isSearchMode() && mCreateContactEnabled) {
+            mListener.onCreateNewContactAction();
+        } else {
+            super.onItemClick(parent, view, position, id);
+        }
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        Uri uri;
+        if (isLegacyCompatibilityMode()) {
+            uri = ((LegacyContactListAdapter)getAdapter()).getPersonUri(position);
+        } else {
+            uri = ((ContactListAdapter)getAdapter()).getContactUri(position);
+        }
+        if (mShortcutRequested) {
+            ShortcutIntentBuilder builder = new ShortcutIntentBuilder(getActivity(), this);
+            builder.createContactShortcutIntent(uri);
+        } else {
+            mListener.onPickContactAction(uri);
+        }
+    }
+
+    @Override
+    protected ContactEntryListAdapter createListAdapter() {
+        if (!isLegacyCompatibilityMode()) {
+            DefaultContactListAdapter adapter = new DefaultContactListAdapter(getActivity());
+            adapter.setFilter(
+                    new ContactListFilter(ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS), null);
+            adapter.setSectionHeaderDisplayEnabled(true);
+            adapter.setDisplayPhotos(true);
+            adapter.setQuickContactEnabled(false);
+            return adapter;
+        } else {
+            LegacyContactListAdapter adapter = new LegacyContactListAdapter(getActivity());
+            adapter.setSectionHeaderDisplayEnabled(false);
+            adapter.setDisplayPhotos(false);
+            return adapter;
+        }
+    }
+
+    @Override
+    protected void configureAdapter() {
+        super.configureAdapter();
+
+        ContactEntryListAdapter adapter = getAdapter();
+
+        // If "Create new contact" is shown, don't display the empty list UI
+        adapter.setEmptyListEnabled(!isCreateContactEnabled());
+    }
+
+    @Override
+    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+        return inflater.inflate(R.layout.contact_picker_content, null);
+    }
+
+    @Override
+    protected void prepareEmptyView() {
+        if (isSearchMode()) {
+            return;
+        } else if (isSyncActive()) {
+            if (mShortcutRequested) {
+                // Help text is the same no matter whether there is SIM or not.
+                setEmptyText(R.string.noContactsHelpTextWithSyncForCreateShortcut);
+            } else if (hasIccCard()) {
+                setEmptyText(R.string.noContactsHelpTextWithSync);
+            } else {
+                setEmptyText(R.string.noContactsNoSimHelpTextWithSync);
+            }
+        } else {
+            if (mShortcutRequested) {
+                // Help text is the same no matter whether there is SIM or not.
+                setEmptyText(R.string.noContactsHelpTextWithSyncForCreateShortcut);
+            } else if (hasIccCard()) {
+                setEmptyText(R.string.noContactsHelpText);
+            } else {
+                setEmptyText(R.string.noContactsNoSimHelpText);
+            }
+        }
+    }
+
+    public void onShortcutIntentCreated(Uri uri, Intent shortcutIntent) {
+        mListener.onShortcutIntentCreated(shortcutIntent);
+    }
+
+    @Override
+    public void startSearch(String initialQuery) {
+        ContactsSearchManager.startSearchForResult(getActivity(), initialQuery,
+                ACTIVITY_REQUEST_CODE_PICKER, getContactsRequest());
+    }
+
+    @Override
+    public void onPickerResult(Intent data) {
+        mListener.onPickContactAction(data.getData());
+    }
+}
diff --git a/src/com/android/contacts/list/ContactsIntentResolver.java b/src/com/android/contacts/list/ContactsIntentResolver.java
new file mode 100644
index 0000000..c0917dd
--- /dev/null
+++ b/src/com/android/contacts/list/ContactsIntentResolver.java
@@ -0,0 +1,196 @@
+/*
+ * 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 com.android.contacts.CallContactActivity;
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+
+import android.app.Activity;
+import android.app.SearchManager;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.Contacts.ContactMethods;
+import android.provider.Contacts.People;
+import android.provider.Contacts.Phones;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Intents;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.Intents.UI;
+import android.text.TextUtils;
+import android.util.Log;
+
+/**
+ * Parses a Contacts intent, extracting all relevant parts and packaging them
+ * as a {@link ContactsRequest} object.
+ */
+@SuppressWarnings("deprecation")
+public class ContactsIntentResolver {
+
+    private static final String TAG = "ContactsIntentResolver";
+
+    private final Activity mContext;
+
+    public ContactsIntentResolver(Activity context) {
+        this.mContext = context;
+    }
+
+    public ContactsRequest resolveIntent(Intent intent) {
+        ContactsRequest request = new ContactsRequest();
+
+        String action = intent.getAction();
+
+        Log.i(TAG, "Called with action: " + action);
+
+        if (UI.LIST_DEFAULT.equals(action) ) {
+            request.setActionCode(ContactsRequest.ACTION_DEFAULT);
+        } else if (UI.LIST_ALL_CONTACTS_ACTION.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_ALL_CONTACTS);
+        } else if (UI.LIST_CONTACTS_WITH_PHONES_ACTION.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_CONTACTS_WITH_PHONES);
+        } else if (UI.LIST_STARRED_ACTION.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_STARRED);
+        } else if (UI.LIST_FREQUENT_ACTION.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_FREQUENT);
+        } else if (UI.LIST_STREQUENT_ACTION.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_STREQUENT);
+        } else if (UI.LIST_GROUP_ACTION.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_GROUP);
+            String groupName = intent.getStringExtra(UI.GROUP_NAME_EXTRA_KEY);
+            if (!TextUtils.isEmpty(groupName)) {
+                request.setGroupName(groupName);
+            } else {
+                Log.e(TAG, "Intent missing a required extra: " + UI.GROUP_NAME_EXTRA_KEY);
+                request.setValid(false);
+            }
+        } else if (Intent.ACTION_PICK.equals(action)) {
+            final String resolvedType = intent.resolveType(mContext);
+            if (Contacts.CONTENT_TYPE.equals(resolvedType)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_CONTACT);
+            } else if (People.CONTENT_TYPE.equals(resolvedType)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_CONTACT);
+                request.setLegacyCompatibilityMode(true);
+            } else if (Phone.CONTENT_TYPE.equals(resolvedType)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_PHONE);
+            } else if (Phones.CONTENT_TYPE.equals(resolvedType)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_PHONE);
+                request.setLegacyCompatibilityMode(true);
+            } else if (StructuredPostal.CONTENT_TYPE.equals(resolvedType)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_POSTAL);
+            } else if (ContactMethods.CONTENT_POSTAL_TYPE.equals(resolvedType)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_POSTAL);
+                request.setLegacyCompatibilityMode(true);
+            }
+        } else if (Intent.ACTION_CREATE_SHORTCUT.equals(action)) {
+            String component = intent.getComponent().getClassName();
+            if (component.equals("alias.DialShortcut")) {
+                request.setActionCode(ContactsRequest.ACTION_CREATE_SHORTCUT_CALL);
+            } else if (component.equals("alias.MessageShortcut")) {
+                request.setActionCode(ContactsRequest.ACTION_CREATE_SHORTCUT_SMS);
+            } else {
+                request.setActionCode(ContactsRequest.ACTION_CREATE_SHORTCUT_CONTACT);
+            }
+        } else if (Intent.ACTION_GET_CONTENT.equals(action)) {
+            String type = intent.getType();
+            if (Contacts.CONTENT_ITEM_TYPE.equals(type)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_OR_CREATE_CONTACT);
+            } else if (Phone.CONTENT_ITEM_TYPE.equals(type)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_PHONE);
+            } else if (Phones.CONTENT_ITEM_TYPE.equals(type)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_PHONE);
+                request.setLegacyCompatibilityMode(true);
+            } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(type)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_POSTAL);
+            } else if (ContactMethods.CONTENT_POSTAL_ITEM_TYPE.equals(type)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_POSTAL);
+                request.setLegacyCompatibilityMode(true);
+            }  else if (People.CONTENT_ITEM_TYPE.equals(type)) {
+                request.setActionCode(ContactsRequest.ACTION_PICK_OR_CREATE_CONTACT);
+                request.setLegacyCompatibilityMode(true);
+            }
+        } else if (Intent.ACTION_INSERT_OR_EDIT.equals(action)) {
+            request.setActionCode(ContactsRequest.ACTION_INSERT_OR_EDIT_CONTACT);
+        } else if (Intent.ACTION_SEARCH.equals(action)) {
+            // See if the suggestion was clicked with a search action key (call button)
+            if ("call".equals(intent.getStringExtra(SearchManager.ACTION_MSG))) {
+                String query = intent.getStringExtra(SearchManager.QUERY);
+                if (!TextUtils.isEmpty(query)) {
+                    Intent newIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                            Uri.fromParts("tel", query, null));
+                    request.setRedirectIntent(newIntent);
+                }
+            } else {
+                request.setQueryString(intent.getStringExtra(SearchManager.QUERY));
+                request.setSearchMode(true);
+            }
+        } else if (UI.FILTER_CONTACTS_ACTION.equals(action)) {
+            // When we get a FILTER_CONTACTS_ACTION, it represents search in the context
+            // of some other action. Let's retrieve the original action to provide proper
+            // context for the search queries.
+            request.setActionCode(ContactsRequest.ACTION_DEFAULT);
+            Bundle extras = intent.getExtras();
+            if (extras != null) {
+                request.setQueryString(extras.getString(UI.FILTER_TEXT_EXTRA_KEY));
+
+                ContactsRequest originalRequest =
+                        (ContactsRequest)extras.get(ContactsSearchManager.ORIGINAL_REQUEST_KEY);
+                if (originalRequest != null) {
+                    request.copyFrom(originalRequest);
+                }
+            }
+
+            if (request == null) {
+                request = new ContactsRequest();
+            }
+
+            request.setSearchMode(true);
+
+        // Since this is the filter activity it receives all intents
+        // dispatched from the SearchManager for security reasons
+        // so we need to re-dispatch from here to the intended target.
+        } else if (Intents.SEARCH_SUGGESTION_CLICKED.equals(action)) {
+            Uri data = intent.getData();
+            // See if the suggestion was clicked with a search action key (call button)
+            if ("call".equals(intent.getStringExtra(SearchManager.ACTION_MSG))) {
+                Intent newIntent = new Intent(mContext, CallContactActivity.class);
+                newIntent.setData(data);
+                request.setRedirectIntent(newIntent);
+            } else {
+                request.setActionCode(ContactsRequest.ACTION_VIEW_CONTACT);
+                request.setContactUri(data);
+            }
+        } else if (Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED.equals(action)) {
+            request.setRedirectIntent(new Intent(Intent.ACTION_CALL_PRIVILEGED, intent.getData()));
+        } else if (Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED.equals(action)) {
+            // TODO actually support this in EditContactActivity.
+            String number = intent.getData().getSchemeSpecificPart();
+            Intent newIntent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+            newIntent.putExtra(Intents.Insert.PHONE, number);
+            request.setRedirectIntent(newIntent);
+
+        }
+        // Allow the title to be set to a custom String using an extra on the intent
+        String title = intent.getStringExtra(UI.TITLE_EXTRA_KEY);
+        if (title != null) {
+            request.setActivityTitle(title);
+        }
+
+        return request;
+    }
+}
diff --git a/src/com/android/contacts/list/ContactsRequest.java b/src/com/android/contacts/list/ContactsRequest.java
new file mode 100644
index 0000000..aefa451
--- /dev/null
+++ b/src/com/android/contacts/list/ContactsRequest.java
@@ -0,0 +1,227 @@
+/*
+ * 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.content.Intent;
+import android.net.Uri;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Parsed form of the intent sent to the Contacts application.
+ */
+public class ContactsRequest implements Parcelable {
+
+    /** Default mode: browse contacts */
+    public static final int ACTION_DEFAULT = 10;
+
+    /** Show all contacts */
+    public static final int ACTION_ALL_CONTACTS = 15;
+
+    /** Show all contacts with phone numbers */
+    public static final int ACTION_CONTACTS_WITH_PHONES = 17;
+
+    /** Show contents of a specific group */
+    public static final int ACTION_GROUP = 20;
+
+    /** Show all starred contacts */
+    public static final int ACTION_STARRED = 30;
+
+    /** Show frequently contacted contacts */
+    public static final int ACTION_FREQUENT = 40;
+
+    /** Show starred and the frequent */
+    public static final int ACTION_STREQUENT = 50;
+
+    /** Show all contacts and pick them when clicking */
+    public static final int ACTION_PICK_CONTACT = 60;
+
+    /** Show all contacts as well as the option to create a new one */
+    public static final int ACTION_PICK_OR_CREATE_CONTACT = 70;
+
+    /** Show all contacts and pick them for edit when clicking, and allow creating a new contact */
+    public static final int ACTION_INSERT_OR_EDIT_CONTACT = 80;
+
+    /** Show all phone numbers and pick them when clicking */
+    public static final int ACTION_PICK_PHONE = 90;
+
+    /** Show all postal addresses and pick them when clicking */
+    public static final int ACTION_PICK_POSTAL = 100;
+
+    /** Show all contacts and create a shortcut for the picked contact */
+    public static final int ACTION_CREATE_SHORTCUT_CONTACT = 110;
+
+    /** Show all phone numbers and create a call shortcut for the picked number */
+    public static final int ACTION_CREATE_SHORTCUT_CALL = 120;
+
+    /** Show all phone numbers and create an SMS shortcut for the picked number */
+    public static final int ACTION_CREATE_SHORTCUT_SMS = 130;
+
+    /** Show all contacts and activate the specified one */
+    public static final int ACTION_VIEW_CONTACT = 140;
+
+    private boolean mValid = true;
+    private int mActionCode = ACTION_DEFAULT;
+    private Intent mRedirectIntent;
+    private CharSequence mTitle;
+    private boolean mSearchMode;
+    private String mQueryString;
+    private String mGroupName;
+    private boolean mLegacyCompatibilityMode;
+    private boolean mDirectorySearchEnabled = true;
+    private Uri mContactUri;
+
+    /**
+     * Copies all fields.
+     */
+    public void copyFrom(ContactsRequest request) {
+        mValid = request.mValid;
+        mActionCode = request.mActionCode;
+        mRedirectIntent = request.mRedirectIntent;
+        mTitle = request.mTitle;
+        mSearchMode = request.mSearchMode;
+        mQueryString = request.mQueryString;
+        mGroupName = request.mGroupName;
+        mLegacyCompatibilityMode = request.mLegacyCompatibilityMode;
+        mDirectorySearchEnabled = request.mDirectorySearchEnabled;
+        mContactUri = request.mContactUri;
+    }
+
+    public static Parcelable.Creator<ContactsRequest> CREATOR = new Creator<ContactsRequest>() {
+
+        public ContactsRequest[] newArray(int size) {
+            return new ContactsRequest[size];
+        }
+
+        public ContactsRequest createFromParcel(Parcel source) {
+            ClassLoader classLoader = this.getClass().getClassLoader();
+            ContactsRequest request = new ContactsRequest();
+            request.mValid = source.readInt() != 0;
+            request.mActionCode = source.readInt();
+            request.mRedirectIntent = source.readParcelable(classLoader);
+            request.mTitle = source.readCharSequence();
+            request.mSearchMode = source.readInt() != 0;
+            request.mQueryString = source.readString();
+            request.mGroupName = source.readString();
+            request.mLegacyCompatibilityMode  = source.readInt() != 0;
+            request.mDirectorySearchEnabled = source.readInt() != 0;
+            request.mContactUri = source.readParcelable(classLoader);
+            return request;
+        }
+    };
+
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(mValid ? 1 : 0);
+        dest.writeInt(mActionCode);
+        dest.writeParcelable(mRedirectIntent, 0);
+        dest.writeCharSequence(mTitle);
+        dest.writeInt(mSearchMode ? 1 : 0);
+        dest.writeString(mQueryString);
+        dest.writeString(mGroupName);
+        dest.writeInt(mLegacyCompatibilityMode ? 1 : 0);
+        dest.writeInt(mDirectorySearchEnabled ? 1 : 0);
+        dest.writeParcelable(mContactUri, 0);
+    }
+
+    public int describeContents() {
+        return 0;
+    }
+
+    public boolean isValid() {
+        return mValid;
+    }
+
+    public void setValid(boolean flag) {
+        mValid = flag;
+    }
+
+    public Intent getRedirectIntent() {
+        return mRedirectIntent;
+    }
+
+    public void setRedirectIntent(Intent intent) {
+        mRedirectIntent = intent;
+    }
+
+    public void setActivityTitle(CharSequence title) {
+        mTitle = title;
+    }
+
+    public CharSequence getActivityTitle() {
+        return mTitle;
+    }
+
+    public int getActionCode() {
+        return mActionCode;
+    }
+
+    public void setActionCode(int actionCode) {
+        mActionCode = actionCode;
+    }
+
+    public boolean isSearchMode() {
+        return mSearchMode;
+    }
+
+    public void setSearchMode(boolean flag) {
+        mSearchMode = flag;
+    }
+
+    public String getQueryString() {
+        return mQueryString;
+    }
+
+    public void setQueryString(String string) {
+        mQueryString = string;
+    }
+
+    public String getGroupName() {
+        return mGroupName;
+    }
+
+    public void setGroupName(String groupName) {
+        mGroupName = groupName;
+    }
+
+    public boolean isLegacyCompatibilityMode() {
+        return mLegacyCompatibilityMode;
+    }
+
+    public void setLegacyCompatibilityMode(boolean flag) {
+        mLegacyCompatibilityMode = flag;
+    }
+
+    /**
+     * Determines whether this search request should include directories or
+     * is limited to local contacts only.
+     */
+    public boolean isDirectorySearchEnabled() {
+        return mDirectorySearchEnabled;
+    }
+
+    public void setDirectorySearchEnabled(boolean flag) {
+        mDirectorySearchEnabled = flag;
+    }
+
+    public Uri getContactUri() {
+        return mContactUri;
+    }
+
+    public void setContactUri(Uri contactUri) {
+        this.mContactUri = contactUri;
+    }
+}
diff --git a/src/com/android/contacts/list/ContactsSectionIndexer.java b/src/com/android/contacts/list/ContactsSectionIndexer.java
new file mode 100644
index 0000000..a80d1de
--- /dev/null
+++ b/src/com/android/contacts/list/ContactsSectionIndexer.java
@@ -0,0 +1,96 @@
+/*
+ * 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.widget.SectionIndexer;
+
+import java.util.Arrays;
+
+/**
+ * A section indexer that is configured with precomputed section titles and
+ * their respective counts.
+ */
+public class ContactsSectionIndexer implements SectionIndexer {
+
+    private final String[] mSections;
+    private final int[] mPositions;
+    private final int mCount;
+
+    /**
+     * Constructor.
+     *
+     * @param sections a non-null array
+     * @param counts a non-null array of the same size as <code>sections</code>
+     */
+    public ContactsSectionIndexer(String[] sections, int[] counts) {
+        if (sections == null || counts == null) {
+            throw new NullPointerException();
+        }
+
+        if (sections.length != counts.length) {
+            throw new IllegalArgumentException(
+                    "The sections and counts arrays must have the same length");
+        }
+
+        // TODO process sections/counts based on current locale and/or specific section titles
+
+        this.mSections = sections;
+        mPositions = new int[counts.length];
+        int position = 0;
+        for (int i = 0; i < counts.length; i++) {
+            if (mSections[i] == null) {
+                mSections[i] = " ";
+            } else {
+                mSections[i] = mSections[i].trim();
+            }
+
+            mPositions[i] = position;
+            position += counts[i];
+        }
+        mCount = position;
+    }
+
+    public Object[] getSections() {
+        return mSections;
+    }
+
+    public int getPositionForSection(int section) {
+        if (section < 0 || section >= mSections.length) {
+            return -1;
+        }
+
+        return mPositions[section];
+    }
+
+    public int getSectionForPosition(int position) {
+        if (position < 0 || position >= mCount) {
+            return -1;
+        }
+
+        int index = Arrays.binarySearch(mPositions, position);
+
+        /*
+         * Consider this example: section positions are 0, 3, 5; the supplied
+         * position is 4. The section corresponding to position 4 starts at
+         * position 3, so the expected return value is 1. Binary search will not
+         * find 4 in the array and thus will return -insertPosition-1, i.e. -3.
+         * To get from that number to the expected value of 1 we need to negate
+         * and subtract 2.
+         */
+        return index >= 0 ? index : -index - 2;
+    }
+}
diff --git a/src/com/android/contacts/list/CustomContactListFilterActivity.java b/src/com/android/contacts/list/CustomContactListFilterActivity.java
new file mode 100644
index 0000000..6221d08
--- /dev/null
+++ b/src/com/android/contacts/list/CustomContactListFilterActivity.java
@@ -0,0 +1,910 @@
+/*
+ * Copyright (C) 2009 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 com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.GoogleAccountType;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.preference.ContactsPreferences;
+import com.android.contacts.util.EmptyService;
+import com.android.contacts.util.LocalizedNameResolver;
+import com.android.contacts.util.WeakAsyncTask;
+import com.google.android.collect.Lists;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.ExpandableListActivity;
+import android.app.ProgressDialog;
+import android.content.ContentProviderOperation;
+import android.content.ContentProviderOperation.Builder;
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.EntityIterator;
+import android.content.Intent;
+import android.content.OperationApplicationException;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.preference.PreferenceManager;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Groups;
+import android.provider.ContactsContract.Settings;
+import android.util.Log;
+import android.view.ContextMenu;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
+import android.view.MenuItem.OnMenuItemClickListener;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseExpandableListAdapter;
+import android.widget.CheckBox;
+import android.widget.ExpandableListAdapter;
+import android.widget.ExpandableListView;
+import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
+import android.widget.TextView;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+
+/**
+ * Shows a list of all available {@link Groups} available, letting the user
+ * select which ones they want to be visible.
+ */
+public final class CustomContactListFilterActivity extends ExpandableListActivity implements
+        AdapterView.OnItemClickListener, View.OnClickListener {
+
+    private static final String TAG = "CustomContactListFilterActivity";
+
+    private ExpandableListView mList;
+    private DisplayAdapter mAdapter;
+
+    private SharedPreferences mPrefs;
+
+    private CheckBox mDisplayPhones;
+
+    private View mHeaderPhones;
+    private View mHeaderSeparator;
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        setContentView(R.layout.contact_list_filter_custom);
+
+        mList = getExpandableListView();
+        mList.setHeaderDividersEnabled(true);
+        mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+        mAdapter = new DisplayAdapter(this);
+
+        final LayoutInflater inflater = getLayoutInflater();
+
+        createWithPhonesOnlyPreferenceView(inflater);
+        createDisplayGroupHeader(inflater);
+
+        findViewById(R.id.btn_done).setOnClickListener(this);
+        findViewById(R.id.btn_discard).setOnClickListener(this);
+
+        // Catch clicks on the header views
+        mList.setOnItemClickListener(this);
+        mList.setOnCreateContextMenuListener(this);
+    }
+
+    private void createWithPhonesOnlyPreferenceView(LayoutInflater inflater) {
+        // Add the "Only contacts with phones" header modifier.
+        mHeaderPhones = inflater.inflate(R.layout.contact_list_filter_phones_only, mList, false);
+        mHeaderPhones.setId(R.id.header_phones);
+        mDisplayPhones = (CheckBox) mHeaderPhones.findViewById(android.R.id.checkbox);
+        mDisplayPhones.setChecked(mPrefs.getBoolean(ContactsPreferences.PREF_DISPLAY_ONLY_PHONES,
+                ContactsPreferences.PREF_DISPLAY_ONLY_PHONES_DEFAULT));
+        final TextView text1 = (TextView) mHeaderPhones.findViewById(android.R.id.text1);
+        text1.setText(R.string.showFilterPhones);
+        final TextView text2 = (TextView) mHeaderPhones.findViewById(android.R.id.text2);
+        text2.setText(R.string.showFilterPhonesDescrip);
+    }
+
+    private void createDisplayGroupHeader(LayoutInflater inflater) {
+        // Add the separator before showing the detailed group list.
+        mHeaderSeparator = inflater.inflate(R.layout.list_separator, mList, false);
+        final TextView text1 = (TextView) mHeaderSeparator;
+        text1.setText(R.string.headerContactGroups);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        mList.removeHeaderView(mHeaderPhones);
+        mList.removeHeaderView(mHeaderSeparator);
+
+        // List adapter needs to be reset, because header views cannot be added
+        // to a list with an existing adapter.
+        setListAdapter(null);
+
+        mList.addHeaderView(mHeaderPhones, null, true);
+        mList.addHeaderView(mHeaderSeparator, null, false);
+
+        setListAdapter(mAdapter);
+
+        // Start background query to find account details
+        new QueryGroupsTask(this).execute();
+    }
+
+    /**
+     * Background operation to build set of {@link AccountDisplay} for each
+     * {@link AccountTypes#getAccounts(boolean)} that provides groups.
+     */
+    private static class QueryGroupsTask extends
+            WeakAsyncTask<Void, Void, AccountSet, CustomContactListFilterActivity> {
+        public QueryGroupsTask(CustomContactListFilterActivity target) {
+            super(target);
+        }
+
+        @Override
+        protected AccountSet doInBackground(CustomContactListFilterActivity target,
+                Void... params) {
+            final Context context = target;
+            final AccountTypes sources = AccountTypes.getInstance(context);
+            final ContentResolver resolver = context.getContentResolver();
+
+            // Inflate groups entry for each account
+            final AccountSet accounts = new AccountSet();
+            for (Account account : sources.getAccounts(false)) {
+                accounts.add(new AccountDisplay(resolver, account.name, account.type));
+            }
+
+            return accounts;
+        }
+
+        @Override
+        protected void onPostExecute(CustomContactListFilterActivity target, AccountSet result) {
+            target.mAdapter.setAccounts(result);
+        }
+    }
+
+    private static final int DEFAULT_SHOULD_SYNC = 1;
+    private static final int DEFAULT_VISIBLE = 0;
+
+    /**
+     * Entry holding any changes to {@link Groups} or {@link Settings} rows,
+     * such as {@link Groups#SHOULD_SYNC} or {@link Groups#GROUP_VISIBLE}.
+     */
+    protected static class GroupDelta extends ValuesDelta {
+        private boolean mUngrouped = false;
+        private boolean mAccountHasGroups;
+
+        private GroupDelta() {
+            super();
+        }
+
+        /**
+         * Build {@link GroupDelta} from the {@link Settings} row for the given
+         * {@link Settings#ACCOUNT_NAME} and {@link Settings#ACCOUNT_TYPE}.
+         */
+        public static GroupDelta fromSettings(ContentResolver resolver, String accountName,
+                String accountType, boolean accountHasGroups) {
+            final Uri settingsUri = Settings.CONTENT_URI.buildUpon()
+                    .appendQueryParameter(Settings.ACCOUNT_NAME, accountName)
+                    .appendQueryParameter(Settings.ACCOUNT_TYPE, accountType).build();
+            final Cursor cursor = resolver.query(settingsUri, new String[] {
+                    Settings.SHOULD_SYNC, Settings.UNGROUPED_VISIBLE
+            }, null, null, null);
+
+            try {
+                final ContentValues values = new ContentValues();
+                values.put(Settings.ACCOUNT_NAME, accountName);
+                values.put(Settings.ACCOUNT_TYPE, accountType);
+
+                if (cursor != null && cursor.moveToFirst()) {
+                    // Read existing values when present
+                    values.put(Settings.SHOULD_SYNC, cursor.getInt(0));
+                    values.put(Settings.UNGROUPED_VISIBLE, cursor.getInt(1));
+                    return fromBefore(values).setUngrouped(accountHasGroups);
+                } else {
+                    // Nothing found, so treat as create
+                    values.put(Settings.SHOULD_SYNC, DEFAULT_SHOULD_SYNC);
+                    values.put(Settings.UNGROUPED_VISIBLE, DEFAULT_VISIBLE);
+                    return fromAfter(values).setUngrouped(accountHasGroups);
+                }
+            } finally {
+                if (cursor != null) cursor.close();
+            }
+        }
+
+        public static GroupDelta fromBefore(ContentValues before) {
+            final GroupDelta entry = new GroupDelta();
+            entry.mBefore = before;
+            entry.mAfter = new ContentValues();
+            return entry;
+        }
+
+        public static GroupDelta fromAfter(ContentValues after) {
+            final GroupDelta entry = new GroupDelta();
+            entry.mBefore = null;
+            entry.mAfter = after;
+            return entry;
+        }
+
+        protected GroupDelta setUngrouped(boolean accountHasGroups) {
+            mUngrouped = true;
+            mAccountHasGroups = accountHasGroups;
+            return this;
+        }
+
+        @Override
+        public boolean beforeExists() {
+            return mBefore != null;
+        }
+
+        public boolean getShouldSync() {
+            return getAsInteger(mUngrouped ? Settings.SHOULD_SYNC : Groups.SHOULD_SYNC,
+                    DEFAULT_SHOULD_SYNC) != 0;
+        }
+
+        public boolean getVisible() {
+            return getAsInteger(mUngrouped ? Settings.UNGROUPED_VISIBLE : Groups.GROUP_VISIBLE,
+                    DEFAULT_VISIBLE) != 0;
+        }
+
+        public void putShouldSync(boolean shouldSync) {
+            put(mUngrouped ? Settings.SHOULD_SYNC : Groups.SHOULD_SYNC, shouldSync ? 1 : 0);
+        }
+
+        public void putVisible(boolean visible) {
+            put(mUngrouped ? Settings.UNGROUPED_VISIBLE : Groups.GROUP_VISIBLE, visible ? 1 : 0);
+        }
+
+        private String getAccountType() {
+            return (mBefore == null ? mAfter : mBefore).getAsString(Settings.ACCOUNT_TYPE);
+        }
+
+        public CharSequence getTitle(Context context) {
+            if (mUngrouped) {
+                final String customAllContactsName =
+                        LocalizedNameResolver.getAllContactsName(context, getAccountType());
+                if (customAllContactsName != null) {
+                    return customAllContactsName;
+                }
+                if (mAccountHasGroups) {
+                    return context.getText(R.string.display_ungrouped);
+                } else {
+                    return context.getText(R.string.display_all_contacts);
+                }
+            } else {
+                final Integer titleRes = getAsInteger(Groups.TITLE_RES);
+                if (titleRes != null) {
+                    final String packageName = getAsString(Groups.RES_PACKAGE);
+                    return context.getPackageManager().getText(packageName, titleRes, null);
+                } else {
+                    return getAsString(Groups.TITLE);
+                }
+            }
+        }
+
+        /**
+         * Build a possible {@link ContentProviderOperation} to persist any
+         * changes to the {@link Groups} or {@link Settings} row described by
+         * this {@link GroupDelta}.
+         */
+        public ContentProviderOperation buildDiff() {
+            if (isNoop()) {
+                return null;
+            } else if (isUpdate()) {
+                // When has changes and "before" exists, then "update"
+                final Builder builder = ContentProviderOperation.newUpdate(
+                        mUngrouped
+                                ? Settings.CONTENT_URI
+                                : addCallerIsSyncAdapterParameter(Groups.CONTENT_URI));
+                if (mUngrouped) {
+                    builder.withSelection(Settings.ACCOUNT_NAME + "=? AND " + Settings.ACCOUNT_TYPE
+                            + "=?", new String[] {
+                            this.getAsString(Settings.ACCOUNT_NAME),
+                            this.getAsString(Settings.ACCOUNT_TYPE)
+                    });
+                } else {
+                    builder.withSelection(Groups._ID + "=" + this.getId(), null);
+                }
+                builder.withValues(mAfter);
+                return builder.build();
+            } else if (isInsert() && mUngrouped) {
+                // Only allow inserts for Settings
+                mAfter.remove(mIdColumn);
+                final Builder builder = ContentProviderOperation.newInsert(Settings.CONTENT_URI);
+                builder.withValues(mAfter);
+                return builder.build();
+            } else {
+                throw new IllegalStateException("Unexpected delete or insert");
+            }
+        }
+    }
+
+    private static Uri addCallerIsSyncAdapterParameter(Uri uri) {
+        return uri.buildUpon()
+            .appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, "true")
+            .build();
+    }
+
+    /**
+     * {@link Comparator} to sort by {@link Groups#_ID}.
+     */
+    private static Comparator<GroupDelta> sIdComparator = new Comparator<GroupDelta>() {
+        public int compare(GroupDelta object1, GroupDelta object2) {
+            final Long id1 = object1.getId();
+            final Long id2 = object2.getId();
+            if (id1 == null && id2 == null) {
+                return 0;
+            } else if (id1 == null) {
+                return -1;
+            } else if (id2 == null) {
+                return 1;
+            } else if (id1 < id2) {
+                return -1;
+            } else if (id1 > id2) {
+                return 1;
+            } else {
+                return 0;
+            }
+        }
+    };
+
+    /**
+     * Set of all {@link AccountDisplay} entries, one for each source.
+     */
+    protected static class AccountSet extends ArrayList<AccountDisplay> {
+        public ArrayList<ContentProviderOperation> buildDiff() {
+            final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
+            for (AccountDisplay account : this) {
+                account.buildDiff(diff);
+            }
+            return diff;
+        }
+    }
+
+    /**
+     * {@link GroupDelta} details for a single {@link Account}, usually shown as
+     * children under a single expandable group.
+     */
+    protected static class AccountDisplay {
+        public String mName;
+        public String mType;
+
+        public GroupDelta mUngrouped;
+        public ArrayList<GroupDelta> mSyncedGroups = Lists.newArrayList();
+        public ArrayList<GroupDelta> mUnsyncedGroups = Lists.newArrayList();
+
+        /**
+         * Build an {@link AccountDisplay} covering all {@link Groups} under the
+         * given {@link Account}.
+         */
+        public AccountDisplay(ContentResolver resolver, String accountName, String accountType) {
+            mName = accountName;
+            mType = accountType;
+
+            final Uri groupsUri = Groups.CONTENT_URI.buildUpon()
+                    .appendQueryParameter(Groups.ACCOUNT_NAME, accountName)
+                    .appendQueryParameter(Groups.ACCOUNT_TYPE, accountType).build();
+            EntityIterator iterator = ContactsContract.Groups.newEntityIterator(resolver.query(
+                    groupsUri, null, null, null, null));
+            try {
+                boolean hasGroups = false;
+
+                // Create entries for each known group
+                while (iterator.hasNext()) {
+                    final ContentValues values = iterator.next().getEntityValues();
+                    final GroupDelta group = GroupDelta.fromBefore(values);
+                    addGroup(group);
+                    hasGroups = true;
+                }
+                // Create single entry handling ungrouped status
+                mUngrouped = GroupDelta.fromSettings(resolver, accountName, accountType, hasGroups);
+                addGroup(mUngrouped);
+            } finally {
+                iterator.close();
+            }
+        }
+
+        /**
+         * Add the given {@link GroupDelta} internally, filing based on its
+         * {@link GroupDelta#getShouldSync()} status.
+         */
+        private void addGroup(GroupDelta group) {
+            if (group.getShouldSync()) {
+                mSyncedGroups.add(group);
+            } else {
+                mUnsyncedGroups.add(group);
+            }
+        }
+
+        /**
+         * Set the {@link GroupDelta#putShouldSync(boolean)} value for all
+         * children {@link GroupDelta} rows.
+         */
+        public void setShouldSync(boolean shouldSync) {
+            final Iterator<GroupDelta> oppositeChildren = shouldSync ?
+                    mUnsyncedGroups.iterator() : mSyncedGroups.iterator();
+            while (oppositeChildren.hasNext()) {
+                final GroupDelta child = oppositeChildren.next();
+                setShouldSync(child, shouldSync, false);
+                oppositeChildren.remove();
+            }
+        }
+
+        public void setShouldSync(GroupDelta child, boolean shouldSync) {
+            setShouldSync(child, shouldSync, true);
+        }
+
+        /**
+         * Set {@link GroupDelta#putShouldSync(boolean)}, and file internally
+         * based on updated state.
+         */
+        public void setShouldSync(GroupDelta child, boolean shouldSync, boolean attemptRemove) {
+            child.putShouldSync(shouldSync);
+            if (shouldSync) {
+                if (attemptRemove) {
+                    mUnsyncedGroups.remove(child);
+                }
+                mSyncedGroups.add(child);
+                Collections.sort(mSyncedGroups, sIdComparator);
+            } else {
+                if (attemptRemove) {
+                    mSyncedGroups.remove(child);
+                }
+                mUnsyncedGroups.add(child);
+            }
+        }
+
+        /**
+         * Build set of {@link ContentProviderOperation} to persist any user
+         * changes to {@link GroupDelta} rows under this {@link Account}.
+         */
+        public void buildDiff(ArrayList<ContentProviderOperation> diff) {
+            for (GroupDelta group : mSyncedGroups) {
+                final ContentProviderOperation oper = group.buildDiff();
+                if (oper != null) diff.add(oper);
+            }
+            for (GroupDelta group : mUnsyncedGroups) {
+                final ContentProviderOperation oper = group.buildDiff();
+                if (oper != null) diff.add(oper);
+            }
+        }
+    }
+
+    /**
+     * {@link ExpandableListAdapter} that shows {@link GroupDelta} settings,
+     * grouped by {@link Account} source. Shows footer row when any groups are
+     * unsynced, as determined through {@link AccountDisplay#mUnsyncedGroups}.
+     */
+    protected static class DisplayAdapter extends BaseExpandableListAdapter {
+        private Context mContext;
+        private LayoutInflater mInflater;
+        private AccountTypes mSources;
+        private AccountSet mAccounts;
+
+        private boolean mChildWithPhones = false;
+
+        public DisplayAdapter(Context context) {
+            mContext = context;
+            mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            mSources = AccountTypes.getInstance(context);
+        }
+
+        public void setAccounts(AccountSet accounts) {
+            mAccounts = accounts;
+            notifyDataSetChanged();
+        }
+
+        /**
+         * In group descriptions, show the number of contacts with phone
+         * numbers, in addition to the total contacts.
+         */
+        public void setChildDescripWithPhones(boolean withPhones) {
+            mChildWithPhones = withPhones;
+        }
+
+        /** {@inheritDoc} */
+        public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
+                View convertView, ViewGroup parent) {
+            if (convertView == null) {
+                convertView = mInflater.inflate(R.layout.display_child, parent, false);
+            }
+
+            final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
+            final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
+            final CheckBox checkbox = (CheckBox)convertView.findViewById(android.R.id.checkbox);
+
+            final AccountDisplay account = mAccounts.get(groupPosition);
+            final GroupDelta child = (GroupDelta)this.getChild(groupPosition, childPosition);
+            if (child != null) {
+                // Handle normal group, with title and checkbox
+                final boolean groupVisible = child.getVisible();
+                checkbox.setVisibility(View.VISIBLE);
+                checkbox.setChecked(groupVisible);
+
+                final CharSequence groupTitle = child.getTitle(mContext);
+                text1.setText(groupTitle);
+                text2.setVisibility(View.GONE);
+            } else {
+                // When unknown child, this is "more" footer view
+                checkbox.setVisibility(View.GONE);
+                text1.setText(R.string.display_more_groups);
+                text2.setVisibility(View.GONE);
+            }
+
+            return convertView;
+        }
+
+        /** {@inheritDoc} */
+        public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
+                ViewGroup parent) {
+            if (convertView == null) {
+                convertView = mInflater.inflate(R.layout.display_group, parent, false);
+            }
+
+            final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
+            final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
+
+            final AccountDisplay account = (AccountDisplay)this.getGroup(groupPosition);
+
+            final BaseAccountType source = mSources.getInflatedSource(account.mType,
+                    BaseAccountType.LEVEL_SUMMARY);
+
+            text1.setText(account.mName);
+            text2.setText(source.getDisplayLabel(mContext));
+            text2.setVisibility(account.mName == null ? View.GONE : View.VISIBLE);
+
+            return convertView;
+        }
+
+        /** {@inheritDoc} */
+        public Object getChild(int groupPosition, int childPosition) {
+            final AccountDisplay account = mAccounts.get(groupPosition);
+            final boolean validChild = childPosition >= 0
+                    && childPosition < account.mSyncedGroups.size();
+            if (validChild) {
+                return account.mSyncedGroups.get(childPosition);
+            } else {
+                return null;
+            }
+        }
+
+        /** {@inheritDoc} */
+        public long getChildId(int groupPosition, int childPosition) {
+            final GroupDelta child = (GroupDelta)getChild(groupPosition, childPosition);
+            if (child != null) {
+                final Long childId = child.getId();
+                return childId != null ? childId : Long.MIN_VALUE;
+            } else {
+                return Long.MIN_VALUE;
+            }
+        }
+
+        /** {@inheritDoc} */
+        public int getChildrenCount(int groupPosition) {
+            // Count is any synced groups, plus possible footer
+            final AccountDisplay account = mAccounts.get(groupPosition);
+            final boolean anyHidden = account.mUnsyncedGroups.size() > 0;
+            return account.mSyncedGroups.size() + (anyHidden ? 1 : 0);
+        }
+
+        /** {@inheritDoc} */
+        public Object getGroup(int groupPosition) {
+            return mAccounts.get(groupPosition);
+        }
+
+        /** {@inheritDoc} */
+        public int getGroupCount() {
+            if (mAccounts == null) {
+                return 0;
+            }
+            return mAccounts.size();
+        }
+
+        /** {@inheritDoc} */
+        public long getGroupId(int groupPosition) {
+            return groupPosition;
+        }
+
+        /** {@inheritDoc} */
+        public boolean hasStableIds() {
+            return true;
+        }
+
+        /** {@inheritDoc} */
+        public boolean isChildSelectable(int groupPosition, int childPosition) {
+            return true;
+        }
+    }
+
+    /**
+     * Handle any clicks on header views added to our {@link #mAdapter}, which
+     * are usually the global modifier checkboxes.
+     */
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        Log.d(TAG, "OnItemClick, position=" + position + ", id=" + id);
+        if (view == mHeaderPhones) {
+            mDisplayPhones.toggle();
+            return;
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onClick(View view) {
+        switch (view.getId()) {
+            case R.id.btn_done: {
+                this.doSaveAction();
+                break;
+            }
+            case R.id.btn_discard: {
+                this.finish();
+                break;
+            }
+        }
+    }
+
+    /**
+     * Assign a specific value to {@link ContactsPreferences#PREF_DISPLAY_ONLY_PHONES}, refreshing
+     * the visible list as needed.
+     */
+    protected void setDisplayOnlyPhones(boolean displayOnlyPhones) {
+        mDisplayPhones.setChecked(displayOnlyPhones);
+
+        Editor editor = mPrefs.edit();
+        editor.putBoolean(ContactsPreferences.PREF_DISPLAY_ONLY_PHONES, displayOnlyPhones);
+        editor.apply();
+
+        mAdapter.setChildDescripWithPhones(displayOnlyPhones);
+        mAdapter.notifyDataSetChanged();
+    }
+
+    /**
+     * Handle any clicks on {@link ExpandableListAdapter} children, which
+     * usually mean toggling its visible state.
+     */
+    @Override
+    public boolean onChildClick(ExpandableListView parent, View view, int groupPosition,
+            int childPosition, long id) {
+        final CheckBox checkbox = (CheckBox)view.findViewById(android.R.id.checkbox);
+
+        final AccountDisplay account = (AccountDisplay)mAdapter.getGroup(groupPosition);
+        final GroupDelta child = (GroupDelta)mAdapter.getChild(groupPosition, childPosition);
+        if (child != null) {
+            checkbox.toggle();
+            child.putVisible(checkbox.isChecked());
+        } else {
+            // Open context menu for bringing back unsynced
+            this.openContextMenu(view);
+        }
+        return true;
+    }
+
+    // TODO: move these definitions to framework constants when we begin
+    // defining this mode through <sync-adapter> tags
+    private static final int SYNC_MODE_UNSUPPORTED = 0;
+    private static final int SYNC_MODE_UNGROUPED = 1;
+    private static final int SYNC_MODE_EVERYTHING = 2;
+
+    protected int getSyncMode(AccountDisplay account) {
+        // TODO: read sync mode through <sync-adapter> definition
+        if (GoogleAccountType.ACCOUNT_TYPE.equals(account.mType)) {
+            return SYNC_MODE_EVERYTHING;
+        } else {
+            return SYNC_MODE_UNSUPPORTED;
+        }
+    }
+
+    @Override
+    public void onCreateContextMenu(ContextMenu menu, View view,
+            ContextMenu.ContextMenuInfo menuInfo) {
+        super.onCreateContextMenu(menu, view, menuInfo);
+
+        // Bail if not working with expandable long-press, or if not child
+        if (!(menuInfo instanceof ExpandableListContextMenuInfo)) return;
+
+        final ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
+        final int groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
+        final int childPosition = ExpandableListView.getPackedPositionChild(info.packedPosition);
+
+        // Skip long-press on expandable parents
+        if (childPosition == -1) return;
+
+        final AccountDisplay account = (AccountDisplay)mAdapter.getGroup(groupPosition);
+        final GroupDelta child = (GroupDelta)mAdapter.getChild(groupPosition, childPosition);
+
+        // Ignore when selective syncing unsupported
+        final int syncMode = getSyncMode(account);
+        if (syncMode == SYNC_MODE_UNSUPPORTED) return;
+
+        if (child != null) {
+            showRemoveSync(menu, account, child, syncMode);
+        } else {
+            showAddSync(menu, account, syncMode);
+        }
+    }
+
+    protected void showRemoveSync(ContextMenu menu, final AccountDisplay account,
+            final GroupDelta child, final int syncMode) {
+        final CharSequence title = child.getTitle(this);
+
+        menu.setHeaderTitle(title);
+        menu.add(R.string.menu_sync_remove).setOnMenuItemClickListener(
+                new OnMenuItemClickListener() {
+                    public boolean onMenuItemClick(MenuItem item) {
+                        handleRemoveSync(account, child, syncMode, title);
+                        return true;
+                    }
+                });
+    }
+
+    protected void handleRemoveSync(final AccountDisplay account, final GroupDelta child,
+            final int syncMode, CharSequence title) {
+        final boolean shouldSyncUngrouped = account.mUngrouped.getShouldSync();
+        if (syncMode == SYNC_MODE_EVERYTHING && shouldSyncUngrouped
+                && !child.equals(account.mUngrouped)) {
+            // Warn before removing this group when it would cause ungrouped to stop syncing
+            final AlertDialog.Builder builder = new AlertDialog.Builder(this);
+            final CharSequence removeMessage = this.getString(
+                    R.string.display_warn_remove_ungrouped, title);
+            builder.setTitle(R.string.menu_sync_remove);
+            builder.setMessage(removeMessage);
+            builder.setNegativeButton(android.R.string.cancel, null);
+            builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+                public void onClick(DialogInterface dialog, int which) {
+                    // Mark both this group and ungrouped to stop syncing
+                    account.setShouldSync(account.mUngrouped, false);
+                    account.setShouldSync(child, false);
+                    mAdapter.notifyDataSetChanged();
+                }
+            });
+            builder.show();
+        } else {
+            // Mark this group to not sync
+            account.setShouldSync(child, false);
+            mAdapter.notifyDataSetChanged();
+        }
+    }
+
+    protected void showAddSync(ContextMenu menu, final AccountDisplay account, final int syncMode) {
+        menu.setHeaderTitle(R.string.dialog_sync_add);
+
+        // Create item for each available, unsynced group
+        for (final GroupDelta child : account.mUnsyncedGroups) {
+            if (!child.getShouldSync()) {
+                final CharSequence title = child.getTitle(this);
+                menu.add(title).setOnMenuItemClickListener(new OnMenuItemClickListener() {
+                    public boolean onMenuItemClick(MenuItem item) {
+                        // Adding specific group for syncing
+                        if (child.mUngrouped && syncMode == SYNC_MODE_EVERYTHING) {
+                            account.setShouldSync(true);
+                        } else {
+                            account.setShouldSync(child, true);
+                        }
+                        mAdapter.notifyDataSetChanged();
+                        return true;
+                    }
+                });
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void onBackPressed() {
+        doSaveAction();
+    }
+
+    @SuppressWarnings("unchecked")
+    private void doSaveAction() {
+        if (mAdapter == null || mAdapter.mAccounts == null) {
+            finish();
+            return;
+        }
+
+        setDisplayOnlyPhones(mDisplayPhones.isChecked());
+        setResult(RESULT_OK);
+
+        final ArrayList<ContentProviderOperation> diff = mAdapter.mAccounts.buildDiff();
+        if (diff.isEmpty()) {
+            finish();
+            return;
+        }
+
+        new UpdateTask(this).execute(diff);
+    }
+
+    /**
+     * Background task that persists changes to {@link Groups#GROUP_VISIBLE},
+     * showing spinner dialog to user while updating.
+     */
+    public static class UpdateTask extends
+            WeakAsyncTask<ArrayList<ContentProviderOperation>, Void, Void, Activity> {
+        private ProgressDialog mProgress;
+
+        public UpdateTask(Activity target) {
+            super(target);
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        protected void onPreExecute(Activity target) {
+            final Context context = target;
+
+            mProgress = ProgressDialog.show(
+                    context, null, context.getText(R.string.savingDisplayGroups));
+
+            // Before starting this task, start an empty service to protect our
+            // process from being reclaimed by the system.
+            context.startService(new Intent(context, EmptyService.class));
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        protected Void doInBackground(
+                Activity target, ArrayList<ContentProviderOperation>... params) {
+            final Context context = target;
+            final ContentValues values = new ContentValues();
+            final ContentResolver resolver = context.getContentResolver();
+
+            try {
+                final ArrayList<ContentProviderOperation> diff = params[0];
+                resolver.applyBatch(ContactsContract.AUTHORITY, diff);
+            } catch (RemoteException e) {
+                Log.e(TAG, "Problem saving display groups", e);
+            } catch (OperationApplicationException e) {
+                Log.e(TAG, "Problem saving display groups", e);
+            }
+
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        protected void onPostExecute(Activity target, Void result) {
+            final Context context = target;
+
+            try {
+                mProgress.dismiss();
+            } catch (Exception e) {
+                Log.e(TAG, "Error dismissing progress dialog", e);
+            }
+
+            target.finish();
+
+            // Stop the service that was protecting us
+            context.stopService(new Intent(context, EmptyService.class));
+        }
+    }
+
+    @Override
+    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+            boolean globalSearch) {
+        if (globalSearch) {
+            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+        } else {
+            ContactsSearchManager.startSearch(this, initialQuery);
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
new file mode 100644
index 0000000..bd43afc
--- /dev/null
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -0,0 +1,268 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+/**
+ * Fragment containing a contact list used for browsing (as compared to
+ * picking a contact with one of the PICK intents).
+ */
+public class DefaultContactBrowseListFragment extends ContactBrowseListFragment
+        implements ContactListFilterController.ContactListFilterListener {
+
+    private static final String KEY_EDIT_MODE = "editMode";
+    private static final String KEY_CREATE_CONTACT_ENABLED = "createContactEnabled";
+    private static final String KEY_FILTER_ENABLED = "filterEnabled";
+
+    private static final int REQUEST_CODE_CUSTOMIZE_FILTER = 3;
+
+    private boolean mEditMode;
+    private boolean mCreateContactEnabled;
+    private View mCounterHeaderView;
+    private View mSearchHeaderView;
+
+    private boolean mFilterEnabled;
+    private ContactListFilterController mFilterController;
+
+    public DefaultContactBrowseListFragment() {
+        setPhotoLoaderEnabled(true);
+        setSectionHeaderDisplayEnabled(true);
+        setAizyEnabled(true);
+    }
+
+    public void setContactListFilterController(ContactListFilterController filterController) {
+        mFilterController = filterController;
+        mFilterController.addListener(this);
+    }
+
+    @Override
+    public void onDetach() {
+        if (mFilterController != null) {
+            mFilterController.removeListener(this);
+        }
+        super.onDetach();
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putBoolean(KEY_EDIT_MODE, mEditMode);
+        outState.putBoolean(KEY_CREATE_CONTACT_ENABLED, mCreateContactEnabled);
+        outState.putBoolean(KEY_FILTER_ENABLED, mFilterEnabled);
+    }
+
+    @Override
+    public void restoreSavedState(Bundle savedState) {
+        super.restoreSavedState(savedState);
+
+        if (savedState == null) {
+            return;
+        }
+
+        mEditMode = savedState.getBoolean(KEY_EDIT_MODE);
+        mCreateContactEnabled = savedState.getBoolean(KEY_CREATE_CONTACT_ENABLED);
+        setFilterEnabled(savedState.getBoolean(KEY_FILTER_ENABLED));
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        ContactListAdapter adapter = getAdapter();
+        if (isEditMode()) {
+            if (position == 0 && !isSearchMode() && isCreateContactEnabled()) {
+                createNewContact();
+            } else {
+                editContact(adapter.getContactUri(position));
+            }
+        } else {
+            viewContact(adapter.getContactUri(position));
+        }
+    }
+
+    @Override
+    protected ContactListAdapter createListAdapter() {
+        DefaultContactListAdapter adapter = new DefaultContactListAdapter(getContext());
+        adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
+        adapter.setDisplayPhotos(true);
+        return adapter;
+    }
+
+    @Override
+    protected void configureAdapter() {
+        super.configureAdapter();
+
+        DefaultContactListAdapter adapter = (DefaultContactListAdapter)getAdapter();
+        if (adapter != null && mFilterEnabled && mFilterController != null) {
+            adapter.setFilter(mFilterController.getFilter(), mFilterController.getFilterList());
+        }
+    }
+
+    @Override
+    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+        return inflater.inflate(R.layout.contacts_list_content, null);
+    }
+
+    @Override
+    protected void onCreateView(LayoutInflater inflater, ViewGroup container) {
+        super.onCreateView(inflater, container);
+
+        // Putting the header view inside a container will allow us to make
+        // it invisible later. See checkHeaderViewVisibility()
+        FrameLayout headerContainer = new FrameLayout(inflater.getContext());
+        mCounterHeaderView = inflater.inflate(R.layout.total_contacts, null, false);
+        headerContainer.addView(mCounterHeaderView);
+        mSearchHeaderView = inflater.inflate(R.layout.search_header, null, false);
+        headerContainer.addView(mSearchHeaderView);
+        getListView().addHeaderView(headerContainer);
+        checkHeaderViewVisibility();
+    }
+
+    @Override
+    public void setSearchMode(boolean flag) {
+        super.setSearchMode(flag);
+        checkHeaderViewVisibility();
+    }
+
+    private void checkHeaderViewVisibility() {
+        if (mCounterHeaderView != null) {
+            mCounterHeaderView.setVisibility(isSearchMode() ? View.GONE : View.VISIBLE);
+        }
+
+        // Hide the search header by default. See showCount().
+        if (mSearchHeaderView != null) {
+            mSearchHeaderView.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    protected void showCount(int partitionIndex, Cursor data) {
+        if (!isSearchMode() && data != null) {
+            int count = data.getCount();
+            // TODO
+            // if (contactsListActivity.mDisplayOnlyPhones) {
+            // text = contactsListActivity.getQuantityText(count,
+            // R.string.listTotalPhoneContactsZero,
+            // R.plurals.listTotalPhoneContacts);
+            TextView textView = (TextView)mCounterHeaderView.findViewById(R.id.totalContactsText);
+            String text = getQuantityText(count, R.string.listTotalAllContactsZero,
+                    R.plurals.listTotalAllContacts);
+            textView.setText(text);
+        } else {
+            ContactListAdapter adapter = getAdapter();
+            if (adapter == null) {
+                return;
+            }
+
+            // In search mode we only display the header if there is nothing found
+            if (!adapter.areAllPartitionsEmpty()) {
+                mSearchHeaderView.setVisibility(View.GONE);
+            } else {
+                TextView textView = (TextView) mSearchHeaderView.findViewById(
+                        R.id.totalContactsText);
+                ProgressBar progress = (ProgressBar) mSearchHeaderView.findViewById(
+                        R.id.progress);
+                if (adapter.isLoading()) {
+                    textView.setText(R.string.search_results_searching);
+                    progress.setVisibility(View.VISIBLE);
+                } else {
+                    textView.setText(R.string.listFoundAllContactsZero);
+                    progress.setVisibility(View.GONE);
+                }
+                mSearchHeaderView.setVisibility(View.VISIBLE);
+            }
+        }
+    }
+
+    public boolean isEditMode() {
+        return mEditMode;
+    }
+
+    public void setEditMode(boolean flag) {
+        mEditMode = flag;
+    }
+
+    public boolean isFilterEnabled() {
+        return mFilterEnabled;
+    }
+
+    public void setFilterEnabled(boolean flag) {
+        this.mFilterEnabled = flag;
+    }
+
+    public boolean isCreateContactEnabled() {
+        return mCreateContactEnabled;
+    }
+
+    public void setCreateContactEnabled(boolean flag) {
+        this.mCreateContactEnabled = flag;
+    }
+
+    @Override
+    protected void startLoading() {
+        if (mFilterController != null && !mFilterController.isLoaded()) {
+            mFilterController.startLoading();
+        }
+
+        if (!mFilterEnabled || mFilterController == null || mFilterController.isLoaded()) {
+            super.startLoading();
+        }
+    }
+
+    @Override
+    protected void onPartitionLoaded(int partitionIndex, Cursor data) {
+        super.onPartitionLoaded(partitionIndex, data);
+        if (mFilterController != null) {
+            mFilterController.postDelayedRefresh();
+        }
+    }
+
+    @Override
+    public void onContactListFiltersLoaded() {
+        if (mFilterEnabled) {
+            // Filters have been loaded - now we can start loading the list itself
+            startLoading();
+        }
+    }
+
+    @Override
+    public void onContactListFilterChanged() {
+        reloadData();
+    }
+
+    @Override
+    public void onContactListFilterCustomizationRequest() {
+        startActivityForResult(new Intent(getContext(), CustomContactListFilterActivity.class),
+                REQUEST_CODE_CUSTOMIZE_FILTER);
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (requestCode == REQUEST_CODE_CUSTOMIZE_FILTER && resultCode == Activity.RESULT_OK) {
+            mFilterController.selectCustomFilter();
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/DefaultContactListAdapter.java b/src/com/android/contacts/list/DefaultContactListAdapter.java
new file mode 100644
index 0000000..ede3597
--- /dev/null
+++ b/src/com/android/contacts/list/DefaultContactListAdapter.java
@@ -0,0 +1,205 @@
+/*
+ * 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 com.android.contacts.preference.ContactsPreferences;
+
+import android.content.Context;
+import android.content.CursorLoader;
+import android.content.SharedPreferences;
+import android.database.Cursor;
+import android.net.Uri;
+import android.net.Uri.Builder;
+import android.preference.PreferenceManager;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.Directory;
+import android.provider.ContactsContract.RawContacts;
+import android.text.TextUtils;
+import android.view.View;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A cursor adapter for the {@link ContactsContract.Contacts#CONTENT_TYPE} content type.
+ */
+public class DefaultContactListAdapter extends ContactListAdapter {
+
+    public DefaultContactListAdapter(Context context) {
+        super(context);
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+
+        ContactListFilter filter = getFilter();
+        if (isSearchMode()) {
+            String query = getQueryString();
+            Builder builder = Contacts.CONTENT_FILTER_URI.buildUpon();
+            if (TextUtils.isEmpty(query)) {
+                builder.appendPath("");
+            } else {
+                builder.appendPath(query);      // Builder will encode the query
+            }
+            builder.appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY,
+                    String.valueOf(directoryId));
+            if (directoryId != Directory.DEFAULT && directoryId != Directory.LOCAL_INVISIBLE) {
+                builder.appendQueryParameter(ContactsContract.LIMIT_PARAM_KEY,
+                        String.valueOf(getDirectoryResultLimit()));
+            }
+            loader.setUri(builder.build());
+            loader.setProjection(FILTER_PROJECTION);
+        } else {
+            configureUri(loader, directoryId, filter);
+            configureProjection(loader, directoryId, filter);
+            configureSelection(loader, directoryId, filter);
+        }
+
+        String sortOrder;
+        if (getSortOrder() == ContactsContract.Preferences.SORT_ORDER_PRIMARY) {
+            sortOrder = Contacts.SORT_KEY_PRIMARY;
+        } else {
+            sortOrder = Contacts.SORT_KEY_ALTERNATIVE;
+        }
+
+        loader.setSortOrder(sortOrder);
+    }
+
+    protected void configureUri(CursorLoader loader, long directoryId, ContactListFilter filter) {
+        Uri uri;
+        if (filter != null && filter.groupId != 0) {
+            uri = Data.CONTENT_URI;
+        } else {
+            uri = Contacts.CONTENT_URI;
+        }
+
+        if (directoryId == Directory.DEFAULT && isSectionHeaderDisplayEnabled()) {
+            uri = buildSectionIndexerUri(uri);
+        }
+
+        // The "All accounts" filter is the same as the entire contents of Directory.DEFAULT
+        if (filter != null && filter.filterType != ContactListFilter.FILTER_TYPE_CUSTOM) {
+            uri = uri.buildUpon().appendQueryParameter(
+                    ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(Directory.DEFAULT))
+                    .build();
+        }
+        loader.setUri(uri);
+    }
+
+    protected void configureProjection(
+            CursorLoader loader, long directoryId, ContactListFilter filter) {
+        if (filter != null && filter.groupId != 0) {
+            loader.setProjection(PROJECTION_DATA);
+        } else {
+            loader.setProjection(PROJECTION_CONTACT);
+        }
+    }
+
+    private void configureSelection(
+            CursorLoader loader, long directoryId, ContactListFilter filter) {
+        if (filter == null) {
+            return;
+        }
+
+        if (directoryId != Directory.DEFAULT) {
+            return;
+        }
+
+        StringBuilder selection = new StringBuilder();
+        List<String> selectionArgs = new ArrayList<String>();
+
+        switch (filter.filterType) {
+            case ContactListFilter.FILTER_TYPE_ALL_ACCOUNTS: {
+                // We have already added directory=0 to the URI, which takes care of this
+                // filter
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_STARRED: {
+                selection.append(Contacts.STARRED + "!=0");
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_WITH_PHONE_NUMBERS_ONLY: {
+                selection.append(Contacts.HAS_PHONE_NUMBER + "=1");
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_CUSTOM: {
+                selection.append(Contacts.IN_VISIBLE_GROUP + "=1");
+                if (isCustomFilterForPhoneNumbersOnly()) {
+                    selection.append(" AND " + Contacts.HAS_PHONE_NUMBER + "=1");
+                }
+                break;
+            }
+            case ContactListFilter.FILTER_TYPE_ACCOUNT:
+            case ContactListFilter.FILTER_TYPE_GROUP: {
+                if (filter.groupId != 0) {
+                    selection.append(Data.MIMETYPE + "=?"
+                            + " AND " + GroupMembership.GROUP_ROW_ID + "=?");
+                    selectionArgs.add(GroupMembership.CONTENT_ITEM_TYPE);
+                    selectionArgs.add(String.valueOf(filter.groupId));
+                } else {
+                    // TODO: avoid the use of private API
+                    selection.append(
+                            Contacts._ID + " IN ("
+                                    + "SELECT " + RawContacts.CONTACT_ID
+                                    + " FROM raw_contacts"
+                                    + " WHERE " + RawContacts.ACCOUNT_TYPE + "=?"
+                                    + "   AND " + RawContacts.ACCOUNT_NAME + "=?)");
+                    selectionArgs.add(filter.accountType);
+                    selectionArgs.add(filter.accountName);
+                }
+                break;
+            }
+        }
+        loader.setSelection(selection.toString());
+        loader.setSelectionArgs(selectionArgs.toArray(new String[0]));
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        final ContactListItemView view = (ContactListItemView)itemView;
+
+        view.setHighlightedPrefix(getUpperCaseQueryString());
+
+        if (isSelectionVisible()) {
+            view.setActivated(isSelectedContact(partition, cursor));
+        }
+
+        bindSectionHeaderAndDivider(view, position);
+
+        if (isQuickContactEnabled()) {
+            bindQuickContact(view, partition, cursor);
+        } else {
+            bindPhoto(view, partition, cursor);
+        }
+
+        bindName(view, cursor);
+        bindPresence(view, cursor);
+
+        if (isSearchMode()) {
+            bindSearchSnippet(view, cursor);
+        }
+    }
+
+    private boolean isCustomFilterForPhoneNumbersOnly() {
+        // TODO: this flag should not be stored in shared prefs.  It needs to be in the db.
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
+        return prefs.getBoolean(ContactsPreferences.PREF_DISPLAY_ONLY_PHONES,
+                ContactsPreferences.PREF_DISPLAY_ONLY_PHONES_DEFAULT);
+    }
+}
diff --git a/src/com/android/contacts/list/DirectoryListLoader.java b/src/com/android/contacts/list/DirectoryListLoader.java
new file mode 100644
index 0000000..c2505e1
--- /dev/null
+++ b/src/com/android/contacts/list/DirectoryListLoader.java
@@ -0,0 +1,172 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.content.AsyncTaskLoader;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.database.ContentObserver;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.net.Uri;
+import android.os.Handler;
+import android.provider.ContactsContract.Directory;
+import android.text.TextUtils;
+import android.util.Log;
+
+/**
+ * A specialized loader for the list of directories, see {@link Directory}.
+ */
+public class DirectoryListLoader extends AsyncTaskLoader<Cursor> {
+
+    private static final String TAG = "ContactEntryListAdapter";
+
+    private static final class DirectoryQuery {
+        public static final Uri URI = Directory.CONTENT_URI;
+        public static final String ORDER_BY = Directory._ID;
+
+        public static final String[] PROJECTION = {
+            Directory._ID,
+            Directory.PACKAGE_NAME,
+            Directory.TYPE_RESOURCE_ID,
+            Directory.DISPLAY_NAME,
+            Directory.PHOTO_SUPPORT,
+        };
+
+        public static final int ID = 0;
+        public static final int PACKAGE_NAME = 1;
+        public static final int TYPE_RESOURCE_ID = 2;
+        public static final int DISPLAY_NAME = 3;
+        public static final int PHOTO_SUPPORT = 4;
+    }
+
+    public static final String DIRECTORY_TYPE = "directoryType";
+
+    private static final String[] RESULT_PROJECTION = {
+        Directory._ID,
+        DIRECTORY_TYPE,
+        Directory.DISPLAY_NAME,
+        Directory.PHOTO_SUPPORT,
+    };
+
+    private final ContentObserver mObserver = new ContentObserver(new Handler()) {
+        @Override
+        public void onChange(boolean selfChange) {
+            forceLoad();
+        }
+    };
+
+    private boolean mDirectorySearchEnabled;
+    private boolean mLocalInvisibleDirectoryEnabled;
+
+    private MatrixCursor mDefaultDirectoryList;
+
+    public DirectoryListLoader(Context context) {
+        super(context);
+    }
+
+    public void setDirectorySearchEnabled(boolean flag) {
+        mDirectorySearchEnabled = flag;
+    }
+
+    /**
+     * A flag that indicates whether the {@link Directory#LOCAL_INVISIBLE} directory should
+     * be included in the results.
+     */
+    public void setLocalInvisibleDirectoryEnabled(boolean flag) {
+        this.mLocalInvisibleDirectoryEnabled = flag;
+    }
+
+    @Override
+    public void startLoading() {
+        getContext().getContentResolver().
+                registerContentObserver(Directory.CONTENT_URI, false, mObserver);
+        forceLoad();
+    }
+
+    @Override
+    public void stopLoading() {
+        getContext().getContentResolver().unregisterContentObserver(mObserver);
+    }
+
+    @Override
+    public Cursor loadInBackground() {
+        if (mDirectorySearchEnabled) {
+            return loadDirectories();
+        } else {
+            return getDefaultDirectories();
+        }
+    }
+
+    private Cursor loadDirectories() {
+        MatrixCursor result = new MatrixCursor(RESULT_PROJECTION);
+        Context context = getContext();
+        PackageManager pm = context.getPackageManager();
+        String selection = mLocalInvisibleDirectoryEnabled
+                ? null
+                : Directory._ID + "!=" + Directory.LOCAL_INVISIBLE;
+        Cursor cursor = context.getContentResolver().query(DirectoryQuery.URI,
+                DirectoryQuery.PROJECTION, selection, null, DirectoryQuery.ORDER_BY);
+        try {
+            while(cursor.moveToNext()) {
+                Object[] row = new Object[RESULT_PROJECTION.length];
+                long directoryId = cursor.getLong(DirectoryQuery.ID);
+                String directoryType = null;
+
+                String packageName = cursor.getString(DirectoryQuery.PACKAGE_NAME);
+                int typeResourceId = cursor.getInt(DirectoryQuery.TYPE_RESOURCE_ID);
+                if (!TextUtils.isEmpty(packageName) && typeResourceId != 0) {
+                    try {
+                        directoryType = pm.getResourcesForApplication(packageName)
+                                .getString(typeResourceId);
+                    } catch (Exception e) {
+                        Log.e(TAG, "Cannot obtain directory type from package: " + packageName);
+                    }
+                }
+                String displayName = cursor.getString(DirectoryQuery.DISPLAY_NAME);
+                int photoSupport = cursor.getInt(DirectoryQuery.PHOTO_SUPPORT);
+                result.addRow(new Object[]{directoryId, directoryType, displayName, photoSupport});
+            }
+        } finally {
+            cursor.close();
+        }
+        return result;
+    }
+
+    private Cursor getDefaultDirectories() {
+        if (mDefaultDirectoryList == null) {
+            mDefaultDirectoryList = new MatrixCursor(RESULT_PROJECTION);
+            mDefaultDirectoryList.addRow(new Object[] {
+                    Directory.DEFAULT,
+                    getContext().getString(R.string.contactsList),
+                    null
+            });
+            mDefaultDirectoryList.addRow(new Object[] {
+                    Directory.LOCAL_INVISIBLE,
+                    getContext().getString(R.string.local_invisible_directory),
+                    null
+            });
+        }
+        return mDefaultDirectoryList;
+    }
+
+    @Override
+    public void destroy() {
+        stopLoading();
+    }
+}
diff --git a/src/com/android/contacts/list/DirectoryPartition.java b/src/com/android/contacts/list/DirectoryPartition.java
new file mode 100644
index 0000000..47a1037
--- /dev/null
+++ b/src/com/android/contacts/list/DirectoryPartition.java
@@ -0,0 +1,109 @@
+/*
+ * 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 com.android.common.widget.CompositeCursorAdapter;
+
+import android.provider.ContactsContract.Directory;
+
+/**
+ * Model object for a {@link Directory} row.
+ */
+public final class DirectoryPartition extends CompositeCursorAdapter.Partition {
+
+    public static final int STATUS_NOT_LOADED = 0;
+    public static final int STATUS_LOADING = 1;
+    public static final int STATUS_LOADED = 2;
+
+    private long mDirectoryId;
+    private String mDirectoryType;
+    private String mDisplayName;
+    private int mStatus;
+    private boolean mPriorityDirectory;
+    private boolean mPhotoSupported;
+
+    public DirectoryPartition(boolean showIfEmpty, boolean hasHeader) {
+        super(showIfEmpty, hasHeader);
+    }
+
+    /**
+     * Directory ID, see {@link Directory}.
+     */
+    public long getDirectoryId() {
+        return mDirectoryId;
+    }
+
+    public void setDirectoryId(long directoryId) {
+        this.mDirectoryId = directoryId;
+    }
+
+    /**
+     * Directory type resolved from {@link Directory#PACKAGE_NAME} and
+     * {@link Directory#TYPE_RESOURCE_ID};
+     */
+    public String getDirectoryType() {
+        return mDirectoryType;
+    }
+
+    public void setDirectoryType(String directoryType) {
+        this.mDirectoryType = directoryType;
+    }
+
+    /**
+     * See {@link Directory#DISPLAY_NAME}.
+     */
+    public String getDisplayName() {
+        return mDisplayName;
+    }
+
+    public void setDisplayName(String displayName) {
+        this.mDisplayName = displayName;
+    }
+
+    public int getStatus() {
+        return mStatus;
+    }
+
+    public void setStatus(int status) {
+        mStatus = status;
+    }
+
+    public boolean isLoading() {
+        return mStatus == STATUS_NOT_LOADED || mStatus == STATUS_LOADING;
+    }
+
+    /**
+     * Returns true if this directory should be loaded before non-priority directories.
+     */
+    public boolean isPriorityDirectory() {
+        return mPriorityDirectory;
+    }
+
+    public void setPriorityDirectory(boolean priorityDirectory) {
+        mPriorityDirectory = priorityDirectory;
+    }
+
+    /**
+     * Returns true if this directory supports photos.
+     */
+    public boolean isPhotoSupported() {
+        return mPhotoSupported;
+    }
+
+    public void setPhotoSupported(boolean flag) {
+        this.mPhotoSupported = flag;
+    }
+}
diff --git a/src/com/android/contacts/list/JoinContactListAdapter.java b/src/com/android/contacts/list/JoinContactListAdapter.java
new file mode 100644
index 0000000..c72ebcd
--- /dev/null
+++ b/src/com/android/contacts/list/JoinContactListAdapter.java
@@ -0,0 +1,233 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.net.Uri;
+import android.net.Uri.Builder;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Contacts.AggregationSuggestions;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+public class JoinContactListAdapter extends ContactListAdapter {
+
+    /** Maximum number of suggestions shown for joining aggregates */
+    private static final int MAX_SUGGESTIONS = 4;
+
+    public static final int PARTITION_SUGGESTIONS = 0;
+    public static final int PARTITION_SHOW_ALL_CONTACTS = 1;
+    public static final int PARTITION_ALL_CONTACTS = 2;
+
+    private long mTargetContactId;
+
+    private int mShowAllContactsViewType;
+
+    /**
+     * Determines whether we display a list item with the label
+     * "Show all contacts" or actually show all contacts
+     */
+    private boolean mAllContactsListShown;
+
+
+    public JoinContactListAdapter(Context context) {
+        super(context);
+        setPinnedPartitionHeadersEnabled(true);
+        setSectionHeaderDisplayEnabled(true);
+        setIndexedPartition(PARTITION_ALL_CONTACTS);
+        setDirectorySearchEnabled(false);
+        mShowAllContactsViewType = getViewTypeCount() - 1;
+    }
+
+    @Override
+    protected void addPartitions() {
+
+        // Partition 0: suggestions
+        addPartition(false, true);
+
+        // Partition 1: "Show all contacts"
+        addPartition(false, false);
+
+        // Partition 2: All contacts
+        addPartition(createDefaultDirectoryPartition());
+    }
+
+    public void setTargetContactId(long targetContactId) {
+        this.mTargetContactId = targetContactId;
+    }
+
+    @Override
+    public void configureLoader(CursorLoader cursorLoader, long directoryId) {
+        JoinContactLoader loader = (JoinContactLoader)cursorLoader;
+        loader.setLoadSuggestionsAndAllContacts(mAllContactsListShown);
+
+        Builder builder = Contacts.CONTENT_URI.buildUpon();
+        builder.appendEncodedPath(String.valueOf(mTargetContactId));
+        builder.appendEncodedPath(AggregationSuggestions.CONTENT_DIRECTORY);
+
+        String filter = getQueryString();
+        if (!TextUtils.isEmpty(filter)) {
+            builder.appendEncodedPath(Uri.encode(filter));
+        }
+
+        builder.appendQueryParameter("limit", String.valueOf(MAX_SUGGESTIONS));
+
+        loader.setSuggestionUri(builder.build());
+
+        // TODO simplify projection
+        loader.setProjection(PROJECTION_CONTACT);
+        loader.setUri(buildSectionIndexerUri(Contacts.CONTENT_URI));
+        loader.setSelection(Contacts.IN_VISIBLE_GROUP + "=1 AND " + Contacts._ID + "!=?");
+        loader.setSelectionArgs(new String[]{String.valueOf(mTargetContactId)});
+        if (getSortOrder() == ContactsContract.Preferences.SORT_ORDER_PRIMARY) {
+            loader.setSortOrder(Contacts.SORT_KEY_PRIMARY);
+        } else {
+            loader.setSortOrder(Contacts.SORT_KEY_ALTERNATIVE);
+        }
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return false;
+    }
+
+    public boolean isAllContactsListShown() {
+        return mAllContactsListShown;
+    }
+
+    public void setAllContactsListShown(boolean flag) {
+        mAllContactsListShown = flag;
+    }
+
+    public void setSuggestionsCursor(Cursor cursor) {
+        changeCursor(PARTITION_SUGGESTIONS, cursor);
+        if (cursor != null && cursor.getCount() != 0 && !mAllContactsListShown) {
+            changeCursor(PARTITION_SHOW_ALL_CONTACTS, getShowAllContactsLabelCursor());
+        } else {
+            changeCursor(PARTITION_SHOW_ALL_CONTACTS, null);
+        }
+    }
+
+    @Override
+    public void changeCursor(Cursor cursor) {
+        changeCursor(PARTITION_ALL_CONTACTS, cursor);
+    }
+
+    @Override
+    public void configureDefaultPartition(boolean showIfEmpty, boolean hasHeader) {
+         // Don't change default partition parameters from these defaults
+        super.configureDefaultPartition(false, true);
+    }
+
+    @Override
+    public int getViewTypeCount() {
+        return super.getViewTypeCount() + 1;
+    }
+
+    @Override
+    public int getItemViewType(int partition, int position) {
+        if (partition == PARTITION_SHOW_ALL_CONTACTS) {
+            return mShowAllContactsViewType;
+        }
+        return super.getItemViewType(partition, position);
+    }
+
+    @Override
+    protected View newHeaderView(Context context, int partition, Cursor cursor,
+            ViewGroup parent) {
+        switch (partition) {
+            case PARTITION_SUGGESTIONS: {
+              TextView view = (TextView) inflate(R.layout.list_separator, parent);
+              view.setText(R.string.separatorJoinAggregateSuggestions);
+              return view;
+            }
+            case PARTITION_ALL_CONTACTS: {
+              TextView view = (TextView) inflate(R.layout.list_separator, parent);
+              view.setText(R.string.separatorJoinAggregateAll);
+              return view;
+            }
+        }
+
+        return null;
+    }
+
+    @Override
+    protected void bindHeaderView(View view, int partitionIndex, Cursor cursor) {
+        // Header views are static - nothing needs to be bound
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        switch (partition) {
+            case PARTITION_SUGGESTIONS:
+            case PARTITION_ALL_CONTACTS:
+                return super.newView(context, partition, cursor, position, parent);
+            case PARTITION_SHOW_ALL_CONTACTS:
+                return inflate(R.layout.contacts_list_show_all_item, parent);
+        }
+        return null;
+    }
+
+    private View inflate(int layoutId, ViewGroup parent) {
+        return LayoutInflater.from(getContext()).inflate(layoutId, parent, false);
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        switch (partition) {
+            case PARTITION_SUGGESTIONS: {
+                final ContactListItemView view = (ContactListItemView)itemView;
+                bindPhoto(view, partition, cursor);
+                bindName(view, cursor);
+                break;
+            }
+            case PARTITION_SHOW_ALL_CONTACTS: {
+                break;
+            }
+            case PARTITION_ALL_CONTACTS: {
+                final ContactListItemView view = (ContactListItemView)itemView;
+                bindSectionHeaderAndDivider(view, position);
+                bindPhoto(view, partition, cursor);
+                bindName(view, cursor);
+                break;
+            }
+        }
+    }
+
+    public Cursor getShowAllContactsLabelCursor() {
+        MatrixCursor matrixCursor = new MatrixCursor(PROJECTION_CONTACT);
+        Object[] row = new Object[PROJECTION_CONTACT.length];
+        matrixCursor.addRow(row);
+        return matrixCursor;
+    }
+
+    @Override
+    public Uri getContactUri(int partitionIndex, Cursor cursor) {
+        long contactId = cursor.getLong(CONTACT_ID_COLUMN_INDEX);
+        String lookupKey = cursor.getString(CONTACT_LOOKUP_KEY_COLUMN_INDEX);
+        return Contacts.getLookupUri(contactId, lookupKey);
+    }
+}
diff --git a/src/com/android/contacts/list/JoinContactListFragment.java b/src/com/android/contacts/list/JoinContactListFragment.java
new file mode 100644
index 0000000..e17fbbf
--- /dev/null
+++ b/src/com/android/contacts/list/JoinContactListFragment.java
@@ -0,0 +1,166 @@
+/*
+ * 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 com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+
+import android.app.Activity;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.ContentUris;
+import android.content.CursorLoader;
+import android.content.Intent;
+import android.content.Loader;
+import android.database.Cursor;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Fragment for the Join Contact list.
+ */
+public class JoinContactListFragment extends ContactEntryListFragment<JoinContactListAdapter> {
+
+    private static final int DISPLAY_NAME_LOADER = -2;
+
+    private OnContactPickerActionListener mListener;
+    private long mTargetContactId;
+    private boolean mAllContactsListShown = false;
+
+    private LoaderCallbacks<Cursor> mLoaderCallbacks = new LoaderCallbacks<Cursor>() {
+
+        @Override
+        public Loader<Cursor> onCreateLoader(int id, Bundle args) {
+            switch (id) {
+                case DISPLAY_NAME_LOADER: {
+                    // Loader for the display name of the target contact
+                    return new CursorLoader(getActivity(),
+                            ContentUris.withAppendedId(Contacts.CONTENT_URI, mTargetContactId),
+                            new String[] { Contacts.DISPLAY_NAME }, null, null, null);
+                }
+                case JoinContactListAdapter.PARTITION_ALL_CONTACTS: {
+                    JoinContactLoader loader = new JoinContactLoader(getActivity());
+                    JoinContactListAdapter adapter = getAdapter();
+                    if (adapter != null) {
+                        adapter.configureLoader(loader, 0);
+                    }
+                    return loader;
+                }
+            }
+            throw new IllegalArgumentException("No loader for ID=" + id);
+        }
+
+        @Override
+        public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
+            switch (loader.getId()) {
+                case DISPLAY_NAME_LOADER: {
+                    if (data != null && data.moveToFirst()) {
+                        showTargetContactName(data.getString(0));
+                    }
+                    break;
+                }
+                case JoinContactListAdapter.PARTITION_ALL_CONTACTS: {
+                    setAizyEnabled(mAllContactsListShown);
+
+                    JoinContactListAdapter adapter = getAdapter();
+                    Cursor suggestionsCursor = ((JoinContactLoader)loader).getSuggestionsCursor();
+                    adapter.setSuggestionsCursor(suggestionsCursor);
+                    onPartitionLoaded(JoinContactListAdapter.PARTITION_ALL_CONTACTS, data);
+                    break;
+                }
+            }
+        }
+    };
+
+    public JoinContactListFragment() {
+        setPhotoLoaderEnabled(true);
+        setSectionHeaderDisplayEnabled(true);
+        setAizyEnabled(false);
+    }
+
+    public void setOnContactPickerActionListener(OnContactPickerActionListener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    protected void startLoading() {
+        configureAdapter();
+
+        getLoaderManager().initLoader(DISPLAY_NAME_LOADER, null, mLoaderCallbacks);
+        getLoaderManager().initLoader(JoinContactListAdapter.PARTITION_ALL_CONTACTS,
+                null, mLoaderCallbacks);
+    }
+
+    private void showTargetContactName(String displayName) {
+        Activity activity = getActivity();
+        TextView blurbView = (TextView)activity.findViewById(R.id.join_contact_blurb);
+        String blurb = activity.getString(R.string.blurbJoinContactDataWith, displayName);
+        blurbView.setText(blurb);
+    }
+
+    public void setTargetContactId(long targetContactId) {
+        mTargetContactId = targetContactId;
+    }
+
+    @Override
+    public JoinContactListAdapter createListAdapter() {
+        return new JoinContactListAdapter(getActivity());
+    }
+
+    @Override
+    protected void configureAdapter() {
+        super.configureAdapter();
+        JoinContactListAdapter adapter = getAdapter();
+        adapter.setAllContactsListShown(mAllContactsListShown);
+        adapter.setTargetContactId(mTargetContactId);
+    }
+
+    @Override
+    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+        return inflater.inflate(R.layout.contacts_list_content_join, null);
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        JoinContactListAdapter adapter = getAdapter();
+        int partition = adapter.getPartitionForPosition(position);
+        if (partition == JoinContactListAdapter.PARTITION_SHOW_ALL_CONTACTS) {
+            mAllContactsListShown = true;
+            configureAdapter();
+            getLoaderManager().restartLoader(JoinContactListAdapter.PARTITION_ALL_CONTACTS,
+                    null, mLoaderCallbacks);
+        } else {
+            mListener.onPickContactAction(adapter.getContactUri(position));
+        }
+    }
+
+    @Override
+    public void startSearch(String initialQuery) {
+        ContactsRequest request = new ContactsRequest();
+        request.setActionCode(ContactsRequest.ACTION_PICK_CONTACT);
+        request.setDirectorySearchEnabled(false);
+        ContactsSearchManager.startSearchForResult(getActivity(), initialQuery,
+                ACTIVITY_REQUEST_CODE_PICKER, request);
+    }
+
+    @Override
+    public void onPickerResult(Intent data) {
+        mListener.onPickContactAction(data.getData());
+    }
+}
diff --git a/src/com/android/contacts/list/JoinContactLoader.java b/src/com/android/contacts/list/JoinContactLoader.java
new file mode 100644
index 0000000..25c9ab4
--- /dev/null
+++ b/src/com/android/contacts/list/JoinContactLoader.java
@@ -0,0 +1,92 @@
+/*
+ * 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.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.net.Uri;
+
+/**
+ * A specialized loader for the Join Contacts UI.  It executes two queries:
+ * join suggestions and (optionally) the full contact list.
+ */
+public class JoinContactLoader extends CursorLoader {
+
+    private boolean mLoadSuggestionsAndAllContact;
+    private String[] mProjection;
+    private Uri mSuggestionUri;
+    private MatrixCursor mSuggestionsCursor;
+
+    public JoinContactLoader(Context context) {
+        super(context, null, null, null, null, null);
+    }
+
+    public void setLoadSuggestionsAndAllContacts(boolean flag) {
+        mLoadSuggestionsAndAllContact = flag;
+    }
+
+    public void setSuggestionUri(Uri uri) {
+        this.mSuggestionUri = uri;
+    }
+
+    @Override
+    public void setProjection(String[] projection) {
+        super.setProjection(projection);
+        this.mProjection = projection;
+    }
+
+    public Cursor getSuggestionsCursor() {
+        return mSuggestionsCursor;
+    }
+
+    @Override
+    public Cursor loadInBackground() {
+        // First execute the suggestions query, then call super.loadInBackground
+        // to load the entire list
+        mSuggestionsCursor = loadSuggestions();
+        if (!mLoadSuggestionsAndAllContact && mSuggestionsCursor.getCount() != 0) {
+            // In case we only need suggestions, send "0" as the search query, which
+            // will always return an empty cursor (but we can still register to
+            // listen for changes on it).
+            setSelection("0");
+            setSelectionArgs(null);
+        }
+        return super.loadInBackground();
+    }
+
+    /**
+     * Loads join suggestions into a MatrixCursor.
+     */
+    private MatrixCursor loadSuggestions() {
+        Cursor cursor = getContext().getContentResolver().query(mSuggestionUri, mProjection,
+                null, null, null);
+        try {
+            MatrixCursor matrix = new MatrixCursor(mProjection);
+            Object[] row = new Object[mProjection.length];
+            while (cursor.moveToNext()) {
+                for (int i = 0; i < row.length; i++) {
+                    row[i] = cursor.getString(i);
+                }
+                matrix.addRow(row);
+            }
+            return matrix;
+        } finally {
+            cursor.close();
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/list/LegacyContactListAdapter.java b/src/com/android/contacts/list/LegacyContactListAdapter.java
new file mode 100644
index 0000000..39c0b53
--- /dev/null
+++ b/src/com/android/contacts/list/LegacyContactListAdapter.java
@@ -0,0 +1,95 @@
+/*
+ * 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.content.ContentUris;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.Contacts.People;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A cursor adapter for the People.CONTENT_TYPE content type.
+ */
+@SuppressWarnings("deprecation")
+public class LegacyContactListAdapter extends ContactEntryListAdapter {
+
+    static final String[] PEOPLE_PROJECTION = new String[] {
+        People._ID,                         // 0
+        People.DISPLAY_NAME,                // 1
+        People.PHONETIC_NAME,               // 2
+        People.STARRED,                     // 3
+        People.PRESENCE_STATUS,             // 4
+    };
+
+    protected static final int PERSON_ID_COLUMN_INDEX = 0;
+    protected static final int PERSON_DISPLAY_NAME_COLUMN_INDEX = 1;
+    protected static final int PERSON_PHONETIC_NAME_COLUMN_INDEX = 2;
+    protected static final int PERSON_STARRED_COLUMN_INDEX = 3;
+    protected static final int PERSON_PRESENCE_STATUS_COLUMN_INDEX = 4;
+
+    private CharSequence mUnknownNameText;
+
+    public LegacyContactListAdapter(Context context) {
+        super(context);
+        mUnknownNameText = context.getText(android.R.string.unknownName);
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+        loader.setUri(People.CONTENT_URI);
+        loader.setProjection(PEOPLE_PROJECTION);
+        loader.setSortOrder(People.DISPLAY_NAME);
+    }
+
+    @Override
+    public String getContactDisplayName(int position) {
+        return ((Cursor)getItem(position)).getString(PERSON_DISPLAY_NAME_COLUMN_INDEX);
+    }
+
+    public Uri getPersonUri(int position) {
+        Cursor cursor = ((Cursor)getItem(position));
+        long personId = cursor.getLong(PERSON_ID_COLUMN_INDEX);
+        return ContentUris.withAppendedId(People.CONTENT_URI, personId);
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final ContactListItemView view = new ContactListItemView(context, null);
+        view.setUnknownNameText(mUnknownNameText);
+        return view;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        ContactListItemView view = (ContactListItemView)itemView;
+        bindName(view, cursor);
+        bindPresence(view, cursor);
+    }
+
+    protected void bindName(final ContactListItemView view, Cursor cursor) {
+        view.showDisplayName(cursor, PERSON_DISPLAY_NAME_COLUMN_INDEX, false, 0);
+        view.showPhoneticName(cursor, PERSON_PHONETIC_NAME_COLUMN_INDEX);
+    }
+
+    protected void bindPresence(final ContactListItemView view, Cursor cursor) {
+        view.showPresence(cursor, PERSON_PRESENCE_STATUS_COLUMN_INDEX);
+    }
+}
diff --git a/src/com/android/contacts/list/LegacyPhoneNumberListAdapter.java b/src/com/android/contacts/list/LegacyPhoneNumberListAdapter.java
new file mode 100644
index 0000000..47747fb
--- /dev/null
+++ b/src/com/android/contacts/list/LegacyPhoneNumberListAdapter.java
@@ -0,0 +1,108 @@
+/*
+ * 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.content.ContentUris;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.Contacts.People;
+import android.provider.Contacts.Phones;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A cursor adapter for the Phones.CONTENT_TYPE content type.
+ */
+@SuppressWarnings("deprecation")
+public class LegacyPhoneNumberListAdapter extends ContactEntryListAdapter {
+
+    private static final String[] PHONES_PROJECTION = new String[] {
+        Phones._ID,             // 0
+        Phones.TYPE,            // 1
+        Phones.LABEL,           // 2
+        Phones.NUMBER,          // 3
+        People.DISPLAY_NAME,    // 4
+        People.PHONETIC_NAME,   // 5
+    };
+
+    private static final int PHONE_ID_COLUMN_INDEX = 0;
+    private static final int PHONE_TYPE_COLUMN_INDEX = 1;
+    private static final int PHONE_LABEL_COLUMN_INDEX = 2;
+    private static final int PHONE_NUMBER_COLUMN_INDEX = 3;
+    private static final int PHONE_DISPLAY_NAME_COLUMN_INDEX = 4;
+    private static final int PHONE_PHONETIC_NAME_COLUMN_INDEX = 5;
+
+    private CharSequence mUnknownNameText;
+
+    public LegacyPhoneNumberListAdapter(Context context) {
+        super(context);
+        mUnknownNameText = context.getText(android.R.string.unknownName);
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+        loader.setUri(Phones.CONTENT_URI);
+        loader.setProjection(PHONES_PROJECTION);
+        loader.setSortOrder(Phones.DISPLAY_NAME);
+    }
+
+    @Override
+    public String getContactDisplayName(int position) {
+        return ((Cursor)getItem(position)).getString(PHONE_DISPLAY_NAME_COLUMN_INDEX);
+    }
+
+    public Uri getPhoneUri(int position) {
+        Cursor cursor = ((Cursor)getItem(position));
+        long id = cursor.getLong(PHONE_ID_COLUMN_INDEX);
+        return ContentUris.withAppendedId(Phones.CONTENT_URI, id);
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final ContactListItemView view = new ContactListItemView(context, null);
+        view.setUnknownNameText(mUnknownNameText);
+        return view;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        ContactListItemView view = (ContactListItemView)itemView;
+        bindName(view, cursor);
+        bindPhoneNumber(view, cursor);
+    }
+
+    protected void bindName(final ContactListItemView view, Cursor cursor) {
+        view.showDisplayName(cursor, PHONE_DISPLAY_NAME_COLUMN_INDEX, false, 0);
+        view.showPhoneticName(cursor, PHONE_PHONETIC_NAME_COLUMN_INDEX);
+    }
+
+    protected void bindPhoneNumber(ContactListItemView view, Cursor cursor) {
+        CharSequence label = null;
+        if (!cursor.isNull(PHONE_TYPE_COLUMN_INDEX)) {
+            final int type = cursor.getInt(PHONE_TYPE_COLUMN_INDEX);
+            final String customLabel = cursor.getString(PHONE_LABEL_COLUMN_INDEX);
+
+            // TODO cache
+            label = Phone.getTypeLabel(getContext().getResources(), type, customLabel);
+        }
+        view.setLabel(label);
+        view.showData(cursor, PHONE_NUMBER_COLUMN_INDEX);
+    }
+}
diff --git a/src/com/android/contacts/list/LegacyPostalAddressListAdapter.java b/src/com/android/contacts/list/LegacyPostalAddressListAdapter.java
new file mode 100644
index 0000000..3796c62
--- /dev/null
+++ b/src/com/android/contacts/list/LegacyPostalAddressListAdapter.java
@@ -0,0 +1,109 @@
+/*
+ * 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.content.ContentUris;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.Contacts.ContactMethods;
+import android.provider.Contacts.People;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A cursor adapter for the ContactMethods.CONTENT_TYPE content type.
+ */
+@SuppressWarnings("deprecation")
+public class LegacyPostalAddressListAdapter extends ContactEntryListAdapter {
+
+    static final String[] POSTALS_PROJECTION = new String[] {
+        ContactMethods._ID,     // 0
+        ContactMethods.TYPE,    // 1
+        ContactMethods.LABEL,   // 2
+        ContactMethods.DATA,    // 3
+        People.DISPLAY_NAME,    // 4
+        People.PHONETIC_NAME,   // 5
+    };
+
+    public static final int POSTAL_ID_COLUMN_INDEX = 0;
+    public static final int POSTAL_TYPE_COLUMN_INDEX = 1;
+    public static final int POSTAL_LABEL_COLUMN_INDEX = 2;
+    public static final int POSTAL_NUMBER_COLUMN_INDEX = 3;
+    public static final int POSTAL_DISPLAY_NAME_COLUMN_INDEX = 4;
+    public static final int POSTAL_PHONETIC_NAME_COLUMN_INDEX = 5;
+
+    private CharSequence mUnknownNameText;
+
+    public LegacyPostalAddressListAdapter(Context context) {
+        super(context);
+        mUnknownNameText = context.getText(android.R.string.unknownName);
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+        loader.setUri(ContactMethods.CONTENT_URI);
+        loader.setProjection(POSTALS_PROJECTION);
+        loader.setSortOrder(People.DISPLAY_NAME);
+        loader.setSelection(ContactMethods.KIND + "=" + android.provider.Contacts.KIND_POSTAL);
+    }
+
+    @Override
+    public String getContactDisplayName(int position) {
+        return ((Cursor)getItem(position)).getString(POSTAL_DISPLAY_NAME_COLUMN_INDEX);
+    }
+
+    public Uri getContactMethodUri(int position) {
+        Cursor cursor = ((Cursor)getItem(position));
+        long id = cursor.getLong(POSTAL_ID_COLUMN_INDEX);
+        return ContentUris.withAppendedId(ContactMethods.CONTENT_URI, id);
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final ContactListItemView view = new ContactListItemView(context, null);
+        view.setUnknownNameText(mUnknownNameText);
+        return view;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        ContactListItemView view = (ContactListItemView)itemView;
+        bindName(view, cursor);
+        bindPostalAddress(view, cursor);
+    }
+
+    protected void bindName(final ContactListItemView view, Cursor cursor) {
+        view.showDisplayName(cursor, POSTAL_DISPLAY_NAME_COLUMN_INDEX, false, 0);
+        view.showPhoneticName(cursor, POSTAL_PHONETIC_NAME_COLUMN_INDEX);
+    }
+
+    protected void bindPostalAddress(ContactListItemView view, Cursor cursor) {
+        CharSequence label = null;
+        if (!cursor.isNull(POSTAL_TYPE_COLUMN_INDEX)) {
+            final int type = cursor.getInt(POSTAL_TYPE_COLUMN_INDEX);
+            final String customLabel = cursor.getString(POSTAL_LABEL_COLUMN_INDEX);
+
+            // TODO cache
+            label = StructuredPostal.getTypeLabel(getContext().getResources(), type, customLabel);
+        }
+        view.setLabel(label);
+        view.showData(cursor, POSTAL_NUMBER_COLUMN_INDEX);
+    }
+}
diff --git a/src/com/android/contacts/list/MultiplePhonePickerAdapter.java b/src/com/android/contacts/list/MultiplePhonePickerAdapter.java
new file mode 100644
index 0000000..1eba085
--- /dev/null
+++ b/src/com/android/contacts/list/MultiplePhonePickerAdapter.java
@@ -0,0 +1,361 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.content.ContentUris;
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.text.TextUtils;
+import android.util.SparseIntArray;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * List adapter for the multiple phone picker.
+ */
+public class MultiplePhonePickerAdapter extends PhoneNumberListAdapter {
+
+    public interface OnSelectionChangeListener {
+        void onSelectionChange();
+    }
+
+    private static final int[] CHIP_COLOR_ARRAY = {
+        R.drawable.appointment_indicator_leftside_1,
+        R.drawable.appointment_indicator_leftside_2,
+        R.drawable.appointment_indicator_leftside_3,
+        R.drawable.appointment_indicator_leftside_4,
+        R.drawable.appointment_indicator_leftside_5,
+        R.drawable.appointment_indicator_leftside_6,
+        R.drawable.appointment_indicator_leftside_7,
+        R.drawable.appointment_indicator_leftside_8,
+        R.drawable.appointment_indicator_leftside_9,
+        R.drawable.appointment_indicator_leftside_10,
+        R.drawable.appointment_indicator_leftside_11,
+        R.drawable.appointment_indicator_leftside_12,
+        R.drawable.appointment_indicator_leftside_13,
+        R.drawable.appointment_indicator_leftside_14,
+        R.drawable.appointment_indicator_leftside_15,
+        R.drawable.appointment_indicator_leftside_16,
+        R.drawable.appointment_indicator_leftside_17,
+        R.drawable.appointment_indicator_leftside_18,
+        R.drawable.appointment_indicator_leftside_19,
+        R.drawable.appointment_indicator_leftside_20,
+        R.drawable.appointment_indicator_leftside_21,
+    };
+
+    public static final long INVALID_PHONE_ID = -1;
+
+    /** The phone numbers */
+    private ArrayList<String> mPhoneNumbers = new ArrayList<String>();
+
+    /** The selected phone numbers in the PhoneNumberAdapter */
+    private HashSet<String> mSelectedPhoneNumbers = new HashSet<String>();
+
+    /** The phone numbers after the filtering */
+    private ArrayList<String> mFilteredPhoneNumbers = new ArrayList<String>();
+
+    /** The PHONE_ID of selected number in user contacts*/
+    private HashSet<Long> mSelectedPhoneIds = new HashSet<Long>();
+
+    private boolean mSelectionChanged;
+
+    private OnSelectionChangeListener mSelectionChangeListener;
+
+    /**
+     * This is a map from contact ID to color index. A colored chip is used to
+     * indicate the number of phone numbers belong to one contact
+     */
+    private SparseIntArray mContactColor = new SparseIntArray();
+
+    public MultiplePhonePickerAdapter(Context context) {
+        super(context);
+    }
+
+    public void setOnSelectionChangeListener(OnSelectionChangeListener listener) {
+        this.mSelectionChangeListener = listener;
+    }
+
+    public void setPhoneNumbers(ArrayList<String> phoneNumbers) {
+        mPhoneNumbers.clear();
+        mPhoneNumbers.addAll(phoneNumbers);
+    }
+
+    public int getSelectedCount() {
+        return mSelectedPhoneNumbers.size() + mSelectedPhoneIds.size();
+    }
+
+    public Uri[] getSelectedUris() {
+        Uri[] uris = new Uri[mSelectedPhoneNumbers.size() + mSelectedPhoneIds.size()];
+        int count = mPhoneNumbers.size();
+        int index = 0;
+        for (int i = 0; i < count; i++) {
+            String phoneNumber = mPhoneNumbers.get(i);
+            if (isSelected(phoneNumber)) {
+                uris[index++] = Uri.parse("tel:" + phoneNumber);
+            }
+        }
+        for (Long contactId : mSelectedPhoneIds) {
+            uris[index++] = ContentUris.withAppendedId(Phone.CONTENT_URI, contactId);
+        }
+        return uris;
+    }
+
+    public void setSelectedUris(Uri[] uris) {
+        mSelectedPhoneNumbers.clear();
+        mSelectedPhoneIds.clear();
+        if (uris != null) {
+            for (Uri uri : uris) {
+                String scheme = uri.getScheme();
+                if ("tel".equals(scheme)) {
+                    String phoneNumber = uri.getSchemeSpecificPart();
+                    if (!mPhoneNumbers.contains(phoneNumber)) {
+                        mPhoneNumbers.add(phoneNumber);
+                    }
+                    mSelectedPhoneNumbers.add(phoneNumber);
+            } else if ("content".equals(scheme)) {
+                mSelectedPhoneIds.add(ContentUris.parseId(uri));
+            }
+            }
+        }
+        mFilteredPhoneNumbers.clear();
+        mFilteredPhoneNumbers.addAll(mPhoneNumbers);
+    }
+
+    public void toggleSelection(int position) {
+        if (position < mFilteredPhoneNumbers.size()) {
+            String phoneNumber = mPhoneNumbers.get(position);
+            setPhoneSelected(phoneNumber, !isSelected(phoneNumber));
+        } else {
+            Cursor cursor = ((Cursor)getItem(position));
+            cursor.moveToPosition(position - mFilteredPhoneNumbers.size());
+            long phoneId = cursor.getLong(PHONE_ID_COLUMN_INDEX);
+            setPhoneSelected(phoneId, !isSelected(phoneId));
+        }
+        notifyDataSetChanged();
+    }
+
+    public boolean isSelectionChanged() {
+        return mSelectionChanged;
+    }
+
+    public void setSelectionChanged(boolean flag) {
+        mSelectionChanged = flag;
+        if (mSelectionChangeListener != null) {
+            mSelectionChangeListener.onSelectionChange();
+        }
+    }
+
+    public void setPhoneSelected(final String phoneNumber, boolean selected) {
+        if (!TextUtils.isEmpty(phoneNumber)) {
+            if (selected) {
+                mSelectedPhoneNumbers.add(phoneNumber);
+            } else {
+                mSelectedPhoneNumbers.remove(phoneNumber);
+            }
+        }
+        setSelectionChanged(true);
+    }
+
+    public void setPhoneSelected(long phoneId, boolean selected) {
+        if (selected) {
+            mSelectedPhoneIds.add(phoneId);
+        } else {
+            mSelectedPhoneIds.remove(phoneId);
+        }
+        setSelectionChanged(true);
+    }
+
+    public boolean isSelected(long phoneId) {
+        return mSelectedPhoneIds.contains(phoneId);
+    }
+
+    public boolean isSelected(final String phoneNumber) {
+        return mSelectedPhoneNumbers.contains(phoneNumber);
+    }
+
+    public void setAllPhonesSelected(boolean selected) {
+//        if (selected) {
+//            Cursor cursor = this.mMultiplePhoneSelectionActivity.mAdapter.getCursor();
+//            if (cursor != null) {
+//                int backupPos = cursor.getPosition();
+//                cursor.moveToPosition(-1);
+//                while (cursor.moveToNext()) {
+//                    setPhoneSelected(cursor
+//                            .getLong(MultiplePhonePickerActivity.PHONE_ID_COLUMN_INDEX), true);
+//                }
+//                cursor.moveToPosition(backupPos);
+//            }
+//            for (String number : this.mMultiplePhoneSelectionActivity.mPhoneNumberAdapter
+//                    .getFilteredPhoneNumbers()) {
+//                setPhoneSelected(number, true);
+//            }
+//        } else {
+//            mSelectedPhoneIds.clear();
+//            mSelectedPhoneNumbers.clear();
+//        }
+    }
+
+    public boolean isAllSelected() {
+        return false;
+//        return selectedCount() == this.mMultiplePhoneSelectionActivity.mPhoneNumberAdapter
+//                .getFilteredPhoneNumbers().size()
+//                + this.mMultiplePhoneSelectionActivity.mAdapter.getCount();
+    }
+
+    public Iterator<Long> getSelectedPhoneIds() {
+        return mSelectedPhoneIds.iterator();
+    }
+
+    @Override
+    public int getItemViewTypeCount() {
+        return 2;
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return position < mPhoneNumbers.size() ? 0 : 1;
+    }
+
+    // TODO redo as two separate partitions
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        View view = null;
+//        if (convertView == null || convertView.getTag() == null) {
+//            view = newView(getContext(), null, parent);
+//        } else {
+//            view = convertView;
+//        }
+//
+//        boolean showingSuggestion = false;
+//
+//        if (position < mFilteredPhoneNumbers.size()) {
+//            bindExtraPhoneView(view, position);
+//        } else {
+//            Cursor cursor = ((Cursor)getItem(position));
+//            cursor.moveToPosition(position - mFilteredPhoneNumbers.size());
+//            bindView(view, getContext(), cursor);
+//        }
+        return view;
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final MultiplePhonePickerItemView view = new MultiplePhonePickerItemView(context, null);
+        view.setUnknownNameText(getUnknownNameText());
+        view.setTextWithHighlightingFactory(getTextWithHighlightingFactory());
+        return view;
+    }
+
+    private void bindExtraPhoneView(View itemView, int position) {
+        final MultiplePhonePickerItemView view = (MultiplePhonePickerItemView)itemView;
+        String phoneNumber = mFilteredPhoneNumbers.get(position);
+        view.getNameTextView().setText(phoneNumber);
+        CheckBox checkBox = view.getCheckBoxView();
+        checkBox.setChecked(isSelected(phoneNumber));
+        view.phoneId = INVALID_PHONE_ID;
+        view.phoneNumber = phoneNumber;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        super.bindView(itemView, partition, cursor, position);
+
+        final MultiplePhonePickerItemView view = (MultiplePhonePickerItemView)itemView;
+        view.phoneId = Long.valueOf(cursor.getLong(PHONE_ID_COLUMN_INDEX));
+        CheckBox checkBox = view.getCheckBoxView();
+        checkBox.setChecked(isSelected(view.phoneId));
+
+        long contactId = cursor.getLong(PHONE_CONTACT_ID_COLUMN_INDEX);
+        view.getChipView().setBackgroundResource(getChipColor(contactId));
+    }
+
+//    @Override
+//    protected void prepareEmptyView() {
+//        mMultiplePhonePickerActivity.mEmptyView.show(mMultiplePhonePickerActivity.mSearchMode,
+//                true, false, false, false, true, mMultiplePhonePickerActivity.mShowSelectedOnly);
+//    }
+
+    /**
+     * Get assigned chip color resource id for a given contact, 0 is returned if there is no mapped
+     * resource.
+     */
+    public int getChipColor(long contactId) {
+        return mContactColor.get((int)contactId);
+    }
+
+    // TODO filtering
+//    public void doFilter(final String constraint, boolean selectedOnly) {
+//        if (mPhoneNumbers == null) {
+//            return;
+//        }
+//        mFilteredPhoneNumbers.clear();
+//        for (String number : mPhoneNumbers) {
+//            if (selectedOnly && !mSelection.isSelected(number) ||
+//                    !TextUtils.isEmpty(constraint) && !number.startsWith(constraint)) {
+//                continue;
+//            }
+//            mFilteredPhoneNumbers.add(number);
+//        }
+//    }
+
+    @Override
+    public int getCount() {
+        return super.getCount() + mFilteredPhoneNumbers.size();
+    }
+
+    @Override
+    public void changeCursor(Cursor cursor) {
+        super.changeCursor(cursor);
+        updateChipColor(cursor);
+    }
+
+    /**
+     * Go through the cursor and assign the chip color to contact who has more
+     * than one phone numbers. Assume the cursor is clustered by CONTACT_ID.
+     */
+    public void updateChipColor(Cursor cursor) {
+        if (cursor == null || cursor.getCount() == 0) {
+            return;
+        }
+        mContactColor.clear();
+        cursor.moveToFirst();
+        int colorIndex = 0;
+        long prevContactId = cursor.getLong(PHONE_CONTACT_ID_COLUMN_INDEX);
+        while (cursor.moveToNext()) {
+            long contactId = cursor.getLong(PHONE_CONTACT_ID_COLUMN_INDEX);
+            if (prevContactId == contactId) {
+                if (mContactColor.indexOfKey((int)contactId) < 0) {
+                    mContactColor.put((int)contactId, CHIP_COLOR_ARRAY[colorIndex]);
+                    colorIndex++;
+                    if (colorIndex >= CHIP_COLOR_ARRAY.length) {
+                        colorIndex = 0;
+                    }
+                }
+            }
+            prevContactId = contactId;
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/MultiplePhonePickerFragment.java b/src/com/android/contacts/list/MultiplePhonePickerFragment.java
new file mode 100644
index 0000000..bf75a9f
--- /dev/null
+++ b/src/com/android/contacts/list/MultiplePhonePickerFragment.java
@@ -0,0 +1,181 @@
+/*
+ * 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 com.android.contacts.R;
+import com.android.contacts.list.MultiplePhonePickerAdapter.OnSelectionChangeListener;
+
+import android.app.Activity;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewStub;
+import android.view.View.OnClickListener;
+import android.view.animation.AnimationUtils;
+import android.widget.Button;
+
+/**
+ * Fragment for the multiple phone picker.
+ */
+public class MultiplePhonePickerFragment
+        extends ContactEntryListFragment<MultiplePhonePickerAdapter>
+        implements OnClickListener, OnSelectionChangeListener {
+
+    private static final String SELECTION_EXTRA_KEY = "selection";
+    private static final String SELECTION_CHANGED_EXTRA_KEY = "selectionChanged";
+
+    private OnMultiplePhoneNumberPickerActionListener mListener;
+
+    /**
+     * UI control of action panel in MODE_PICK_MULTIPLE_PHONES mode.
+     */
+    private View mFooterView;
+
+    private Uri[] mSelectedUris;
+    private boolean mSelectionChanged;
+
+    public MultiplePhonePickerFragment() {
+        setSectionHeaderDisplayEnabled(false);
+        setPhotoLoaderEnabled(true);
+    }
+
+    public void setOnMultiplePhoneNumberPickerActionListener(
+            OnMultiplePhoneNumberPickerActionListener listener) {
+        mListener = listener;
+    }
+
+    public Uri[] getSelectedUris() {
+        return getAdapter().getSelectedUris();
+    }
+
+    public void setSelectedUris(Parcelable[] extras) {
+        Uri[] uris = new Uri[extras == null ? 0 : extras.length];
+        if (extras != null) {
+            for (int i = 0; i < extras.length; i++) {
+                uris[i] = (Uri)extras[i];
+            }
+        }
+        setSelectedUris(uris);
+    }
+
+    public void setSelectedUris(Uri[] uris) {
+        mSelectedUris = uris;
+        MultiplePhonePickerAdapter adapter = getAdapter();
+        if (adapter != null) {
+            adapter.setSelectedUris(uris);
+        }
+    }
+
+    @Override
+    protected MultiplePhonePickerAdapter createListAdapter() {
+        return new MultiplePhonePickerAdapter(getActivity());
+    }
+
+    @Override
+    protected void configureAdapter() {
+        super.configureAdapter();
+        MultiplePhonePickerAdapter adapter = getAdapter();
+        adapter.setSelectedUris(mSelectedUris);
+        adapter.setSelectionChanged(mSelectionChanged);
+        adapter.setOnSelectionChangeListener(this);
+    }
+
+    @Override
+    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+        View view = inflater.inflate(R.layout.contacts_list_content, null);
+        ViewStub stub = (ViewStub)view.findViewById(R.id.footer_stub);
+        if (stub != null) {
+            View stubView = stub.inflate();
+            mFooterView = stubView.findViewById(R.id.footer);
+            mFooterView.setVisibility(View.GONE);
+            Button doneButton = (Button) stubView.findViewById(R.id.done);
+            doneButton.setOnClickListener(this);
+            Button revertButton = (Button) stubView.findViewById(R.id.revert);
+            revertButton.setOnClickListener(this);
+        }
+        return view;
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        getAdapter().toggleSelection(position);
+    }
+
+    public void onClick(View v) {
+        int id = v.getId();
+        switch (id) {
+            case R.id.done:
+                mListener.onPhoneNumbersSelectedAction(getAdapter().getSelectedUris());
+                break;
+            case R.id.revert:
+                mListener.onFinishAction();
+                break;
+        }
+    }
+
+    @Override
+    public void onCreate(Bundle savedState) {
+        super.onCreate(savedState);
+        if (savedState != null) {
+            setSelectedUris(savedState.getParcelableArray(SELECTION_EXTRA_KEY));
+            mSelectionChanged = savedState.getBoolean(SELECTION_CHANGED_EXTRA_KEY, false);
+            if (getAdapter() != null) {
+                getAdapter().setSelectionChanged(mSelectionChanged);
+            }
+        }
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        updateWidgets();
+    }
+
+    public void onSelectionChange() {
+        updateWidgets();
+    }
+
+    private void updateWidgets() {
+        int selected = getAdapter().getSelectedCount();
+
+        Activity context = getActivity();
+        if (selected >= 1) {
+            final String format = context.getResources().getQuantityString(
+                    R.plurals.multiple_picker_title, selected);
+
+            // TODO: turn this into a callback
+            context.setTitle(String.format(format, selected));
+        } else {
+            // TODO: turn this into a callback
+            context.setTitle(context.getString(R.string.contactsList));
+        }
+
+        if (getAdapter().isSelectionChanged() && mFooterView.getVisibility() == View.GONE) {
+            mFooterView.setVisibility(View.VISIBLE);
+            mFooterView.startAnimation(AnimationUtils.loadAnimation(context, R.anim.footer_appear));
+        }
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle icicle) {
+        super.onSaveInstanceState(icicle);
+        icicle.putParcelableArray(SELECTION_EXTRA_KEY, getAdapter().getSelectedUris());
+        icicle.putBoolean(SELECTION_CHANGED_EXTRA_KEY, getAdapter().isSelectionChanged());
+    }
+}
diff --git a/src/com/android/contacts/list/MultiplePhonePickerItemView.java b/src/com/android/contacts/list/MultiplePhonePickerItemView.java
new file mode 100644
index 0000000..87f53bf
--- /dev/null
+++ b/src/com/android/contacts/list/MultiplePhonePickerItemView.java
@@ -0,0 +1,123 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.CheckBox;
+
+/**
+ * A custom view for an item in the phone multi-picker list.
+ */
+public class MultiplePhonePickerItemView extends ContactListItemView {
+
+    // Used to indicate the sequence of phones belong to the same contact in multi-picker
+    private View mChipView;
+    // Used to select the phone in multi-picker
+    private CheckBox mCheckBox;
+
+    private int mChipWidth;
+    private int mChipRightMargin;
+    private int mCheckBoxMargin;
+
+    public long phoneId;
+    // phoneNumber only validates when phoneId = INVALID_PHONE_ID
+    public String phoneNumber;
+
+    public MultiplePhonePickerItemView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        TypedArray a = getContext().obtainStyledAttributes(
+                attrs, R.styleable.MultiplePhonePickerItemView);
+        mChipWidth = a.getDimensionPixelOffset(
+                R.styleable.MultiplePhonePickerItemView_list_item_header_chip_width, 0);
+        mChipRightMargin = a.getDimensionPixelOffset(
+                R.styleable.MultiplePhonePickerItemView_list_item_header_chip_right_margin, 0);
+        mCheckBoxMargin = a.getDimensionPixelOffset(
+                R.styleable.MultiplePhonePickerItemView_list_item_header_checkbox_margin, 0);
+        a.recycle();
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        if (isVisible(mChipView)) {
+            mChipView.measure(0, 0);
+        }
+
+        if (isVisible(mCheckBox)) {
+            mCheckBox.measure(0, 0);
+        }
+
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+    }
+
+    @Override
+    protected int layoutLeftSide(int height, int topBound, int bottomBound, int leftBound) {
+        if (mChipView != null) {
+            mChipView.layout(leftBound, topBound, leftBound + mChipWidth, height);
+            leftBound += mChipWidth + mChipRightMargin;
+        }
+
+        return super.layoutLeftSide(height, topBound, bottomBound, leftBound);
+    }
+
+    @Override
+    protected int layoutRightSide(int height, int topBound, int rightBound) {
+        rightBound = super.layoutRightSide(height, topBound, rightBound);
+
+        if (isVisible(mCheckBox)) {
+            int checkBoxWidth = mCheckBox.getMeasuredWidth();
+            int checkBoxHight = mCheckBox.getMeasuredHeight();
+            rightBound -= mCheckBoxMargin + checkBoxWidth;
+            int checkBoxTop = topBound + (height - topBound - checkBoxHight) / 2;
+            mCheckBox.layout(
+                    rightBound,
+                    checkBoxTop,
+                    rightBound + checkBoxWidth,
+                    checkBoxTop + checkBoxHight);
+        }
+
+        return rightBound;
+    }
+
+    /**
+     * Returns the chip view for the multipicker, creating it if necessary.
+     */
+    public View getChipView() {
+        if (mChipView == null) {
+            mChipView = new View(mContext);
+            addView(mChipView);
+        }
+        return mChipView;
+    }
+
+    /**
+     * Returns the CheckBox view for the multipicker, creating it if necessary.
+     */
+    public CheckBox getCheckBoxView() {
+        if (mCheckBox == null) {
+            mCheckBox = new CheckBox(mContext);
+            mCheckBox.setClickable(false);
+            mCheckBox.setFocusable(false);
+            addView(mCheckBox);
+        }
+        return mCheckBox;
+    }
+}
diff --git a/src/com/android/contacts/list/OnContactBrowserActionListener.java b/src/com/android/contacts/list/OnContactBrowserActionListener.java
new file mode 100644
index 0000000..239f8e1
--- /dev/null
+++ b/src/com/android/contacts/list/OnContactBrowserActionListener.java
@@ -0,0 +1,71 @@
+/*
+ * 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 list.
+ */
+public interface OnContactBrowserActionListener  {
+
+    /**
+     * Opens the specified contact for viewing.
+     *
+     * @param contactLookupUri The lookup-uri of the Contact that should be opened
+     */
+    void onViewContactAction(Uri contactLookupUri);
+
+    /**
+     * Creates a new contact.
+     */
+    void onCreateNewContactAction();
+
+    /**
+     * Opens the specified contact for editing.
+     */
+    void onEditContactAction(Uri contactLookupUri);
+
+    /**
+     * Initiates the contact deletion process.
+     */
+    void onDeleteContactAction(Uri contactUri);
+
+    /**
+     * Adds the specified contact to favorites
+     */
+    void onAddToFavoritesAction(Uri contactUri);
+
+    /**
+     * Removes the specified contact from favorites.
+     */
+    void onRemoveFromFavoritesAction(Uri contactUri);
+
+    /**
+     * Places a call to the specified contact.
+     */
+    void onCallContactAction(Uri contactUri);
+
+    /**
+     * Initiates a text message to the specified contact.
+     */
+    void onSmsContactAction(Uri contactUri);
+
+    /**
+     * Closes the contact browser.
+     */
+    void onFinishAction();
+}
diff --git a/src/com/android/contacts/list/OnContactPickerActionListener.java b/src/com/android/contacts/list/OnContactPickerActionListener.java
new file mode 100644
index 0000000..1216888
--- /dev/null
+++ b/src/com/android/contacts/list/OnContactPickerActionListener.java
@@ -0,0 +1,40 @@
+/*
+ * 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.content.Intent;
+import android.net.Uri;
+
+/**
+ * Action callbacks that can be sent by a contact picker.
+ */
+public interface OnContactPickerActionListener  {
+
+    /**
+     * Creates a new contact and then returns it to the caller.
+     */
+    void onCreateNewContactAction();
+
+    /**
+     * Returns the selected contact to the requester.
+     */
+    void onPickContactAction(Uri contactUri);
+
+    /**
+     * Returns the selected contact as a shortcut intent.
+     */
+    void onShortcutIntentCreated(Intent intent);
+}
diff --git a/src/com/android/contacts/list/OnMultiplePhoneNumberPickerActionListener.java b/src/com/android/contacts/list/OnMultiplePhoneNumberPickerActionListener.java
new file mode 100644
index 0000000..ac010ba
--- /dev/null
+++ b/src/com/android/contacts/list/OnMultiplePhoneNumberPickerActionListener.java
@@ -0,0 +1,34 @@
+/*
+ * 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 multiple phone number picker.
+ */
+public interface OnMultiplePhoneNumberPickerActionListener {
+
+    /**
+     * Returns the selected phone numbers to the requester.
+     */
+    void onPhoneNumbersSelectedAction(Uri[] dataUris);
+
+    /**
+     * Closes the picker without changing the selection.
+     */
+    void onFinishAction();
+}
diff --git a/src/com/android/contacts/list/OnPhoneNumberPickerActionListener.java b/src/com/android/contacts/list/OnPhoneNumberPickerActionListener.java
new file mode 100644
index 0000000..1a90122
--- /dev/null
+++ b/src/com/android/contacts/list/OnPhoneNumberPickerActionListener.java
@@ -0,0 +1,35 @@
+/*
+ * 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.content.Intent;
+import android.net.Uri;
+
+/**
+ * Action callbacks that can be sent by a phone number picker.
+ */
+public interface OnPhoneNumberPickerActionListener  {
+
+    /**
+     * Returns the selected phone number to the requester.
+     */
+    void onPickPhoneNumberAction(Uri dataUri);
+
+    /**
+     * Returns the selected number as a shortcut intent.
+     */
+    void onShortcutIntentCreated(Intent intent);
+}
diff --git a/src/com/android/contacts/list/OnPostalAddressPickerActionListener.java b/src/com/android/contacts/list/OnPostalAddressPickerActionListener.java
new file mode 100644
index 0000000..6ecde61
--- /dev/null
+++ b/src/com/android/contacts/list/OnPostalAddressPickerActionListener.java
@@ -0,0 +1,29 @@
+/*
+ * 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 postal address picker.
+ */
+public interface OnPostalAddressPickerActionListener  {
+
+    /**
+     * Returns the selected phone number to the requester.
+     */
+    void onPickPostalAddressAction(Uri dataUri);
+}
diff --git a/src/com/android/contacts/list/PhoneNumberListAdapter.java b/src/com/android/contacts/list/PhoneNumberListAdapter.java
new file mode 100644
index 0000000..0bfd6dc
--- /dev/null
+++ b/src/com/android/contacts/list/PhoneNumberListAdapter.java
@@ -0,0 +1,220 @@
+/*
+ * 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.content.ContentUris;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.net.Uri.Builder;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.ContactCounts;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.Directory;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.text.TextUtils;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A cursor adapter for the {@link Phone#CONTENT_TYPE} content type.
+ */
+public class PhoneNumberListAdapter extends ContactEntryListAdapter {
+
+    protected static final String[] PHONES_PROJECTION = new String[] {
+        Phone._ID,                          // 0
+        Phone.TYPE,                         // 1
+        Phone.LABEL,                        // 2
+        Phone.NUMBER,                       // 3
+        Phone.DISPLAY_NAME_PRIMARY,         // 4
+        Phone.DISPLAY_NAME_ALTERNATIVE,     // 5
+        Phone.CONTACT_ID,                   // 6
+        Phone.PHOTO_ID,                     // 7
+        Phone.PHONETIC_NAME,                // 8
+    };
+
+    protected static final int PHONE_ID_COLUMN_INDEX = 0;
+    protected static final int PHONE_TYPE_COLUMN_INDEX = 1;
+    protected static final int PHONE_LABEL_COLUMN_INDEX = 2;
+    protected static final int PHONE_NUMBER_COLUMN_INDEX = 3;
+    protected static final int PHONE_PRIMARY_DISPLAY_NAME_COLUMN_INDEX = 4;
+    protected static final int PHONE_ALTERNATIVE_DISPLAY_NAME_COLUMN_INDEX = 5;
+    protected static final int PHONE_CONTACT_ID_COLUMN_INDEX = 6;
+    protected static final int PHONE_PHOTO_ID_COLUMN_INDEX = 7;
+    protected static final int PHONE_PHONETIC_NAME_COLUMN_INDEX = 8;
+
+    private CharSequence mUnknownNameText;
+    private int mDisplayNameColumnIndex;
+    private int mAlternativeDisplayNameColumnIndex;
+    private boolean mVisibleContactsOnly = true;
+
+    public PhoneNumberListAdapter(Context context) {
+        super(context);
+
+        mUnknownNameText = context.getText(android.R.string.unknownName);
+    }
+
+    protected CharSequence getUnknownNameText() {
+        return mUnknownNameText;
+    }
+
+    public void setVisibleContactsOnly(boolean flag) {
+        mVisibleContactsOnly = flag;
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+        Uri uri;
+
+        if (isSearchMode()) {
+            String query = getQueryString();
+            Builder builder = Phone.CONTENT_FILTER_URI.buildUpon();
+            if (TextUtils.isEmpty(query)) {
+                builder.appendPath("");
+            } else {
+                builder.appendPath(query);      // Builder will encode the query
+            }
+
+            builder.appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY,
+                    String.valueOf(directoryId));
+            uri = builder.build();
+            // TODO a projection that includes the search snippet
+            loader.setProjection(PHONES_PROJECTION);
+        } else {
+            uri = Phone.CONTENT_URI;
+            loader.setProjection(PHONES_PROJECTION);
+        }
+
+        if (directoryId == Directory.DEFAULT) {
+            if (mVisibleContactsOnly) {
+                loader.setSelection(Contacts.IN_VISIBLE_GROUP + "=1");
+            }
+            if (isSectionHeaderDisplayEnabled()) {
+                uri = buildSectionIndexerUri(uri);
+            }
+        }
+
+        loader.setUri(uri);
+        if (getSortOrder() == ContactsContract.Preferences.SORT_ORDER_PRIMARY) {
+            loader.setSortOrder(Phone.SORT_KEY_PRIMARY);
+        } else {
+            loader.setSortOrder(Phone.SORT_KEY_ALTERNATIVE);
+        }
+    }
+
+    protected static Uri buildSectionIndexerUri(Uri uri) {
+        return uri.buildUpon()
+                .appendQueryParameter(ContactCounts.ADDRESS_BOOK_INDEX_EXTRAS, "true").build();
+    }
+
+    @Override
+    public String getContactDisplayName(int position) {
+        return ((Cursor)getItem(position)).getString(mDisplayNameColumnIndex);
+    }
+
+    @Override
+    public void setContactNameDisplayOrder(int displayOrder) {
+        super.setContactNameDisplayOrder(displayOrder);
+        if (getContactNameDisplayOrder() == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
+            mDisplayNameColumnIndex = PHONE_PRIMARY_DISPLAY_NAME_COLUMN_INDEX;
+            mAlternativeDisplayNameColumnIndex = PHONE_ALTERNATIVE_DISPLAY_NAME_COLUMN_INDEX;
+        } else {
+            mDisplayNameColumnIndex = PHONE_ALTERNATIVE_DISPLAY_NAME_COLUMN_INDEX;
+            mAlternativeDisplayNameColumnIndex = PHONE_PRIMARY_DISPLAY_NAME_COLUMN_INDEX;
+        }
+    }
+
+    /**
+     * Builds a {@link Data#CONTENT_URI} for the given cursor position.
+     */
+    public Uri getDataUri(int position) {
+        Cursor cursor = ((Cursor)getItem(position));
+        long id = cursor.getLong(PHONE_ID_COLUMN_INDEX);
+        return ContentUris.withAppendedId(Data.CONTENT_URI, id);
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final ContactListItemView view = new ContactListItemView(context, null);
+        view.setUnknownNameText(mUnknownNameText);
+        view.setTextWithHighlightingFactory(getTextWithHighlightingFactory());
+        return view;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        ContactListItemView view = (ContactListItemView)itemView;
+        bindSectionHeaderAndDivider(view, position);
+        bindName(view, cursor);
+        bindPhoto(view, cursor);
+        bindPhoneNumber(view, cursor);
+    }
+
+    protected void bindPhoneNumber(ContactListItemView view, Cursor cursor) {
+        CharSequence label = null;
+        if (!cursor.isNull(PHONE_TYPE_COLUMN_INDEX)) {
+            final int type = cursor.getInt(PHONE_TYPE_COLUMN_INDEX);
+            final String customLabel = cursor.getString(PHONE_LABEL_COLUMN_INDEX);
+
+            // TODO cache
+            label = Phone.getTypeLabel(getContext().getResources(), type, customLabel);
+        }
+        view.setLabel(label);
+        view.showData(cursor, PHONE_NUMBER_COLUMN_INDEX);
+    }
+
+    protected void bindSectionHeaderAndDivider(final ContactListItemView view, int position) {
+        final int section = getSectionForPosition(position);
+        if (getPositionForSection(section) == position) {
+            String title = (String)getSections()[section];
+            view.setSectionHeader(title);
+        } else {
+            view.setDividerVisible(false);
+            view.setSectionHeader(null);
+        }
+
+        // move the divider for the last item in a section
+        if (getPositionForSection(section + 1) - 1 == position) {
+            view.setDividerVisible(false);
+        } else {
+            view.setDividerVisible(true);
+        }
+    }
+
+    protected void bindName(final ContactListItemView view, Cursor cursor) {
+        view.showDisplayName(cursor, mDisplayNameColumnIndex, isNameHighlightingEnabled(),
+                mAlternativeDisplayNameColumnIndex);
+        view.showPhoneticName(cursor, PHONE_PHONETIC_NAME_COLUMN_INDEX);
+    }
+
+    protected void bindPhoto(final ContactListItemView view, Cursor cursor) {
+        long photoId = 0;
+        if (!cursor.isNull(PHONE_PHOTO_ID_COLUMN_INDEX)) {
+            photoId = cursor.getLong(PHONE_PHOTO_ID_COLUMN_INDEX);
+        }
+
+        getPhotoLoader().loadPhoto(view.getPhotoView(), photoId);
+    }
+//
+//    protected void bindSearchSnippet(final ContactListItemView view, Cursor cursor) {
+//        view.showSnippet(cursor, SUMMARY_SNIPPET_MIMETYPE_COLUMN_INDEX,
+//                SUMMARY_SNIPPET_DATA1_COLUMN_INDEX, SUMMARY_SNIPPET_DATA4_COLUMN_INDEX);
+//    }
+
+}
diff --git a/src/com/android/contacts/list/PhoneNumberPickerFragment.java b/src/com/android/contacts/list/PhoneNumberPickerFragment.java
new file mode 100644
index 0000000..93b66ac
--- /dev/null
+++ b/src/com/android/contacts/list/PhoneNumberPickerFragment.java
@@ -0,0 +1,114 @@
+/*
+ * 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 com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.list.ShortcutIntentBuilder.OnShortcutIntentCreatedListener;
+
+import android.content.Intent;
+import android.net.Uri;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * Fragment containing a phone number list for picking.
+ */
+public class PhoneNumberPickerFragment extends ContactEntryListFragment<ContactEntryListAdapter>
+        implements OnShortcutIntentCreatedListener {
+    private OnPhoneNumberPickerActionListener mListener;
+    private String mShortcutAction;
+
+    public PhoneNumberPickerFragment() {
+        setPhotoLoaderEnabled(true);
+    }
+
+    public void setOnPhoneNumberPickerActionListener(OnPhoneNumberPickerActionListener listener) {
+        this.mListener = listener;
+    }
+
+    /**
+     * @param shortcutAction either {@link Intent#ACTION_CALL} or
+     *            {@link Intent#ACTION_SENDTO} or null.
+     */
+    public void setShortcutAction(String shortcutAction) {
+        this.mShortcutAction = shortcutAction;
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        if (!isLegacyCompatibilityMode()) {
+            PhoneNumberListAdapter adapter = (PhoneNumberListAdapter)getAdapter();
+            pickPhoneNumber(adapter.getDataUri(position));
+        } else {
+            LegacyPhoneNumberListAdapter adapter = (LegacyPhoneNumberListAdapter)getAdapter();
+            pickPhoneNumber(adapter.getPhoneUri(position));
+        }
+    }
+
+    @Override
+    protected ContactEntryListAdapter createListAdapter() {
+        if (!isLegacyCompatibilityMode()) {
+            PhoneNumberListAdapter adapter = new PhoneNumberListAdapter(getActivity());
+            adapter.setDisplayPhotos(true);
+            return adapter;
+        } else {
+            LegacyPhoneNumberListAdapter adapter = new LegacyPhoneNumberListAdapter(getActivity());
+            adapter.setDisplayPhotos(true);
+            return adapter;
+        }
+    }
+
+    @Override
+    protected void configureAdapter() {
+        setSectionHeaderDisplayEnabled(!isSearchMode());
+        setAizyEnabled(!isSearchMode());
+        super.configureAdapter();
+    }
+
+    @Override
+    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+        return inflater.inflate(R.layout.contacts_list_content, null);
+    }
+
+    public void pickPhoneNumber(Uri uri) {
+        if (mShortcutAction == null) {
+            mListener.onPickPhoneNumberAction(uri);
+        } else {
+            if (isLegacyCompatibilityMode()) {
+                throw new UnsupportedOperationException();
+            }
+            ShortcutIntentBuilder builder = new ShortcutIntentBuilder(getActivity(), this);
+            builder.createPhoneNumberShortcutIntent(uri, mShortcutAction);
+        }
+    }
+
+    public void onShortcutIntentCreated(Uri uri, Intent shortcutIntent) {
+        mListener.onShortcutIntentCreated(shortcutIntent);
+    }
+
+    @Override
+    public void startSearch(String initialQuery) {
+        ContactsSearchManager.startSearchForResult(getActivity(), initialQuery,
+                ACTIVITY_REQUEST_CODE_PICKER, getContactsRequest());
+    }
+
+    @Override
+    public void onPickerResult(Intent data) {
+        mListener.onPickPhoneNumberAction(data.getData());
+    }
+}
diff --git a/src/com/android/contacts/list/PostalAddressListAdapter.java b/src/com/android/contacts/list/PostalAddressListAdapter.java
new file mode 100644
index 0000000..797089c
--- /dev/null
+++ b/src/com/android/contacts/list/PostalAddressListAdapter.java
@@ -0,0 +1,175 @@
+/*
+ * 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.content.ContentUris;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.ContactCounts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A cursor adapter for the {@link StructuredPostal#CONTENT_TYPE} content type.
+ */
+public class PostalAddressListAdapter extends ContactEntryListAdapter {
+
+    static final String[] POSTALS_PROJECTION = new String[] {
+        StructuredPostal._ID,                       // 0
+        StructuredPostal.TYPE,                      // 1
+        StructuredPostal.LABEL,                     // 2
+        StructuredPostal.DATA,                      // 3
+        StructuredPostal.DISPLAY_NAME_PRIMARY,      // 4
+        StructuredPostal.DISPLAY_NAME_ALTERNATIVE,  // 5
+        StructuredPostal.PHOTO_ID,                  // 6
+    };
+
+    protected static final int POSTAL_ID_COLUMN_INDEX = 0;
+    protected static final int POSTAL_TYPE_COLUMN_INDEX = 1;
+    protected static final int POSTAL_LABEL_COLUMN_INDEX = 2;
+    protected static final int POSTAL_ADDRESS_COLUMN_INDEX = 3;
+    protected static final int POSTAL_PRIMARY_DISPLAY_NAME_COLUMN_INDEX = 4;
+    protected static final int POSTAL_ALTERNATIVE_DISPLAY_NAME_COLUMN_INDEX = 5;
+    protected static final int POSTAL_PHOTO_ID_COLUMN_INDEX = 6;
+
+    private CharSequence mUnknownNameText;
+    private int mDisplayNameColumnIndex;
+    private int mAlternativeDisplayNameColumnIndex;
+
+    public PostalAddressListAdapter(Context context) {
+        super(context);
+
+        mUnknownNameText = context.getText(android.R.string.unknownName);
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+        loader.setUri(buildSectionIndexerUri(StructuredPostal.CONTENT_URI));
+        loader.setProjection(POSTALS_PROJECTION);
+
+        if (getSortOrder() == ContactsContract.Preferences.SORT_ORDER_PRIMARY) {
+            loader.setSortOrder(StructuredPostal.SORT_KEY_PRIMARY);
+        } else {
+            loader.setSortOrder(StructuredPostal.SORT_KEY_ALTERNATIVE);
+        }
+    }
+
+    protected static Uri buildSectionIndexerUri(Uri uri) {
+        return uri.buildUpon()
+                .appendQueryParameter(ContactCounts.ADDRESS_BOOK_INDEX_EXTRAS, "true").build();
+    }
+
+    @Override
+    public String getContactDisplayName(int position) {
+        return ((Cursor)getItem(position)).getString(mDisplayNameColumnIndex);
+    }
+
+    @Override
+    public void setContactNameDisplayOrder(int displayOrder) {
+        super.setContactNameDisplayOrder(displayOrder);
+        if (getContactNameDisplayOrder() == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
+            mDisplayNameColumnIndex = POSTAL_PRIMARY_DISPLAY_NAME_COLUMN_INDEX;
+            mAlternativeDisplayNameColumnIndex = POSTAL_ALTERNATIVE_DISPLAY_NAME_COLUMN_INDEX;
+        } else {
+            mDisplayNameColumnIndex = POSTAL_ALTERNATIVE_DISPLAY_NAME_COLUMN_INDEX;
+            mAlternativeDisplayNameColumnIndex = POSTAL_PRIMARY_DISPLAY_NAME_COLUMN_INDEX;
+        }
+    }
+
+    /**
+     * Builds a {@link Data#CONTENT_URI} for the current cursor
+     * position.
+     */
+    public Uri getDataUri(int position) {
+        long id = ((Cursor)getItem(position)).getLong(POSTAL_ID_COLUMN_INDEX);
+        return ContentUris.withAppendedId(Data.CONTENT_URI, id);
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        final ContactListItemView view = new ContactListItemView(context, null);
+        view.setUnknownNameText(mUnknownNameText);
+        view.setTextWithHighlightingFactory(getTextWithHighlightingFactory());
+        return view;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        ContactListItemView view = (ContactListItemView)itemView;
+        bindSectionHeaderAndDivider(view, position);
+        bindName(view, cursor);
+        bindPhoto(view, cursor);
+        bindPostalAddress(view, cursor);
+    }
+
+    protected void bindPostalAddress(ContactListItemView view, Cursor cursor) {
+        CharSequence label = null;
+        if (!cursor.isNull(POSTAL_TYPE_COLUMN_INDEX)) {
+            final int type = cursor.getInt(POSTAL_TYPE_COLUMN_INDEX);
+            final String customLabel = cursor.getString(POSTAL_LABEL_COLUMN_INDEX);
+
+            // TODO cache
+            label = StructuredPostal.getTypeLabel(getContext().getResources(), type, label);
+        }
+        view.setLabel(label);
+        view.showData(cursor, POSTAL_ADDRESS_COLUMN_INDEX);
+    }
+
+    protected void bindSectionHeaderAndDivider(final ContactListItemView view, int position) {
+        final int section = getSectionForPosition(position);
+        if (getPositionForSection(section) == position) {
+            String title = (String)getSections()[section];
+            view.setSectionHeader(title);
+        } else {
+            view.setDividerVisible(false);
+            view.setSectionHeader(null);
+        }
+
+        // move the divider for the last item in a section
+        if (getPositionForSection(section + 1) - 1 == position) {
+            view.setDividerVisible(false);
+        } else {
+            view.setDividerVisible(true);
+        }
+    }
+
+    protected void bindName(final ContactListItemView view, Cursor cursor) {
+        view.showDisplayName(cursor, mDisplayNameColumnIndex, isNameHighlightingEnabled(),
+                mAlternativeDisplayNameColumnIndex);
+//        view.showPhoneticName(cursor, PHONE_PHONETIC_NAME_COLUMN_INDEX);
+    }
+
+    protected void bindPhoto(final ContactListItemView view, Cursor cursor) {
+        long photoId = 0;
+        if (!cursor.isNull(POSTAL_PHOTO_ID_COLUMN_INDEX)) {
+            photoId = cursor.getLong(POSTAL_PHOTO_ID_COLUMN_INDEX);
+        }
+
+        getPhotoLoader().loadPhoto(view.getPhotoView(), photoId);
+    }
+//
+//    protected void bindSearchSnippet(final ContactListItemView view, Cursor cursor) {
+//        view.showSnippet(cursor, SUMMARY_SNIPPET_MIMETYPE_COLUMN_INDEX,
+//                SUMMARY_SNIPPET_DATA1_COLUMN_INDEX, SUMMARY_SNIPPET_DATA4_COLUMN_INDEX);
+//    }
+
+}
diff --git a/src/com/android/contacts/list/PostalAddressPickerFragment.java b/src/com/android/contacts/list/PostalAddressPickerFragment.java
new file mode 100644
index 0000000..1f07ce2
--- /dev/null
+++ b/src/com/android/contacts/list/PostalAddressPickerFragment.java
@@ -0,0 +1,85 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.net.Uri;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * Fragment containing a postal address list for picking.
+ */
+public class PostalAddressPickerFragment
+        extends ContactEntryListFragment<ContactEntryListAdapter> {
+    private OnPostalAddressPickerActionListener mListener;
+
+    public PostalAddressPickerFragment() {
+        setPhotoLoaderEnabled(true);
+        setSectionHeaderDisplayEnabled(true);
+    }
+
+    public void setOnPostalAddressPickerActionListener(
+            OnPostalAddressPickerActionListener listener) {
+        this.mListener = listener;
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        if (!isLegacyCompatibilityMode()) {
+            PostalAddressListAdapter adapter = (PostalAddressListAdapter)getAdapter();
+//          if (adapter.isSearchAllContactsItemPosition(position)) {
+//              searchAllContacts();
+//          } else {
+            pickPostalAddress(adapter.getDataUri(position));
+//          }
+        } else {
+            LegacyPostalAddressListAdapter adapter = (LegacyPostalAddressListAdapter)getAdapter();
+            pickPostalAddress(adapter.getContactMethodUri(position));
+        }
+    }
+
+    @Override
+    protected ContactEntryListAdapter createListAdapter() {
+        if (!isLegacyCompatibilityMode()) {
+            PostalAddressListAdapter adapter = new PostalAddressListAdapter(getActivity());
+            adapter.setSectionHeaderDisplayEnabled(true);
+            adapter.setDisplayPhotos(true);
+            return adapter;
+        } else {
+            LegacyPostalAddressListAdapter adapter =
+                    new LegacyPostalAddressListAdapter(getActivity());
+            adapter.setSectionHeaderDisplayEnabled(false);
+            adapter.setDisplayPhotos(false);
+            return adapter;
+        }
+    }
+
+    @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);
+        }
+    }
+
+    public void pickPostalAddress(Uri uri) {
+        mListener.onPickPostalAddressAction(uri);
+    }
+}
diff --git a/src/com/android/contacts/list/ProviderStatusLoader.java b/src/com/android/contacts/list/ProviderStatusLoader.java
new file mode 100644
index 0000000..2eb9672
--- /dev/null
+++ b/src/com/android/contacts/list/ProviderStatusLoader.java
@@ -0,0 +1,211 @@
+/*
+ * 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.content.Context;
+import android.database.Cursor;
+import android.provider.ContactsContract.ProviderStatus;
+
+/**
+ * Checks provider status and configures a list adapter accordingly.
+ */
+public class ProviderStatusLoader {
+
+    private final Context mContext;
+
+    public ProviderStatusLoader(Context context) {
+        this.mContext = context;
+    }
+
+    public int getProviderStatus() {
+        // This query can be performed on the UI thread because
+        // the API explicitly allows such use.
+        Cursor cursor = mContext.getContentResolver().query(
+                ProviderStatus.CONTENT_URI,
+                new String[] { ProviderStatus.STATUS, ProviderStatus.DATA1 }, null, null, null);
+        if (cursor != null) {
+            try {
+                if (cursor.moveToFirst()) {
+                    return cursor.getInt(0);
+                }
+            } finally {
+                cursor.close();
+            }
+        }
+
+        return ProviderStatus.STATUS_NORMAL;
+    }
+
+
+//  View importFailureView = findViewById(R.id.import_failure);
+//  if (importFailureView == null) {
+//      return true;
+//  }
+//
+//  TextView messageView = (TextView) findViewById(R.id.emptyText);
+//
+//  // This query can be performed on the UI thread because
+//  // the API explicitly allows such use.
+//  Cursor cursor = getContentResolver().query(ProviderStatus.CONTENT_URI,
+//          new String[] { ProviderStatus.STATUS, ProviderStatus.DATA1 }, null, null, null);
+//  if (cursor != null) {
+//      try {
+//          if (cursor.moveToFirst()) {
+//              int status = cursor.getInt(0);
+//              if (status != mProviderStatus) {
+//                  mProviderStatus = status;
+//                  switch (status) {
+//                      case ProviderStatus.STATUS_NORMAL:
+//                          mAdapter.notifyDataSetInvalidated();
+//                          if (loadData) {
+//                              startQuery();
+//                          }
+//                          break;
+//
+//                      case ProviderStatus.STATUS_CHANGING_LOCALE:
+//                          messageView.setText(R.string.locale_change_in_progress);
+//                          mAdapter.changeCursor(null);
+//                          mAdapter.notifyDataSetInvalidated();
+//                          break;
+//
+//                      case ProviderStatus.STATUS_UPGRADING:
+//                          messageView.setText(R.string.upgrade_in_progress);
+//                          mAdapter.changeCursor(null);
+//                          mAdapter.notifyDataSetInvalidated();
+//                          break;
+//
+//                      case ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY:
+//                          long size = cursor.getLong(1);
+//                          String message = getResources().getString(
+//                                  R.string.upgrade_out_of_memory, new Object[] {size});
+//                          messageView.setText(message);
+//                          configureImportFailureView(importFailureView);
+//                          mAdapter.changeCursor(null);
+//                          mAdapter.notifyDataSetInvalidated();
+//                          break;
+//                  }
+//              }
+//          }
+//      } finally {
+//          cursor.close();
+//      }
+//  }
+//
+//  importFailureView.setVisibility(
+//          mProviderStatus == ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY
+//                  ? View.VISIBLE
+//                  : View.GONE);
+//  return mProviderStatus == ProviderStatus.STATUS_NORMAL;
+//}
+
+//
+//    /**
+//     * Obtains the contacts provider status and configures the UI accordingly.
+//     *
+//     * @param loadData true if the method needs to start a query when the
+//     *            provider is in the normal state
+//     * @return true if the provider status is normal
+//     */
+//    private boolean checkProviderState(boolean loadData) {
+//        View importFailureView = findViewById(R.id.import_failure);
+//        if (importFailureView == null) {
+//            return true;
+//        }
+//
+//        TextView messageView = (TextView) findViewById(R.id.emptyText);
+//
+//        // This query can be performed on the UI thread because
+//        // the API explicitly allows such use.
+//        Cursor cursor = getContentResolver().query(ProviderStatus.CONTENT_URI,
+//                new String[] { ProviderStatus.STATUS, ProviderStatus.DATA1 }, null, null, null);
+//        if (cursor != null) {
+//            try {
+//                if (cursor.moveToFirst()) {
+//                    int status = cursor.getInt(0);
+//                    if (status != mProviderStatus) {
+//                        mProviderStatus = status;
+//                        switch (status) {
+//                            case ProviderStatus.STATUS_NORMAL:
+//                                mAdapter.notifyDataSetInvalidated();
+//                                if (loadData) {
+//                                    startQuery();
+//                                }
+//                                break;
+//
+//                            case ProviderStatus.STATUS_CHANGING_LOCALE:
+//                                messageView.setText(R.string.locale_change_in_progress);
+//                                mAdapter.changeCursor(null);
+//                                mAdapter.notifyDataSetInvalidated();
+//                                break;
+//
+//                            case ProviderStatus.STATUS_UPGRADING:
+//                                messageView.setText(R.string.upgrade_in_progress);
+//                                mAdapter.changeCursor(null);
+//                                mAdapter.notifyDataSetInvalidated();
+//                                break;
+//
+//                            case ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY:
+//                                long size = cursor.getLong(1);
+//                                String message = getResources().getString(
+//                                        R.string.upgrade_out_of_memory, new Object[] {size});
+//                                messageView.setText(message);
+//                                configureImportFailureView(importFailureView);
+//                                mAdapter.changeCursor(null);
+//                                mAdapter.notifyDataSetInvalidated();
+//                                break;
+//                        }
+//                    }
+//                }
+//            } finally {
+//                cursor.close();
+//            }
+//        }
+//
+//        importFailureView.setVisibility(
+//                mProviderStatus == ProviderStatus.STATUS_UPGRADE_OUT_OF_MEMORY
+//                        ? View.VISIBLE
+//                        : View.GONE);
+//        return mProviderStatus == ProviderStatus.STATUS_NORMAL;
+//    }
+//
+//    private void configureImportFailureView(View importFailureView) {
+//
+//        OnClickListener listener = new OnClickListener(){
+//
+//            public void onClick(View v) {
+//                switch(v.getId()) {
+//                    case R.id.import_failure_uninstall_apps: {
+//                        startActivity(new Intent(Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS));
+//                        break;
+//                    }
+//                    case R.id.import_failure_retry_upgrade: {
+//                        // Send a provider status update, which will trigger a retry
+//                        ContentValues values = new ContentValues();
+//                        values.put(ProviderStatus.STATUS, ProviderStatus.STATUS_UPGRADING);
+//                        getContentResolver().update(ProviderStatus.CONTENT_URI, values, null, null);
+//                        break;
+//                    }
+//                }
+//            }};
+//
+//        Button uninstallApps = (Button) findViewById(R.id.import_failure_uninstall_apps);
+//        uninstallApps.setOnClickListener(listener);
+//
+//        Button retryUpgrade = (Button) findViewById(R.id.import_failure_retry_upgrade);
+//        retryUpgrade.setOnClickListener(listener);
+//    }
+
+}
diff --git a/src/com/android/contacts/list/ShortcutIntentBuilder.java b/src/com/android/contacts/list/ShortcutIntentBuilder.java
new file mode 100644
index 0000000..7a4f9de
--- /dev/null
+++ b/src/com/android/contacts/list/ShortcutIntentBuilder.java
@@ -0,0 +1,397 @@
+/*
+ * 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 com.android.contacts.R;
+import com.android.contacts.util.Constants;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.Typeface;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+
+import java.util.Random;
+
+/**
+ * Constructs shortcut intents.
+ */
+public class ShortcutIntentBuilder {
+
+    private static final String[] CONTACT_COLUMNS = {
+        Contacts.DISPLAY_NAME,
+        Contacts.PHOTO_ID,
+    };
+
+    private static final int CONTACT_DISPLAY_NAME_COLUMN_INDEX = 0;
+    private static final int CONTACT_PHOTO_ID_COLUMN_INDEX = 1;
+
+    private static final String[] PHONE_COLUMNS = {
+        Phone.DISPLAY_NAME,
+        Phone.PHOTO_ID,
+        Phone.NUMBER,
+        Phone.TYPE,
+    };
+
+    private static final int PHONE_DISPLAY_NAME_COLUMN_INDEX = 0;
+    private static final int PHONE_PHOTO_ID_COLUMN_INDEX = 1;
+    private static final int PHONE_NUMBER_COLUMN_INDEX = 2;
+    private static final int PHONE_TYPE_COLUMN_INDEX = 3;
+
+    private static final String[] PHOTO_COLUMNS = {
+        Photo.PHOTO,
+    };
+
+    private static final int PHOTO_PHOTO_COLUMN_INDEX = 0;
+
+    private static final String PHOTO_SELECTION = Photo._ID + "=?";
+
+    private final OnShortcutIntentCreatedListener mListener;
+    private final Context mContext;
+    private final int mIconSize;
+
+    /**
+     * Listener interface.
+     */
+    public interface OnShortcutIntentCreatedListener {
+
+        /**
+         * Callback for shortcut intent creation.
+         *
+         * @param uri the original URI for which the shortcut intent has been
+         *            created.
+         * @param shortcutIntent resulting shortcut intent.
+         */
+        void onShortcutIntentCreated(Uri uri, Intent shortcutIntent);
+    }
+
+    public ShortcutIntentBuilder(Context context, OnShortcutIntentCreatedListener listener) {
+        mContext = context;
+        mListener = listener;
+
+        mIconSize = context.getResources().getDimensionPixelSize(android.R.dimen.app_icon_size);
+    }
+
+    public void createContactShortcutIntent(Uri contactUri) {
+        new ContactLoadingAsyncTask(contactUri).execute();
+    }
+
+    public void createPhoneNumberShortcutIntent(Uri dataUri, String shortcutAction) {
+        new PhoneNumberLoadingAsyncTask(dataUri, shortcutAction).execute();
+    }
+
+    /**
+     * An asynchronous task that loads name, photo and other data from the database.
+     */
+    private abstract class LoadingAsyncTask extends AsyncTask<Void, Void, Void> {
+        protected Uri mUri;
+        protected String mDisplayName;
+        protected byte[] mBitmapData;
+        protected long mPhotoId;
+
+        public LoadingAsyncTask(Uri uri) {
+            mUri = uri;
+        }
+
+        @Override
+        protected Void doInBackground(Void... params) {
+            loadData();
+            loadPhoto();
+            return null;
+        }
+
+        protected abstract void loadData();
+
+        private void loadPhoto() {
+            if (mPhotoId == 0) {
+                return;
+            }
+
+            ContentResolver resolver = mContext.getContentResolver();
+            Cursor cursor = resolver.query(Data.CONTENT_URI, PHOTO_COLUMNS, PHOTO_SELECTION,
+                    new String[] { String.valueOf(mPhotoId) }, null);
+            if (cursor != null) {
+                try {
+                    if (cursor.moveToFirst()) {
+                        mBitmapData = cursor.getBlob(PHOTO_PHOTO_COLUMN_INDEX);
+                    }
+                } finally {
+                    cursor.close();
+                }
+            }
+        }
+    }
+
+    private final class ContactLoadingAsyncTask extends LoadingAsyncTask {
+        public ContactLoadingAsyncTask(Uri uri) {
+            super(uri);
+        }
+
+        @Override
+        protected void loadData() {
+            ContentResolver resolver = mContext.getContentResolver();
+            Cursor cursor = resolver.query(mUri, CONTACT_COLUMNS, null, null, null);
+            if (cursor != null) {
+                try {
+                    if (cursor.moveToFirst()) {
+                        mDisplayName = cursor.getString(CONTACT_DISPLAY_NAME_COLUMN_INDEX);
+                        mPhotoId = cursor.getLong(CONTACT_PHOTO_ID_COLUMN_INDEX);
+                    }
+                } finally {
+                    cursor.close();
+                }
+            }
+        }
+        @Override
+        protected void onPostExecute(Void result) {
+            createContactShortcutIntent(mUri, mDisplayName, mBitmapData);
+        }
+    }
+
+    private final class PhoneNumberLoadingAsyncTask extends LoadingAsyncTask {
+        private final String mShortcutAction;
+        private String mPhoneNumber;
+        private int mPhoneType;
+
+        public PhoneNumberLoadingAsyncTask(Uri uri, String shortcutAction) {
+            super(uri);
+            mShortcutAction = shortcutAction;
+        }
+
+        @Override
+        protected void loadData() {
+            ContentResolver resolver = mContext.getContentResolver();
+            Cursor cursor = resolver.query(mUri, PHONE_COLUMNS, null, null, null);
+            if (cursor != null) {
+                try {
+                    if (cursor.moveToFirst()) {
+                        mDisplayName = cursor.getString(PHONE_DISPLAY_NAME_COLUMN_INDEX);
+                        mPhotoId = cursor.getLong(PHONE_PHOTO_ID_COLUMN_INDEX);
+                        mPhoneNumber = cursor.getString(PHONE_NUMBER_COLUMN_INDEX);
+                        mPhoneType = cursor.getInt(PHONE_TYPE_COLUMN_INDEX);
+                    }
+                } finally {
+                    cursor.close();
+                }
+            }
+        }
+
+        @Override
+        protected void onPostExecute(Void result) {
+            createPhoneNumberShortcutIntent(mUri, mDisplayName, mBitmapData, mPhoneNumber,
+                    mPhoneType, mShortcutAction);
+        }
+    }
+
+    private void createContactShortcutIntent(Uri contactUri, String displayName,
+            byte[] bitmapData) {
+        Bitmap bitmap;
+        if (bitmapData != null) {
+            bitmap = BitmapFactory.decodeByteArray(bitmapData, 0, bitmapData.length, null);
+        } else {
+            final int[] fallbacks = {
+                R.drawable.ic_contact_picture,
+                R.drawable.ic_contact_picture_2,
+                R.drawable.ic_contact_picture_3
+            };
+            bitmap = BitmapFactory.decodeResource(mContext.getResources(),
+                    fallbacks[new Random().nextInt(fallbacks.length)]);
+        }
+
+        Intent shortcutIntent;
+        // This is a simple shortcut to view a contact.
+        shortcutIntent = new Intent(ContactsContract.QuickContact.ACTION_QUICK_CONTACT);
+        shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
+                Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+
+        shortcutIntent.setData(contactUri);
+        shortcutIntent.putExtra(ContactsContract.QuickContact.EXTRA_MODE,
+                ContactsContract.QuickContact.MODE_LARGE);
+        shortcutIntent.putExtra(ContactsContract.QuickContact.EXTRA_EXCLUDE_MIMES,
+                (String[]) null);
+        shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+
+        final Bitmap icon = scaleToAppIconSize(framePhoto(bitmap));
+
+        Intent intent = new Intent();
+        intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, icon);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, displayName);
+
+        mListener.onShortcutIntentCreated(contactUri, intent);
+    }
+
+    private void createPhoneNumberShortcutIntent(Uri uri, String displayName, byte[] bitmapData,
+            String phoneNumber, int phoneType, String shortcutAction) {
+        Bitmap bitmap = null;
+        if (bitmapData != null) {
+            bitmap = BitmapFactory.decodeByteArray(bitmapData, 0, bitmapData.length, null);
+        }
+
+        Uri phoneUri;
+        if (Intent.ACTION_CALL.equals(shortcutAction)) {
+            // Make the URI a direct tel: URI so that it will always continue to work
+            phoneUri = Uri.fromParts(Constants.SCHEME_TEL, phoneNumber, null);
+            bitmap = generatePhoneNumberIcon(bitmap, phoneType, R.drawable.badge_action_call);
+        } else {
+            phoneUri = Uri.fromParts(Constants.SCHEME_SMSTO, phoneNumber, null);
+            bitmap = generatePhoneNumberIcon(bitmap, phoneType, R.drawable.badge_action_sms);
+        }
+
+        Intent shortcutIntent = new Intent(shortcutAction, phoneUri);
+        shortcutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+
+        Intent intent = new Intent();
+        intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bitmap);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
+        intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, displayName);
+
+        mListener.onShortcutIntentCreated(uri, intent);
+    }
+
+    private Bitmap framePhoto(Bitmap photo) {
+        final Resources r = mContext.getResources();
+        final Drawable frame = r.getDrawable(com.android.internal.R.drawable.quickcontact_badge);
+
+        final int width = r.getDimensionPixelSize(R.dimen.contact_shortcut_frame_width);
+        final int height = r.getDimensionPixelSize(R.dimen.contact_shortcut_frame_height);
+
+        frame.setBounds(0, 0, width, height);
+
+        final Rect padding = new Rect();
+        frame.getPadding(padding);
+
+        final Rect source = new Rect(0, 0, photo.getWidth(), photo.getHeight());
+        final Rect destination = new Rect(padding.left, padding.top,
+                width - padding.right, height - padding.bottom);
+
+        final int d = Math.max(width, height);
+        final Bitmap b = Bitmap.createBitmap(d, d, Bitmap.Config.ARGB_8888);
+        final Canvas c = new Canvas(b);
+
+        c.translate((d - width) / 2.0f, (d - height) / 2.0f);
+        frame.draw(c);
+        c.drawBitmap(photo, source, destination, new Paint(Paint.FILTER_BITMAP_FLAG));
+
+        return b;
+    }
+
+    private Bitmap scaleToAppIconSize(Bitmap photo) {
+
+        // Setup the drawing classes
+        Bitmap icon = Bitmap.createBitmap(mIconSize, mIconSize, Bitmap.Config.ARGB_8888);
+        Canvas canvas = new Canvas(icon);
+
+        // Copy in the photo
+        Paint photoPaint = new Paint();
+        photoPaint.setDither(true);
+        photoPaint.setFilterBitmap(true);
+        Rect src = new Rect(0,0, photo.getWidth(),photo.getHeight());
+        Rect dst = new Rect(0,0, mIconSize, mIconSize);
+        canvas.drawBitmap(photo, src, dst, photoPaint);
+
+        return icon;
+    }
+
+    /**
+     * Generates a phone number shortcut icon. Adds an overlay describing the type of the phone
+     * number, and if there is a photo also adds the call action icon.
+     */
+    private Bitmap generatePhoneNumberIcon(Bitmap photo, int phoneType, int actionResId) {
+        final Resources r = mContext.getResources();
+        boolean drawPhoneOverlay = true;
+        final float scaleDensity = r.getDisplayMetrics().scaledDensity;
+
+        Bitmap phoneIcon = ((BitmapDrawable) r.getDrawable(actionResId)).getBitmap();
+
+        // If there isn't a photo use the generic phone action icon instead
+        if (photo == null) {
+            photo = phoneIcon;
+            drawPhoneOverlay = false;
+        }
+
+        // Setup the drawing classes
+        Bitmap icon = Bitmap.createBitmap(mIconSize, mIconSize, Bitmap.Config.ARGB_8888);
+        Canvas canvas = new Canvas(icon);
+
+        // Copy in the photo
+        Paint photoPaint = new Paint();
+        photoPaint.setDither(true);
+        photoPaint.setFilterBitmap(true);
+        Rect src = new Rect(0, 0, photo.getWidth(), photo.getHeight());
+        Rect dst = new Rect(0, 0, mIconSize, mIconSize);
+        canvas.drawBitmap(photo, src, dst, photoPaint);
+
+        // Create an overlay for the phone number type
+        String overlay = null;
+        switch (phoneType) {
+            case Phone.TYPE_HOME:
+                overlay = mContext.getString(R.string.type_short_home);
+                break;
+
+            case Phone.TYPE_MOBILE:
+                overlay = mContext.getString(R.string.type_short_mobile);
+                break;
+
+            case Phone.TYPE_WORK:
+                overlay = mContext.getString(R.string.type_short_work);
+                break;
+
+            case Phone.TYPE_PAGER:
+                overlay = mContext.getString(R.string.type_short_pager);
+                break;
+
+            case Phone.TYPE_OTHER:
+                overlay = mContext.getString(R.string.type_short_other);
+                break;
+        }
+
+        if (overlay != null) {
+            Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DEV_KERN_TEXT_FLAG);
+            textPaint.setTextSize(20.0f * scaleDensity);
+            textPaint.setTypeface(Typeface.DEFAULT_BOLD);
+            textPaint.setColor(r.getColor(R.color.textColorIconOverlay));
+            textPaint.setShadowLayer(3f, 1, 1, r.getColor(R.color.textColorIconOverlayShadow));
+            canvas.drawText(overlay, 2 * scaleDensity, 16 * scaleDensity, textPaint);
+        }
+
+        // Draw the phone action icon as an overlay
+        if (drawPhoneOverlay) {
+            src.set(0, 0, phoneIcon.getWidth(), phoneIcon.getHeight());
+            int iconWidth = icon.getWidth();
+            dst.set(iconWidth - ((int) (20 * scaleDensity)), -1,
+                    iconWidth, ((int) (19 * scaleDensity)));
+            canvas.drawBitmap(phoneIcon, src, dst, photoPaint);
+        }
+
+        return icon;
+    }
+}
diff --git a/src/com/android/contacts/list/StrequentContactListAdapter.java b/src/com/android/contacts/list/StrequentContactListAdapter.java
new file mode 100644
index 0000000..12c56f3
--- /dev/null
+++ b/src/com/android/contacts/list/StrequentContactListAdapter.java
@@ -0,0 +1,223 @@
+/*
+ * 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 com.android.contacts.R;
+import com.android.contacts.util.PhoneCapabilityTester;
+
+import android.content.Context;
+import android.content.CursorLoader;
+import android.database.Cursor;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.View.OnClickListener;
+import android.widget.ListView;
+import android.widget.TextView;
+
+/**
+ * A cursor adapter for the {@link ContactsContract.Contacts#CONTENT_TYPE} content type loading
+ * a combination of starred and frequently contacted.
+ */
+public class StrequentContactListAdapter extends ContactListAdapter {
+
+    private int mFrequentSeparatorPos = ListView.INVALID_POSITION;
+    private TextView mSeparatorView;
+    private OnClickListener mCallButtonListener;
+    private int mCallButtonId;
+    private boolean mStarredContactsIncluded;
+    private boolean mFrequentlyContactedContactsIncluded;
+    private boolean mIsPhone;
+
+    public StrequentContactListAdapter(Context context, int callButtonId) {
+        super(context);
+        mCallButtonId = callButtonId;
+    }
+
+    public void setCallButtonListener(OnClickListener callButtonListener) {
+        mCallButtonListener = callButtonListener;
+    }
+
+    public void setStarredContactsIncluded(boolean flag) {
+        mStarredContactsIncluded = flag;
+    }
+
+    public void setFrequentlyContactedContactsIncluded(boolean flag) {
+        mFrequentlyContactedContactsIncluded = flag;
+    }
+
+    @Override
+    public void configureLoader(CursorLoader loader, long directoryId) {
+        String sortOrder = getSortOrder() == ContactsContract.Preferences.SORT_ORDER_PRIMARY
+                ? Contacts.SORT_KEY_PRIMARY
+                : Contacts.SORT_KEY_ALTERNATIVE;
+        if (mStarredContactsIncluded && mFrequentlyContactedContactsIncluded) {
+            loader.setUri(Contacts.CONTENT_STREQUENT_URI);
+        } else if (mStarredContactsIncluded) {
+            loader.setUri(Contacts.CONTENT_URI);
+            loader.setSelection(Contacts.STARRED + "!=0");
+        } else if (mFrequentlyContactedContactsIncluded) {
+            loader.setUri(Contacts.CONTENT_URI);
+            loader.setSelection(Contacts.TIMES_CONTACTED + " > 0");
+            sortOrder = Contacts.TIMES_CONTACTED + " DESC";
+        } else {
+            throw new UnsupportedOperationException("Neither StarredContactsIncluded nor "
+                    + "FrequentlyContactedContactsIncluded is set");
+        }
+
+        loader.setProjection(PROJECTION_CONTACT);
+        loader.setSortOrder(sortOrder);
+    }
+
+    @Override
+    protected void invalidate() {
+        super.invalidate();
+
+        // Sometimes the adapter is invalidated without calling changeCursor,
+        // need to reset the separator position then.
+        mFrequentSeparatorPos = ListView.INVALID_POSITION;
+        mIsPhone = PhoneCapabilityTester.isPhone(getContext());
+    }
+
+    @Override
+    public void changeCursor(int partition, Cursor cursor) {
+        super.changeCursor(partition, cursor);
+
+        // Get the split between starred and frequent items, if the mode is strequent
+        mFrequentSeparatorPos = ListView.INVALID_POSITION;
+
+        if (mStarredContactsIncluded && mFrequentlyContactedContactsIncluded) {
+            int count = 0;
+            if (cursor != null && (count = cursor.getCount()) > 0) {
+                cursor.moveToPosition(-1);
+                for (int i = 0; cursor.moveToNext(); i++) {
+                    int starred = cursor.getInt(CONTACT_STARRED_COLUMN_INDEX);
+                    if (starred == 0) {
+                        if (i > 0) {
+                            // Only add the separator when there are starred items present
+                            mFrequentSeparatorPos = i;
+                        }
+                        break;
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    public int getCount() {
+        if (mFrequentSeparatorPos == ListView.INVALID_POSITION) {
+            return super.getCount();
+        } else {
+            // Add a row for the separator
+            return super.getCount() + 1;
+        }
+    }
+
+    @Override
+    public boolean areAllItemsEnabled() {
+        return mFrequentSeparatorPos == ListView.INVALID_POSITION;
+    }
+
+    @Override
+    public boolean isEnabled(int position) {
+        return position != mFrequentSeparatorPos;
+    }
+
+    @Override
+    public Object getItem(int position) {
+        if (mFrequentSeparatorPos == ListView.INVALID_POSITION
+                || position < mFrequentSeparatorPos) {
+            return super.getItem(position);
+        } else {
+            return super.getItem(position - 1);
+        }
+    }
+
+    @Override
+    public long getItemId(int position) {
+        if (mFrequentSeparatorPos == ListView.INVALID_POSITION
+                || position < mFrequentSeparatorPos) {
+            return super.getItemId(position);
+        } else {
+            return super.getItemId(position - 1);
+        }
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        if (mFrequentSeparatorPos == ListView.INVALID_POSITION
+                || position < mFrequentSeparatorPos) {
+            return super.getItemViewType(position);
+        } else if (position == mFrequentSeparatorPos) {
+            return IGNORE_ITEM_VIEW_TYPE;
+        } else {
+            return super.getItemViewType(position - 1);
+        }
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (mFrequentSeparatorPos == ListView.INVALID_POSITION
+                || position < mFrequentSeparatorPos) {
+            return super.getView(position, convertView, parent);
+        } else if (position == mFrequentSeparatorPos) {
+            if (mSeparatorView == null) {
+                mSeparatorView = (TextView)LayoutInflater.from(getContext()).
+                        inflate(R.layout.list_separator, parent, false);
+                mSeparatorView.setText(R.string.favoritesFrquentSeparator);
+            }
+            return mSeparatorView;
+        } else {
+            return super.getView(position - 1, convertView, parent);
+        }
+    }
+
+    @Override
+    protected View newView(Context context, int partition, Cursor cursor, int position,
+            ViewGroup parent) {
+        ContactListItemView view = (ContactListItemView)super.newView(context, partition, cursor,
+                position, parent);
+        view.setOnCallButtonClickListener(mCallButtonListener);
+        return view;
+    }
+
+    @Override
+    protected void bindView(View itemView, int partition, Cursor cursor, int position) {
+        final ContactListItemView view = (ContactListItemView)itemView;
+
+        if (isSelectionVisible()) {
+            view.setActivated(isSelectedContact(partition, cursor));
+        }
+
+        bindName(view, cursor);
+        if (isQuickContactEnabled()) {
+            bindQuickContact(view, partition, cursor);
+        } else {
+            bindPhoto(view, partition, cursor);
+        }
+        bindPresence(view, cursor);
+
+        // Make the call button visible if requested.
+        if (mIsPhone && getHasPhoneNumber(position)) {
+            view.showCallButton(mCallButtonId, position);
+        } else {
+            view.hideCallButton();
+        }
+    }
+}
diff --git a/src/com/android/contacts/list/StrequentContactListFragment.java b/src/com/android/contacts/list/StrequentContactListFragment.java
new file mode 100644
index 0000000..393e698
--- /dev/null
+++ b/src/com/android/contacts/list/StrequentContactListFragment.java
@@ -0,0 +1,109 @@
+/*
+ * 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 com.android.contacts.R;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.View.OnClickListener;
+
+/**
+ * Fragment containing a list of starred contacts followed by a list of frequently contacted.
+ */
+public class StrequentContactListFragment extends ContactBrowseListFragment
+        implements OnClickListener {
+
+    private static final int CALL_BUTTON_ID = android.R.id.button1;
+
+    private boolean mStarredContactsIncluded = true;
+    private boolean mFrequentlyContactedContactsIncluded = true;
+
+    public StrequentContactListFragment() {
+        setSectionHeaderDisplayEnabled(false);
+        setPhotoLoaderEnabled(true);
+    }
+
+    @Override
+    protected boolean isNameHighlighingEnabled() {
+        // Since the list is not ordered alphabetically, we don't need to highlight the part
+        // that is used for sorting.
+        return false;
+    }
+
+    public void setStarredContactsIncluded(boolean flag) {
+        mStarredContactsIncluded = flag;
+        configureAdapter();
+    }
+
+    public void setFrequentlyContactedContactsIncluded(boolean flag) {
+        mFrequentlyContactedContactsIncluded = flag;
+        configureAdapter();
+    }
+
+    @Override
+    protected void onItemClick(int position, long id) {
+        ContactListAdapter adapter = getAdapter();
+        viewContact(adapter.getContactUri(position));
+    }
+
+    @Override
+    protected ContactListAdapter createListAdapter() {
+        StrequentContactListAdapter adapter =
+                new StrequentContactListAdapter(getActivity(), CALL_BUTTON_ID);
+        adapter.setSectionHeaderDisplayEnabled(false);
+        adapter.setDisplayPhotos(true);
+        adapter.setQuickContactEnabled(true);
+        adapter.setCallButtonListener(this);
+
+        return adapter;
+    }
+
+    @Override
+    protected void configureAdapter() {
+        super.configureAdapter();
+
+        StrequentContactListAdapter adapter = (StrequentContactListAdapter)getAdapter();
+        if (adapter != null) {
+            adapter.setStarredContactsIncluded(mStarredContactsIncluded);
+            adapter.setFrequentlyContactedContactsIncluded(mFrequentlyContactedContactsIncluded);
+        }
+    }
+
+    @Override
+    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
+        return inflater.inflate(R.layout.contacts_list_content, null);
+    }
+
+    @Override
+    protected void prepareEmptyView() {
+        setEmptyText(R.string.noFavoritesHelpText);
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        switch (id) {
+            case CALL_BUTTON_ID: {
+                final int position = (Integer)v.getTag();
+                ContactListAdapter adapter = getAdapter();
+                callContact(adapter.getContactUri(position));
+                break;
+            }
+        }
+    }
+}
diff --git a/src/com/android/contacts/model/AccountTypes.java b/src/com/android/contacts/model/AccountTypes.java
new file mode 100644
index 0000000..acf9569
--- /dev/null
+++ b/src/com/android/contacts/model/AccountTypes.java
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.google.android.collect.Lists;
+import com.google.android.collect.Maps;
+import com.google.android.collect.Sets;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.AuthenticatorDescription;
+import android.accounts.OnAccountsUpdateListener;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.IContentService;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.SyncAdapterType;
+import android.content.pm.PackageManager;
+import android.os.RemoteException;
+import android.provider.ContactsContract;
+import android.text.TextUtils;
+import android.util.Log;
+
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+
+/**
+ * Singleton holder for all parsed {@link BaseAccountType} available on the
+ * system, typically filled through {@link PackageManager} queries.
+ */
+public class AccountTypes extends BroadcastReceiver implements OnAccountsUpdateListener {
+    private static final String TAG = "AccountTypes";
+
+    private Context mContext;
+    private Context mApplicationContext;
+    private AccountManager mAccountManager;
+
+    private BaseAccountType mFallbackSource = null;
+
+    private HashMap<String, BaseAccountType> mSources = Maps.newHashMap();
+    private HashSet<String> mKnownPackages = Sets.newHashSet();
+
+    private static SoftReference<AccountTypes> sInstance = null;
+
+    /**
+     * Requests the singleton instance of {@link AccountTypes} with data bound from
+     * the available authenticators. This method can safely be called from the UI thread.
+     */
+    public static synchronized AccountTypes getInstance(Context context) {
+        AccountTypes sources = sInstance == null ? null : sInstance.get();
+        if (sources == null) {
+            sources = new AccountTypes(context);
+            sInstance = new SoftReference<AccountTypes>(sources);
+        }
+        return sources;
+    }
+
+    /**
+     * Internal constructor that only performs initial parsing.
+     */
+    private AccountTypes(Context context) {
+        mContext = context;
+        mApplicationContext = context.getApplicationContext();
+        mAccountManager = AccountManager.get(mApplicationContext);
+
+        // Create fallback contacts source for on-phone contacts
+        mFallbackSource = new FallbackAccountType();
+
+        queryAccounts();
+
+        // Request updates when packages or accounts change
+        IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
+        filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
+        filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
+        filter.addDataScheme("package");
+        mApplicationContext.registerReceiver(this, filter);
+        IntentFilter sdFilter = new IntentFilter();
+        sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
+        sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
+        mApplicationContext.registerReceiver(this, sdFilter);
+
+        // Request updates when locale is changed so that the order of each field will
+        // be able to be changed on the locale change.
+        filter = new IntentFilter(Intent.ACTION_LOCALE_CHANGED);
+        mApplicationContext.registerReceiver(this, filter);
+
+        mAccountManager.addOnAccountsUpdatedListener(this, null, false);
+    }
+
+    /** @hide exposed for unit tests */
+    public AccountTypes(BaseAccountType... sources) {
+        for (BaseAccountType source : sources) {
+            addSource(source);
+        }
+    }
+
+    protected void addSource(BaseAccountType source) {
+        mSources.put(source.accountType, source);
+        mKnownPackages.add(source.resPackageName);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        final String action = intent.getAction();
+
+        if (Intent.ACTION_PACKAGE_REMOVED.equals(action)
+                || Intent.ACTION_PACKAGE_ADDED.equals(action)
+                || Intent.ACTION_PACKAGE_CHANGED.equals(action) ||
+                Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action) ||
+                Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
+            String[] pkgList = null;
+            // Handle applications on sdcard.
+            if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action) ||
+                    Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
+                pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
+            } else {
+                final String packageName = intent.getData().getSchemeSpecificPart();
+                pkgList = new String[] { packageName };
+            }
+            if (pkgList != null) {
+                for (String packageName : pkgList) {
+                    final boolean knownPackage = mKnownPackages.contains(packageName);
+                    if (knownPackage) {
+                        // Invalidate cache of existing source
+                        invalidateCache(packageName);
+                    } else {
+                        // Unknown source, so reload from scratch
+                        queryAccounts();
+                    }
+                }
+            }
+        } else if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
+            invalidateAllCache();
+        }
+    }
+
+    protected void invalidateCache(String packageName) {
+        for (BaseAccountType source : mSources.values()) {
+            if (TextUtils.equals(packageName, source.resPackageName)) {
+                // Invalidate any cache for the changed package
+                source.invalidateCache();
+            }
+        }
+    }
+
+    protected void invalidateAllCache() {
+        mFallbackSource.invalidateCache();
+        for (BaseAccountType source : mSources.values()) {
+            source.invalidateCache();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onAccountsUpdated(Account[] accounts) {
+        // Refresh to catch any changed accounts
+        queryAccounts();
+    }
+
+    /**
+     * Loads all {@link AuthenticatorDescription} known by the {@link AccountManager} on the system.
+     */
+    protected synchronized void queryAccounts() {
+        mSources.clear();
+        mKnownPackages.clear();
+
+        final AccountManager am = mAccountManager;
+        final IContentService cs = ContentResolver.getContentService();
+
+        try {
+            final SyncAdapterType[] syncs = cs.getSyncAdapterTypes();
+            final AuthenticatorDescription[] auths = am.getAuthenticatorTypes();
+
+            for (SyncAdapterType sync : syncs) {
+                if (!ContactsContract.AUTHORITY.equals(sync.authority)) {
+                    // Skip sync adapters that don't provide contact data.
+                    continue;
+                }
+
+                // Look for the formatting details provided by each sync
+                // adapter, using the authenticator to find general resources.
+                final String accountType = sync.accountType;
+                final AuthenticatorDescription auth = findAuthenticator(auths, accountType);
+
+                BaseAccountType source;
+                if (GoogleAccountType.ACCOUNT_TYPE.equals(accountType)) {
+                    source = new GoogleAccountType(auth.packageName);
+                } else if (ExchangeAccountType.ACCOUNT_TYPE.equals(accountType)) {
+                    source = new ExchangeAccountType(auth.packageName);
+                } else {
+                    // TODO: use syncadapter package instead, since it provides resources
+                    Log.d(TAG, "Creating external source for type=" + accountType
+                            + ", packageName=" + auth.packageName);
+                    source = new ExternalAccountType(auth.packageName);
+                    source.readOnly = !sync.supportsUploading();
+                }
+
+                source.accountType = auth.type;
+                source.titleRes = auth.labelId;
+                source.iconRes = auth.iconId;
+
+                addSource(source);
+            }
+        } catch (RemoteException e) {
+            Log.w(TAG, "Problem loading accounts: " + e.toString());
+        }
+    }
+
+    /**
+     * Find a specific {@link AuthenticatorDescription} in the provided list
+     * that matches the given account type.
+     */
+    protected static AuthenticatorDescription findAuthenticator(AuthenticatorDescription[] auths,
+            String accountType) {
+        for (AuthenticatorDescription auth : auths) {
+            if (accountType.equals(auth.type)) {
+                return auth;
+            }
+        }
+        throw new IllegalStateException("Couldn't find authenticator for specific account type");
+    }
+
+    /**
+     * Return list of all known, writable {@link BaseAccountType}. AccountTypes
+     * returned may require inflation before they can be used.
+     */
+    public ArrayList<Account> getAccounts(boolean writableOnly) {
+        final AccountManager am = mAccountManager;
+        final Account[] accounts = am.getAccounts();
+        final ArrayList<Account> matching = Lists.newArrayList();
+
+        for (Account account : accounts) {
+            // Ensure we have details loaded for each account
+            final BaseAccountType accountType = getInflatedSource(account.type,
+                    BaseAccountType.LEVEL_SUMMARY);
+            final boolean hasContacts = accountType != null;
+            final boolean matchesWritable =
+                    (!writableOnly || (writableOnly && !accountType.readOnly));
+            if (hasContacts && matchesWritable) {
+                matching.add(account);
+            }
+        }
+        return matching;
+    }
+
+    /**
+     * Find the best {@link DataKind} matching the requested
+     * {@link BaseAccountType#accountType} and {@link DataKind#mimeType}. If no
+     * direct match found, we try searching {@link #mFallbackSource}.
+     * When fourceRefresh is set to true, cache is refreshed and inflation of each
+     * EditField will occur.
+     */
+    public DataKind getKindOrFallback(String accountType, String mimeType, Context context,
+            int inflateLevel) {
+        DataKind kind = null;
+
+        // Try finding source and kind matching request
+        final BaseAccountType source = mSources.get(accountType);
+        if (source != null) {
+            source.ensureInflated(context, inflateLevel);
+            kind = source.getKindForMimetype(mimeType);
+        }
+
+        if (kind == null) {
+            // Nothing found, so try fallback as last resort
+            mFallbackSource.ensureInflated(context, inflateLevel);
+            kind = mFallbackSource.getKindForMimetype(mimeType);
+        }
+
+        if (kind == null) {
+            Log.w(TAG, "Unknown type=" + accountType + ", mime=" + mimeType);
+        }
+
+        return kind;
+    }
+
+    /**
+     * Return {@link BaseAccountType} for the given account type.
+     */
+    public BaseAccountType getInflatedSource(String accountType, int inflateLevel) {
+        // Try finding specific source, otherwise use fallback
+        BaseAccountType source = mSources.get(accountType);
+        if (source == null) source = mFallbackSource;
+
+        if (source.isInflated(inflateLevel)) {
+            // Already inflated, so return directly
+            return source;
+        } else {
+            // Not inflated, but requested that we force-inflate
+            source.ensureInflated(mContext, inflateLevel);
+            return source;
+        }
+    }
+}
diff --git a/src/com/android/contacts/model/BaseAccountType.java b/src/com/android/contacts/model/BaseAccountType.java
new file mode 100644
index 0000000..174195e
--- /dev/null
+++ b/src/com/android/contacts/model/BaseAccountType.java
@@ -0,0 +1,354 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import com.google.android.collect.Lists;
+import com.google.android.collect.Maps;
+
+import android.accounts.Account;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.database.Cursor;
+import android.graphics.drawable.Drawable;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.view.View;
+import android.widget.EditText;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Internal structure that represents constraints and styles for a specific data
+ * source, such as the various data types they support, including details on how
+ * those types should be rendered and edited.
+ * <p>
+ * In the future this may be inflated from XML defined by a data source.
+ */
+public abstract class BaseAccountType {
+    /**
+     * The {@link RawContacts#ACCOUNT_TYPE} these constraints apply to.
+     */
+    public String accountType = null;
+
+    /**
+     * Package that resources should be loaded from, either defined through an
+     * {@link Account} or for matching against {@link Data#RES_PACKAGE}.
+     */
+    public String resPackageName;
+    public String summaryResPackageName;
+
+    public int titleRes;
+    public int iconRes;
+
+    public boolean readOnly;
+
+    /**
+     * Set of {@link DataKind} supported by this source.
+     */
+    private ArrayList<DataKind> mKinds = Lists.newArrayList();
+
+    /**
+     * Lookup map of {@link #mKinds} on {@link DataKind#mimeType}.
+     */
+    private HashMap<String, DataKind> mMimeKinds = Maps.newHashMap();
+
+    public static final int LEVEL_NONE = 0;
+    public static final int LEVEL_SUMMARY = 1;
+    public static final int LEVEL_MIMETYPES = 2;
+    public static final int LEVEL_CONSTRAINTS = 3;
+
+    private int mInflatedLevel = LEVEL_NONE;
+
+    public synchronized boolean isInflated(int inflateLevel) {
+        return mInflatedLevel >= inflateLevel;
+    }
+
+    /** @hide exposed for unit tests */
+    public void setInflatedLevel(int inflateLevel) {
+        mInflatedLevel = inflateLevel;
+    }
+
+    /**
+     * Ensure that this {@link BaseAccountType} has been inflated to the
+     * requested level.
+     */
+    public synchronized void ensureInflated(Context context, int inflateLevel) {
+        if (!isInflated(inflateLevel)) {
+            inflate(context, inflateLevel);
+        }
+    }
+
+    /**
+     * Perform the actual inflation to the requested level. Called by
+     * {@link #ensureInflated(Context, int)} when inflation is needed.
+     */
+    protected abstract void inflate(Context context, int inflateLevel);
+
+    /**
+     * Invalidate any cache for this {@link BaseAccountType}, removing all
+     * inflated data. Calling {@link #ensureInflated(Context, int)} will
+     * populate again from scratch.
+     */
+    public synchronized void invalidateCache() {
+        this.mKinds.clear();
+        this.mMimeKinds.clear();
+        setInflatedLevel(LEVEL_NONE);
+    }
+
+    public CharSequence getDisplayLabel(Context context) {
+        if (this.titleRes != -1 && this.summaryResPackageName != null) {
+            final PackageManager pm = context.getPackageManager();
+            return pm.getText(this.summaryResPackageName, this.titleRes, null);
+        } else if (this.titleRes != -1) {
+            return context.getText(this.titleRes);
+        } else {
+            return this.accountType;
+        }
+    }
+
+    public Drawable getDisplayIcon(Context context) {
+        if (this.titleRes != -1 && this.summaryResPackageName != null) {
+            final PackageManager pm = context.getPackageManager();
+            return pm.getDrawable(this.summaryResPackageName, this.iconRes, null);
+        } else if (this.titleRes != -1) {
+            return context.getResources().getDrawable(this.iconRes);
+        } else {
+            return null;
+        }
+    }
+
+    abstract public int getHeaderColor(Context context);
+
+    abstract public int getSideBarColor(Context context);
+
+    /**
+     * {@link Comparator} to sort by {@link DataKind#weight}.
+     */
+    private static Comparator<DataKind> sWeightComparator = new Comparator<DataKind>() {
+        public int compare(DataKind object1, DataKind object2) {
+            return object1.weight - object2.weight;
+        }
+    };
+
+    /**
+     * Return list of {@link DataKind} supported, sorted by
+     * {@link DataKind#weight}.
+     */
+    public ArrayList<DataKind> getSortedDataKinds() {
+        // TODO: optimize by marking if already sorted
+        Collections.sort(mKinds, sWeightComparator);
+        return mKinds;
+    }
+
+    /**
+     * Find the {@link DataKind} for a specific MIME-type, if it's handled by
+     * this data source. If you may need a fallback {@link DataKind}, use
+     * {@link AccountTypes#getKindOrFallback(String, String, Context, int)}.
+     */
+    public DataKind getKindForMimetype(String mimeType) {
+        return this.mMimeKinds.get(mimeType);
+    }
+
+    /**
+     * Add given {@link DataKind} to list of those provided by this source.
+     */
+    public DataKind addKind(DataKind kind) {
+        kind.resPackageName = this.resPackageName;
+        this.mKinds.add(kind);
+        this.mMimeKinds.put(kind.mimeType, kind);
+        return kind;
+    }
+
+    /**
+     * Description of a specific data type, usually marked by a unique
+     * {@link Data#MIMETYPE}. Includes details about how to view and edit
+     * {@link Data} rows of this kind, including the possible {@link EditType}
+     * labels and editable {@link EditField}.
+     */
+    public static class DataKind {
+        public String resPackageName;
+        public String mimeType;
+        public int titleRes;
+        public int iconRes;
+        public int iconAltRes;
+        public int weight;
+        public boolean secondary;
+        public boolean editable;
+
+        /**
+         * If this is true (default), the user can add and remove values.
+         * If false, the editor will always show a single field (which might be empty).
+         */
+        public boolean isList;
+
+        public StringInflater actionHeader;
+        public StringInflater actionAltHeader;
+        public StringInflater actionBody;
+
+        public boolean actionBodySocial = false;
+
+        public String typeColumn;
+
+        /**
+         * Maximum number of values allowed in the list. -1 represents infinity.
+         * If {@link DataKind#isList} is false, this value is ignored.
+         */
+        public int typeOverallMax;
+
+        public List<EditType> typeList;
+        public List<EditField> fieldList;
+
+        public ContentValues defaultValues;
+
+        public Class<? extends View> editorClass;
+
+        public DataKind() {
+        }
+
+        public DataKind(String mimeType, int titleRes, int iconRes, int weight, boolean editable) {
+            this(mimeType, titleRes, iconRes, weight, editable, null);
+        }
+
+        public DataKind(String mimeType, int titleRes, int iconRes, int weight, boolean editable,
+                Class<? extends View> editorClass) {
+            this.mimeType = mimeType;
+            this.titleRes = titleRes;
+            this.iconRes = iconRes;
+            this.weight = weight;
+            this.editable = editable;
+            this.isList = true;
+            this.typeOverallMax = -1;
+            this.editorClass = editorClass;
+        }
+    }
+
+    /**
+     * Description of a specific "type" or "label" of a {@link DataKind} row,
+     * such as {@link Phone#TYPE_WORK}. Includes constraints on total number of
+     * rows a {@link Contacts} may have of this type, and details on how
+     * user-defined labels are stored.
+     */
+    public static class EditType {
+        public int rawValue;
+        public int labelRes;
+//        public int actionRes;
+//        public int actionAltRes;
+        public boolean secondary;
+        public int specificMax;
+        public String customColumn;
+
+        public EditType(int rawValue, int labelRes) {
+            this.rawValue = rawValue;
+            this.labelRes = labelRes;
+            this.specificMax = -1;
+        }
+
+        public EditType setSecondary(boolean secondary) {
+            this.secondary = secondary;
+            return this;
+        }
+
+        public EditType setSpecificMax(int specificMax) {
+            this.specificMax = specificMax;
+            return this;
+        }
+
+        public EditType setCustomColumn(String customColumn) {
+            this.customColumn = customColumn;
+            return this;
+        }
+
+        @Override
+        public boolean equals(Object object) {
+            if (object instanceof EditType) {
+                final EditType other = (EditType)object;
+                return other.rawValue == rawValue;
+            }
+            return false;
+        }
+
+        @Override
+        public int hashCode() {
+            return rawValue;
+        }
+    }
+
+    /**
+     * Description of a user-editable field on a {@link DataKind} row, such as
+     * {@link Phone#NUMBER}. Includes flags to apply to an {@link EditText}, and
+     * the column where this field is stored.
+     */
+    public static class EditField {
+        public String column;
+        public int titleRes;
+        public int inputType;
+        public int minLines;
+        public boolean optional;
+        public boolean shortForm;
+        public boolean longForm;
+
+        public EditField(String column, int titleRes) {
+            this.column = column;
+            this.titleRes = titleRes;
+        }
+
+        public EditField(String column, int titleRes, int inputType) {
+            this(column, titleRes);
+            this.inputType = inputType;
+        }
+
+        public EditField setOptional(boolean optional) {
+            this.optional = optional;
+            return this;
+        }
+
+        public EditField setShortForm(boolean shortForm) {
+            this.shortForm = shortForm;
+            return this;
+        }
+
+        public EditField setLongForm(boolean longForm) {
+            this.longForm = longForm;
+            return this;
+        }
+
+        public EditField setMinLines(int minLines) {
+            this.minLines = minLines;
+            return this;
+        }
+    }
+
+    /**
+     * Generic method of inflating a given {@link Cursor} into a user-readable
+     * {@link CharSequence}. For example, an inflater could combine the multiple
+     * columns of {@link StructuredPostal} together using a string resource
+     * before presenting to the user.
+     */
+    public interface StringInflater {
+        public CharSequence inflateUsing(Context context, Cursor cursor);
+        public CharSequence inflateUsing(Context context, ContentValues values);
+    }
+
+}
diff --git a/src/com/android/contacts/model/ContactsSource.java b/src/com/android/contacts/model/ContactsSource.java
deleted file mode 100644
index d008482..0000000
--- a/src/com/android/contacts/model/ContactsSource.java
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
-
-import android.accounts.Account;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.database.Cursor;
-import android.graphics.drawable.Drawable;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
-import android.widget.EditText;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * Internal structure that represents constraints and styles for a specific data
- * source, such as the various data types they support, including details on how
- * those types should be rendered and edited.
- * <p>
- * In the future this may be inflated from XML defined by a data source.
- */
-public abstract class ContactsSource {
-    /**
-     * The {@link RawContacts#ACCOUNT_TYPE} these constraints apply to.
-     */
-    public String accountType = null;
-
-    /**
-     * Package that resources should be loaded from, either defined through an
-     * {@link Account} or for matching against {@link Data#RES_PACKAGE}.
-     */
-    public String resPackageName;
-    public String summaryResPackageName;
-
-    public int titleRes;
-    public int iconRes;
-
-    public boolean readOnly;
-
-    /**
-     * Set of {@link DataKind} supported by this source.
-     */
-    private ArrayList<DataKind> mKinds = Lists.newArrayList();
-
-    /**
-     * Lookup map of {@link #mKinds} on {@link DataKind#mimeType}.
-     */
-    private HashMap<String, DataKind> mMimeKinds = Maps.newHashMap();
-
-    public static final int LEVEL_NONE = 0;
-    public static final int LEVEL_SUMMARY = 1;
-    public static final int LEVEL_MIMETYPES = 2;
-    public static final int LEVEL_CONSTRAINTS = 3;
-
-    private int mInflatedLevel = LEVEL_NONE;
-
-    public synchronized boolean isInflated(int inflateLevel) {
-        return mInflatedLevel >= inflateLevel;
-    }
-
-    /** @hide exposed for unit tests */
-    public void setInflatedLevel(int inflateLevel) {
-        mInflatedLevel = inflateLevel;
-    }
-
-    /**
-     * Ensure that this {@link ContactsSource} has been inflated to the
-     * requested level.
-     */
-    public synchronized void ensureInflated(Context context, int inflateLevel) {
-        if (!isInflated(inflateLevel)) {
-            inflate(context, inflateLevel);
-        }
-    }
-
-    /**
-     * Perform the actual inflation to the requested level. Called by
-     * {@link #ensureInflated(Context, int)} when inflation is needed.
-     */
-    protected abstract void inflate(Context context, int inflateLevel);
-
-    /**
-     * Invalidate any cache for this {@link ContactsSource}, removing all
-     * inflated data. Calling {@link #ensureInflated(Context, int)} will
-     * populate again from scratch.
-     */
-    public synchronized void invalidateCache() {
-        this.mKinds.clear();
-        this.mMimeKinds.clear();
-        setInflatedLevel(LEVEL_NONE);
-    }
-
-    public CharSequence getDisplayLabel(Context context) {
-        if (this.titleRes != -1 && this.summaryResPackageName != null) {
-            final PackageManager pm = context.getPackageManager();
-            return pm.getText(this.summaryResPackageName, this.titleRes, null);
-        } else if (this.titleRes != -1) {
-            return context.getText(this.titleRes);
-        } else {
-            return this.accountType;
-        }
-    }
-
-    public Drawable getDisplayIcon(Context context) {
-        if (this.titleRes != -1 && this.summaryResPackageName != null) {
-            final PackageManager pm = context.getPackageManager();
-            return pm.getDrawable(this.summaryResPackageName, this.iconRes, null);
-        } else if (this.titleRes != -1) {
-            return context.getResources().getDrawable(this.iconRes);
-        } else {
-            return null;
-        }
-    }
-
-    abstract public int getHeaderColor(Context context);
-
-    abstract public int getSideBarColor(Context context);
-
-    /**
-     * {@link Comparator} to sort by {@link DataKind#weight}.
-     */
-    private static Comparator<DataKind> sWeightComparator = new Comparator<DataKind>() {
-        public int compare(DataKind object1, DataKind object2) {
-            return object1.weight - object2.weight;
-        }
-    };
-
-    /**
-     * Return list of {@link DataKind} supported, sorted by
-     * {@link DataKind#weight}.
-     */
-    public ArrayList<DataKind> getSortedDataKinds() {
-        // TODO: optimize by marking if already sorted
-        Collections.sort(mKinds, sWeightComparator);
-        return mKinds;
-    }
-
-    /**
-     * Find the {@link DataKind} for a specific MIME-type, if it's handled by
-     * this data source. If you may need a fallback {@link DataKind}, use
-     * {@link Sources#getKindOrFallback(String, String, Context, int)}.
-     */
-    public DataKind getKindForMimetype(String mimeType) {
-        return this.mMimeKinds.get(mimeType);
-    }
-
-    /**
-     * Add given {@link DataKind} to list of those provided by this source.
-     */
-    public DataKind addKind(DataKind kind) {
-        kind.resPackageName = this.resPackageName;
-        this.mKinds.add(kind);
-        this.mMimeKinds.put(kind.mimeType, kind);
-        return kind;
-    }
-
-    /**
-     * Description of a specific data type, usually marked by a unique
-     * {@link Data#MIMETYPE}. Includes details about how to view and edit
-     * {@link Data} rows of this kind, including the possible {@link EditType}
-     * labels and editable {@link EditField}.
-     */
-    public static class DataKind {
-        public String resPackageName;
-        public String mimeType;
-        public int titleRes;
-        public int iconRes;
-        public int iconAltRes;
-        public int weight;
-        public boolean secondary;
-        public boolean editable;
-
-        /**
-         * If this is true (default), the user can add and remove values.
-         * If false, the editor will always show a single field (which might be empty).
-         */
-        public boolean isList;
-
-        public StringInflater actionHeader;
-        public StringInflater actionAltHeader;
-        public StringInflater actionBody;
-
-        public boolean actionBodySocial = false;
-
-        public String typeColumn;
-
-        /**
-         * Maximum number of values allowed in the list. -1 represents infinity.
-         * If {@link DataKind#isList} is false, this value is ignored.
-         */
-        public int typeOverallMax;
-
-        public List<EditType> typeList;
-        public List<EditField> fieldList;
-
-        public ContentValues defaultValues;
-
-        public DataKind() {
-        }
-
-        public DataKind(String mimeType, int titleRes, int iconRes, int weight, boolean editable) {
-            this.mimeType = mimeType;
-            this.titleRes = titleRes;
-            this.iconRes = iconRes;
-            this.weight = weight;
-            this.editable = editable;
-            this.isList = true;
-            this.typeOverallMax = -1;
-        }
-    }
-
-    /**
-     * Description of a specific "type" or "label" of a {@link DataKind} row,
-     * such as {@link Phone#TYPE_WORK}. Includes constraints on total number of
-     * rows a {@link Contacts} may have of this type, and details on how
-     * user-defined labels are stored.
-     */
-    public static class EditType {
-        public int rawValue;
-        public int labelRes;
-//        public int actionRes;
-//        public int actionAltRes;
-        public boolean secondary;
-        public int specificMax;
-        public String customColumn;
-
-        public EditType(int rawValue, int labelRes) {
-            this.rawValue = rawValue;
-            this.labelRes = labelRes;
-            this.specificMax = -1;
-        }
-
-        public EditType setSecondary(boolean secondary) {
-            this.secondary = secondary;
-            return this;
-        }
-
-        public EditType setSpecificMax(int specificMax) {
-            this.specificMax = specificMax;
-            return this;
-        }
-
-        public EditType setCustomColumn(String customColumn) {
-            this.customColumn = customColumn;
-            return this;
-        }
-
-        @Override
-        public boolean equals(Object object) {
-            if (object instanceof EditType) {
-                final EditType other = (EditType)object;
-                return other.rawValue == rawValue;
-            }
-            return false;
-        }
-
-        @Override
-        public int hashCode() {
-            return rawValue;
-        }
-    }
-
-    /**
-     * Description of a user-editable field on a {@link DataKind} row, such as
-     * {@link Phone#NUMBER}. Includes flags to apply to an {@link EditText}, and
-     * the column where this field is stored.
-     */
-    public static class EditField {
-        public String column;
-        public int titleRes;
-        public int inputType;
-        public int minLines;
-        public boolean optional;
-
-        public EditField(String column, int titleRes) {
-            this.column = column;
-            this.titleRes = titleRes;
-        }
-
-        public EditField(String column, int titleRes, int inputType) {
-            this(column, titleRes);
-            this.inputType = inputType;
-        }
-
-        public EditField setOptional(boolean optional) {
-            this.optional = optional;
-            return this;
-        }
-    }
-
-    /**
-     * Generic method of inflating a given {@link Cursor} into a user-readable
-     * {@link CharSequence}. For example, an inflater could combine the multiple
-     * columns of {@link StructuredPostal} together using a string resource
-     * before presenting to the user.
-     */
-    public interface StringInflater {
-        public CharSequence inflateUsing(Context context, Cursor cursor);
-        public CharSequence inflateUsing(Context context, ContentValues values);
-    }
-
-}
diff --git a/src/com/android/contacts/model/Editor.java b/src/com/android/contacts/model/Editor.java
deleted file mode 100644
index 473f0d3..0000000
--- a/src/com/android/contacts/model/Editor.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.provider.ContactsContract.Data;
-
-/**
- * Generic definition of something that edits a {@link Data} row through an
- * {@link ValuesDelta} object.
- */
-public interface Editor {
-    /**
-     * Listener for an {@link Editor}, usually to handle deleted items.
-     */
-    public interface EditorListener {
-        /**
-         * Called when the given {@link Editor} has been deleted.
-         */
-        public void onDeleted(Editor editor);
-
-        /**
-         * Called when the given {@link Editor} has a request, for example it
-         * wants to select a photo.
-         */
-        public void onRequest(int request);
-
-        public static final int REQUEST_PICK_PHOTO = 1;
-        public static final int FIELD_CHANGED = 2;
-    }
-
-    /**
-     * Prepare this editor for the given {@link ValuesDelta}, which
-     * builds any needed views. Any changes performed by the user will be
-     * written back to that same object.
-     */
-    public void setValues(DataKind kind, ValuesDelta values, EntityDelta state, boolean readOnly,
-            ViewIdGenerator vig);
-
-    /**
-     * Add a specific {@link EditorListener} to this {@link Editor}.
-     */
-    public void setEditorListener(EditorListener listener);
-
-    /**
-     * Called internally when the contents of a specific field have changed,
-     * allowing advanced editors to persist data in a specific way.
-     */
-    public void onFieldChanged(String column, String value);
-}
diff --git a/src/com/android/contacts/model/EntityDelta.java b/src/com/android/contacts/model/EntityDelta.java
index cdf2e41..a1f3848 100644
--- a/src/com/android/contacts/model/EntityDelta.java
+++ b/src/com/android/contacts/model/EntityDelta.java
@@ -21,24 +21,23 @@
 import com.google.android.collect.Sets;
 
 import android.content.ContentProviderOperation;
+import android.content.ContentProviderOperation.Builder;
 import android.content.ContentValues;
 import android.content.Entity;
-import android.content.ContentProviderOperation.Builder;
 import android.content.Entity.NamedContentValues;
 import android.net.Uri;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.provider.BaseColumns;
-import android.provider.ContactsContract;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
 import android.provider.ContactsContract.Data;
 import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
 import android.util.Log;
-import android.view.View;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -241,6 +240,18 @@
         return entry;
     }
 
+    public ArrayList<ContentValues> getContentValues() {
+        ArrayList<ContentValues> values = Lists.newArrayList();
+        for (ArrayList<ValuesDelta> mimeEntries : mEntries.values()) {
+            for (ValuesDelta entry : mimeEntries) {
+                if (!entry.isDelete()) {
+                    values.add(entry.getCompleteValues());
+                }
+            }
+        }
+        return values;
+    }
+
     /**
      * Find entry with the given {@link BaseColumns#_ID} value.
      */
@@ -578,6 +589,21 @@
             }
         }
 
+        public boolean isChanged(String key) {
+            if (mAfter == null || !mAfter.containsKey(key)) {
+                return false;
+            }
+
+            Object newValue = mAfter.get(key);
+            Object oldValue = mBefore.get(key);
+
+            if (oldValue == null) {
+                return newValue != null;
+            }
+
+            return !oldValue.equals(newValue);
+        }
+
         public String getMimetype() {
             return getAsString(Data.MIMETYPE);
         }
@@ -612,33 +638,45 @@
             return (mBefore != null && mBefore.containsKey(mIdColumn));
         }
 
+        /**
+         * When "after" is present, then visible
+         */
         public boolean isVisible() {
-            // When "after" is present, then visible
             return (mAfter != null);
         }
 
+        /**
+         * When "after" is wiped, action is "delete"
+         */
         public boolean isDelete() {
-            // When "after" is wiped, action is "delete"
             return beforeExists() && (mAfter == null);
         }
 
+        /**
+         * When no "before" or "after", is transient
+         */
         public boolean isTransient() {
-            // When no "before" or "after", is transient
             return (mBefore == null) && (mAfter == null);
         }
 
+        /**
+         * When "after" has some changes, action is "update"
+         */
         public boolean isUpdate() {
-            // When "after" has some changes, action is "update"
             return beforeExists() && (mAfter != null && mAfter.size() > 0);
         }
 
+        /**
+         * When "after" has no changes, action is no-op
+         */
         public boolean isNoop() {
-            // When "after" has no changes, action is no-op
             return beforeExists() && (mAfter != null && mAfter.size() == 0);
         }
 
+        /**
+         * When no "before" id, and has "after", action is "insert"
+         */
         public boolean isInsert() {
-            // When no "before" id, and has "after", action is "insert"
             return !beforeExists() && (mAfter != null);
         }
 
@@ -670,6 +708,16 @@
             mAfter.put(key, value);
         }
 
+        public void put(String key, long value) {
+            ensureUpdate();
+            mAfter.put(key, value);
+        }
+
+        public void putNull(String key) {
+            ensureUpdate();
+            mAfter.putNull(key);
+        }
+
         /**
          * Return set of all keys defined through this object.
          */
diff --git a/src/com/android/contacts/model/EntityDeltaList.java b/src/com/android/contacts/model/EntityDeltaList.java
new file mode 100644
index 0000000..455cced
--- /dev/null
+++ b/src/com/android/contacts/model/EntityDeltaList.java
@@ -0,0 +1,385 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import android.content.ContentProviderOperation;
+import android.content.ContentResolver;
+import android.content.Entity;
+import android.content.EntityIterator;
+import android.content.ContentProviderOperation.Builder;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.provider.ContactsContract.AggregationExceptions;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.ContactsContract.RawContactsEntity;
+
+import com.google.android.collect.Lists;
+
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Container for multiple {@link EntityDelta} objects, usually when editing
+ * together as an entire aggregate. Provides convenience methods for parceling
+ * and applying another {@link EntityDeltaList} over it.
+ */
+public class EntityDeltaList extends ArrayList<EntityDelta> implements Parcelable {
+    private boolean mSplitRawContacts;
+    private List<Long> mJoinWithRawContactIds;
+
+    private EntityDeltaList() {
+    }
+
+    /**
+     * Create an {@link EntityDeltaList} that contains the given {@link EntityDelta},
+     * usually when inserting a new {@link Contacts} entry.
+     */
+    public static EntityDeltaList fromSingle(EntityDelta delta) {
+        final EntityDeltaList state = new EntityDeltaList();
+        state.add(delta);
+        return state;
+    }
+
+    /**
+     * Create an {@link EntityDeltaList} based on {@link Contacts} specified by the
+     * given query parameters. This closes the {@link EntityIterator} when
+     * finished, so it doesn't subscribe to updates.
+     */
+    public static EntityDeltaList fromQuery(ContentResolver resolver, String selection,
+            String[] selectionArgs, String sortOrder) {
+        final EntityIterator iterator = RawContacts.newEntityIterator(resolver.query(
+                RawContactsEntity.CONTENT_URI, null, selection, selectionArgs,
+                sortOrder));
+        try {
+            return fromIterator(iterator);
+        } finally {
+            iterator.close();
+        }
+    }
+
+    /**
+     * Create an {@link EntityDeltaList} that contains the entities of the Iterator as before
+     * values.
+     */
+    public static EntityDeltaList fromIterator(Iterator<Entity> iterator) {
+        final EntityDeltaList state = new EntityDeltaList();
+        // Perform background query to pull contact details
+        while (iterator.hasNext()) {
+            // Read all contacts into local deltas to prepare for edits
+            final Entity before = iterator.next();
+            final EntityDelta entity = EntityDelta.fromBefore(before);
+            state.add(entity);
+        }
+        return state;
+    }
+
+    /**
+     * Merge the "after" values from the given {@link EntityDeltaList}, discarding any
+     * previous "after" states. This is typically used when re-parenting user
+     * edits onto an updated {@link EntityDeltaList}.
+     */
+    public static EntityDeltaList mergeAfter(EntityDeltaList local, EntityDeltaList remote) {
+        if (local == null) local = new EntityDeltaList();
+
+        // For each entity in the remote set, try matching over existing
+        for (EntityDelta remoteEntity : remote) {
+            final Long rawContactId = remoteEntity.getValues().getId();
+
+            // Find or create local match and merge
+            final EntityDelta localEntity = local.getByRawContactId(rawContactId);
+            final EntityDelta merged = EntityDelta.mergeAfter(localEntity, remoteEntity);
+
+            if (localEntity == null && merged != null) {
+                // No local entry before, so insert
+                local.add(merged);
+            }
+        }
+
+        return local;
+    }
+
+    /**
+     * Build a list of {@link ContentProviderOperation} that will transform all
+     * the "before" {@link Entity} states into the modified state which all
+     * {@link EntityDelta} objects represent. This method specifically creates
+     * any {@link AggregationExceptions} rules needed to groups edits together.
+     */
+    public ArrayList<ContentProviderOperation> buildDiff() {
+        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
+
+        final long rawContactId = this.findRawContactId();
+        int firstInsertRow = -1;
+
+        // First pass enforces versions remain consistent
+        for (EntityDelta delta : this) {
+            delta.buildAssert(diff);
+        }
+
+        final int assertMark = diff.size();
+        int backRefs[] = new int[size()];
+
+        int rawContactIndex = 0;
+
+        // Second pass builds actual operations
+        for (EntityDelta delta : this) {
+            final int firstBatch = diff.size();
+            final boolean isInsert = delta.isContactInsert();
+            backRefs[rawContactIndex++] = isInsert ? firstBatch : -1;
+
+            delta.buildDiff(diff);
+
+            // If the user chose to join with some other existing raw contact(s) at save time,
+            // add aggregation exceptions for all those raw contacts.
+            if (mJoinWithRawContactIds != null) {
+                for (Long joinedRawContactId : mJoinWithRawContactIds) {
+                    final Builder builder = beginKeepTogether();
+                    builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, joinedRawContactId);
+                    if (rawContactId != -1) {
+                        builder.withValue(AggregationExceptions.RAW_CONTACT_ID2, rawContactId);
+                    } else {
+                        builder.withValueBackReference(
+                                AggregationExceptions.RAW_CONTACT_ID2, firstBatch);
+                    }
+                    diff.add(builder.build());
+                }
+            }
+
+            // Only create rules for inserts
+            if (!isInsert) continue;
+
+            // If we are going to split all contacts, there is no point in first combining them
+            if (mSplitRawContacts) continue;
+
+            if (rawContactId != -1) {
+                // Has existing contact, so bind to it strongly
+                final Builder builder = beginKeepTogether();
+                builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId);
+                builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID2, firstBatch);
+                diff.add(builder.build());
+
+            } else if (firstInsertRow == -1) {
+                // First insert case, so record row
+                firstInsertRow = firstBatch;
+
+            } else {
+                // Additional insert case, so point at first insert
+                final Builder builder = beginKeepTogether();
+                builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID1,
+                        firstInsertRow);
+                builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID2, firstBatch);
+                diff.add(builder.build());
+            }
+        }
+
+        if (mSplitRawContacts) {
+            buildSplitContactDiff(diff, backRefs);
+        }
+
+        // No real changes if only left with asserts
+        if (diff.size() == assertMark) {
+            diff.clear();
+        }
+
+        return diff;
+    }
+
+    /**
+     * Start building a {@link ContentProviderOperation} that will keep two
+     * {@link RawContacts} together.
+     */
+    protected Builder beginKeepTogether() {
+        final Builder builder = ContentProviderOperation
+                .newUpdate(AggregationExceptions.CONTENT_URI);
+        builder.withValue(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_TOGETHER);
+        return builder;
+    }
+
+    /**
+     * Builds {@link AggregationExceptions} to split all constituent raw contacts into
+     * separate contacts.
+     */
+    private void buildSplitContactDiff(final ArrayList<ContentProviderOperation> diff,
+            int[] backRefs) {
+        int count = size();
+        for (int i = 0; i < count; i++) {
+            for (int j = 0; j < count; j++) {
+                if (i != j) {
+                    buildSplitContactDiff(diff, i, j, backRefs);
+                }
+            }
+        }
+    }
+
+    /**
+     * Construct a {@link AggregationExceptions#TYPE_KEEP_SEPARATE}.
+     */
+    private void buildSplitContactDiff(ArrayList<ContentProviderOperation> diff, int index1,
+            int index2, int[] backRefs) {
+        Builder builder =
+                ContentProviderOperation.newUpdate(AggregationExceptions.CONTENT_URI);
+        builder.withValue(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_SEPARATE);
+
+        Long rawContactId1 = get(index1).getValues().getAsLong(RawContacts._ID);
+        int backRef1 = backRefs[index1];
+        if (rawContactId1 != null && rawContactId1 >= 0) {
+            builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId1);
+        } else if (backRef1 >= 0) {
+            builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID1, backRef1);
+        } else {
+            return;
+        }
+
+        Long rawContactId2 = get(index2).getValues().getAsLong(RawContacts._ID);
+        int backRef2 = backRefs[index2];
+        if (rawContactId2 != null && rawContactId2 >= 0) {
+            builder.withValue(AggregationExceptions.RAW_CONTACT_ID2, rawContactId2);
+        } else if (backRef2 >= 0) {
+            builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID2, backRef2);
+        } else {
+            return;
+        }
+
+        diff.add(builder.build());
+    }
+
+    /**
+     * Search all contained {@link EntityDelta} for the first one with an
+     * existing {@link RawContacts#_ID} value. Usually used when creating
+     * {@link AggregationExceptions} during an update.
+     */
+    public long findRawContactId() {
+        for (EntityDelta delta : this) {
+            final Long rawContactId = delta.getValues().getAsLong(RawContacts._ID);
+            if (rawContactId != null && rawContactId >= 0) {
+                return rawContactId;
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * Find {@link RawContacts#_ID} of the requested {@link EntityDelta}.
+     */
+    public Long getRawContactId(int index) {
+        if (index >= 0 && index < this.size()) {
+            final EntityDelta delta = this.get(index);
+            final ValuesDelta values = delta.getValues();
+            if (values.isVisible()) {
+                return values.getAsLong(RawContacts._ID);
+            }
+        }
+        return null;
+    }
+
+    public EntityDelta getByRawContactId(Long rawContactId) {
+        final int index = this.indexOfRawContactId(rawContactId);
+        return (index == -1) ? null : this.get(index);
+    }
+
+    /**
+     * Find index of given {@link RawContacts#_ID} when present.
+     */
+    public int indexOfRawContactId(Long rawContactId) {
+        if (rawContactId == null) return -1;
+        final int size = this.size();
+        for (int i = 0; i < size; i++) {
+            final Long currentId = getRawContactId(i);
+            if (rawContactId.equals(currentId)) {
+                return i;
+            }
+        }
+        return -1;
+    }
+
+    public ValuesDelta getSuperPrimaryEntry(final String mimeType) {
+        ValuesDelta primary = null;
+        ValuesDelta randomEntry = null;
+        for (EntityDelta delta : this) {
+            final ArrayList<ValuesDelta> mimeEntries = delta.getMimeEntries(mimeType);
+            if (mimeEntries == null) return null;
+
+            for (ValuesDelta entry : mimeEntries) {
+                if (entry.isSuperPrimary()) {
+                    return entry;
+                } else if (primary == null && entry.isPrimary()) {
+                    primary = entry;
+                } else if (randomEntry == null) {
+                    randomEntry = entry;
+                }
+            }
+        }
+        // When no direct super primary, return something
+        if (primary != null) {
+            return primary;
+        }
+        return randomEntry;
+    }
+
+    /**
+     * Sets a flag that will split ("explode") the raw_contacts into seperate contacts
+     */
+    public void markRawContactsForSplitting() {
+        mSplitRawContacts = true;
+    }
+
+    public void setJoinWithRawContacts(List<Long> rawContactIds) {
+        mJoinWithRawContactIds = rawContactIds;
+    }
+
+    /** {@inheritDoc} */
+    public int describeContents() {
+        // Nothing special about this parcel
+        return 0;
+    }
+
+    /** {@inheritDoc} */
+    public void writeToParcel(Parcel dest, int flags) {
+        final int size = this.size();
+        dest.writeInt(size);
+        for (EntityDelta delta : this) {
+            dest.writeParcelable(delta, flags);
+        }
+        dest.writeList(mJoinWithRawContactIds);
+    }
+
+    @SuppressWarnings("unchecked")
+    public void readFromParcel(Parcel source) {
+        final ClassLoader loader = getClass().getClassLoader();
+        final int size = source.readInt();
+        for (int i = 0; i < size; i++) {
+            this.add(source.<EntityDelta> readParcelable(loader));
+        }
+        mJoinWithRawContactIds = source.readArrayList(loader);
+    }
+
+    public static final Parcelable.Creator<EntityDeltaList> CREATOR =
+            new Parcelable.Creator<EntityDeltaList>() {
+        public EntityDeltaList createFromParcel(Parcel in) {
+            final EntityDeltaList state = new EntityDeltaList();
+            state.readFromParcel(in);
+            return state;
+        }
+
+        public EntityDeltaList[] newArray(int size) {
+            return new EntityDeltaList[size];
+        }
+    };
+}
diff --git a/src/com/android/contacts/model/EntityDiff.java b/src/com/android/contacts/model/EntityDiff.java
deleted file mode 100644
index ea46567..0000000
--- a/src/com/android/contacts/model/EntityDiff.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import android.content.ContentProviderOperation;
-import android.content.ContentValues;
-import android.content.Entity;
-import android.content.ContentProviderOperation.Builder;
-import android.content.Entity.NamedContentValues;
-import android.net.Uri;
-import android.provider.BaseColumns;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-
-/**
- * Describes a set of {@link ContentProviderOperation} that need to be
- * executed to transform a database from one {@link Entity} to another.
- */
-@Deprecated
-public class EntityDiff extends ArrayList<ContentProviderOperation> {
-    private EntityDiff() {
-    }
-
-    /**
-     * Build the set of {@link ContentProviderOperation} needed to translate
-     * from "before" to "after". Tries its best to keep operations to
-     * minimal number required. Assumes that all {@link ContentValues} are
-     * keyed using {@link BaseColumns#_ID} values.
-     */
-    public static EntityDiff buildDiff(Entity before, Entity after, Uri targetUri,
-            String childForeignKey) {
-        final EntityDiff diff = new EntityDiff();
-
-        Builder builder;
-        ContentValues values;
-
-        if (before == null) {
-            // Before doesn't exist, so insert "after" values
-            builder = ContentProviderOperation.newInsert(targetUri);
-            builder.withValues(after.getEntityValues());
-            diff.add(builder.build());
-
-            for (NamedContentValues child : after.getSubValues()) {
-                // Add builder with reference to original _id when needed
-                builder = ContentProviderOperation.newInsert(child.uri);
-                builder.withValues(child.values);
-                if (childForeignKey != null) {
-                    builder.withValueBackReference(childForeignKey, 0);
-                }
-                diff.add(builder.build());
-            }
-
-        } else if (after == null) {
-            // After doesn't exist, so delete "before" values
-            for (NamedContentValues child : before.getSubValues()) {
-                builder = ContentProviderOperation.newDelete(child.uri);
-                builder.withSelection(getSelectIdClause(child.values), null);
-                diff.add(builder.build());
-            }
-
-            builder = ContentProviderOperation.newDelete(targetUri);
-            builder.withSelection(getSelectIdClause(before.getEntityValues()), null);
-            diff.add(builder.build());
-
-        } else {
-            // Somewhere between, so update any changed values
-            values = after.getEntityValues();
-            if (!before.getEntityValues().equals(values)) {
-                // Top-level values changed, so update
-                builder = ContentProviderOperation.newUpdate(targetUri);
-                builder.withSelection(getSelectIdClause(values), null);
-                builder.withValues(values);
-                diff.add(builder.build());
-            }
-
-            // Build lookup maps for children on both sides
-            final HashMap<String, NamedContentValues> beforeChildren = buildChildrenMap(before);
-            final HashMap<String, NamedContentValues> afterChildren = buildChildrenMap(after);
-
-            // Walk through "before" children looking for deletes and updates
-            for (NamedContentValues beforeChild : beforeChildren.values()) {
-                final String key = buildChildKey(beforeChild);
-                final NamedContentValues afterChild = afterChildren.get(key);
-
-                if (afterChild == null) {
-                    // After child doesn't exist, so delete "before" child
-                    builder = ContentProviderOperation.newDelete(beforeChild.uri);
-                    builder.withSelection(getSelectIdClause(beforeChild.values), null);
-                    diff.add(builder.build());
-                } else if (!beforeChild.values.equals(afterChild.values)) {
-                    // After child still exists, and is different, so update
-                    values = afterChild.values;
-                    builder = ContentProviderOperation.newUpdate(afterChild.uri);
-                    builder.withSelection(getSelectIdClause(values), null);
-                    builder.withValues(values);
-                    diff.add(builder.build());
-                }
-
-                // Remove the now-handled "after" child
-                afterChildren.remove(key);
-            }
-
-            // Walk through remaining "after" children, which are inserts
-            for (NamedContentValues afterChild : afterChildren.values()) {
-                builder = ContentProviderOperation.newInsert(afterChild.uri);
-                builder.withValues(afterChild.values);
-                diff.add(builder.build());
-            }
-        }
-
-        return diff;
-    }
-
-    private static String buildChildKey(NamedContentValues child) {
-        return child.uri.toString() + child.values.getAsString(BaseColumns._ID);
-    }
-
-    private static String getSelectIdClause(ContentValues values) {
-        return BaseColumns._ID + "=" + values.getAsLong(BaseColumns._ID);
-    }
-
-    private static HashMap<String, NamedContentValues> buildChildrenMap(Entity entity) {
-        final ArrayList<NamedContentValues> children = entity.getSubValues();
-        final HashMap<String, NamedContentValues> childrenMap = new HashMap<String, NamedContentValues>(
-                children.size());
-        for (NamedContentValues child : children) {
-            final String key = buildChildKey(child);
-            childrenMap.put(key, child);
-        }
-        return childrenMap;
-    }
-}
diff --git a/src/com/android/contacts/model/EntityModifier.java b/src/com/android/contacts/model/EntityModifier.java
index 2e6899e..8765a3f 100644
--- a/src/com/android/contacts/model/EntityModifier.java
+++ b/src/com/android/contacts/model/EntityModifier.java
@@ -17,9 +17,9 @@
 package com.android.contacts.model;
 
 import com.android.contacts.ContactsUtils;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.ContactsSource.EditField;
-import com.android.contacts.model.ContactsSource.EditType;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.BaseAccountType.EditField;
+import com.android.contacts.model.BaseAccountType.EditType;
 import com.android.contacts.model.EntityDelta.ValuesDelta;
 import com.google.android.collect.Lists;
 
@@ -27,6 +27,7 @@
 import android.content.Context;
 import android.database.Cursor;
 import android.os.Bundle;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
 import android.provider.ContactsContract.Data;
 import android.provider.ContactsContract.Intents;
 import android.provider.ContactsContract.RawContacts;
@@ -50,7 +51,7 @@
 
 /**
  * Helper methods for modifying an {@link EntityDelta}, such as inserting
- * new rows, or enforcing {@link ContactsSource}.
+ * new rows, or enforcing {@link BaseAccountType}.
  */
 public class EntityModifier {
     private static final String TAG = "EntityModifier";
@@ -58,7 +59,7 @@
     /**
      * For the given {@link EntityDelta}, determine if the given
      * {@link DataKind} could be inserted under specific
-     * {@link ContactsSource}.
+     * {@link BaseAccountType}.
      */
     public static boolean canInsert(EntityDelta state, DataKind kind) {
         // Insert possible when have valid types and under overall maximum
@@ -81,7 +82,7 @@
      * Ensure that at least one of the given {@link DataKind} exists in the
      * given {@link EntityDelta} state, and try creating one if none exist.
      */
-    public static void ensureKindExists(EntityDelta state, ContactsSource source, String mimeType) {
+    public static void ensureKindExists(EntityDelta state, BaseAccountType source, String mimeType) {
         final DataKind kind = source.getKindForMimetype(mimeType);
         final boolean hasChild = state.getMimeEntriesCount(mimeType, true) > 0;
 
@@ -97,7 +98,7 @@
     /**
      * For the given {@link EntityDelta} and {@link DataKind}, return the
      * list possible {@link EditType} options available based on
-     * {@link ContactsSource}.
+     * {@link BaseAccountType}.
      */
     public static ArrayList<EditType> getValidTypes(EntityDelta state, DataKind kind) {
         return getValidTypes(state, kind, null, true, null);
@@ -106,7 +107,7 @@
     /**
      * For the given {@link EntityDelta} and {@link DataKind}, return the
      * list possible {@link EditType} options available based on
-     * {@link ContactsSource}.
+     * {@link BaseAccountType}.
      *
      * @param forceInclude Always include this {@link EditType} in the returned
      *            list, even when an otherwise-invalid choice. This is useful
@@ -120,7 +121,7 @@
     /**
      * For the given {@link EntityDelta} and {@link DataKind}, return the
      * list possible {@link EditType} options available based on
-     * {@link ContactsSource}.
+     * {@link BaseAccountType}.
      *
      * @param forceInclude Always include this {@link EditType} in the returned
      *            list, even when an otherwise-invalid choice. This is useful
@@ -348,26 +349,26 @@
 
     /**
      * Processing to trim any empty {@link ValuesDelta} and {@link EntityDelta}
-     * from the given {@link EntitySet}, assuming the given {@link Sources}
+     * from the given {@link EntityDeltaList}, assuming the given {@link AccountTypes}
      * dictates the structure for various fields. This method ignores rows not
-     * described by the {@link ContactsSource}.
+     * described by the {@link BaseAccountType}.
      */
-    public static void trimEmpty(EntitySet set, Sources sources) {
+    public static void trimEmpty(EntityDeltaList set, AccountTypes sources) {
         for (EntityDelta state : set) {
             final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
-            final ContactsSource source = sources.getInflatedSource(accountType,
-                    ContactsSource.LEVEL_MIMETYPES);
+            final BaseAccountType source = sources.getInflatedSource(accountType,
+                    BaseAccountType.LEVEL_MIMETYPES);
             trimEmpty(state, source);
         }
     }
 
     /**
      * Processing to trim any empty {@link ValuesDelta} rows from the given
-     * {@link EntityDelta}, assuming the given {@link ContactsSource} dictates
+     * {@link EntityDelta}, assuming the given {@link BaseAccountType} dictates
      * the structure for various fields. This method ignores rows not described
-     * by the {@link ContactsSource}.
+     * by the {@link BaseAccountType}.
      */
-    public static void trimEmpty(EntityDelta state, ContactsSource source) {
+    public static void trimEmpty(EntityDelta state, BaseAccountType source) {
         boolean hasValues = false;
 
         // Walk through entries for each well-known kind
@@ -385,7 +386,7 @@
                 }
 
                 // Test and remove this row if empty and it isn't a photo from google
-                final boolean isGoogleSource = TextUtils.equals(GoogleSource.ACCOUNT_TYPE,
+                final boolean isGoogleSource = TextUtils.equals(GoogleAccountType.ACCOUNT_TYPE,
                         state.getValues().getAsString(RawContacts.ACCOUNT_TYPE));
                 final boolean isPhoto = TextUtils.equals(Photo.CONTENT_ITEM_TYPE, kind.mimeType);
                 final boolean isGooglePhoto = isPhoto && isGoogleSource;
@@ -426,10 +427,28 @@
     }
 
     /**
+     * Compares corresponding fields in values1 and values2. Only the fields
+     * declared by the DataKind are taken into consideration.
+     */
+    protected static boolean areEqual(ValuesDelta values1, ContentValues values2, DataKind kind) {
+        if (kind.fieldList == null) return false;
+
+        for (EditField field : kind.fieldList) {
+            final String value1 = values1.getAsString(field.column);
+            final String value2 = values2.getAsString(field.column);
+            if (!TextUtils.equals(value1, value2)) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
      * Parse the given {@link Bundle} into the given {@link EntityDelta} state,
      * assuming the extras defined through {@link Intents}.
      */
-    public static void parseExtras(Context context, ContactsSource source, EntityDelta state,
+    public static void parseExtras(Context context, BaseAccountType source, EntityDelta state,
             Bundle extras) {
         if (extras == null || extras.size() == 0) {
             // Bail early if no useful data
@@ -443,7 +462,7 @@
 
             final String name = extras.getString(Insert.NAME);
             if (ContactsUtils.isGraphic(name)) {
-                child.put(StructuredName.GIVEN_NAME, name);
+                child.put(StructuredName.DISPLAY_NAME, name);
             }
 
             final String phoneticName = extras.getString(Insert.PHONETIC_NAME);
@@ -456,7 +475,7 @@
             // StructuredPostal
             final DataKind kind = source.getKindForMimetype(StructuredPostal.CONTENT_ITEM_TYPE);
             parseExtras(state, kind, extras, Insert.POSTAL_TYPE, Insert.POSTAL,
-                    StructuredPostal.STREET);
+                    StructuredPostal.FORMATTED_ADDRESS);
         }
 
         {
@@ -515,6 +534,187 @@
                 child.put(Note.NOTE, notes);
             }
         }
+
+        // Arbitrary additional data
+        ArrayList<ContentValues> values = extras.getParcelableArrayList(Insert.DATA);
+        if (values != null) {
+            parseValues(state, source, values);
+        }
+    }
+
+    private static void parseValues(
+            EntityDelta state, BaseAccountType source, ArrayList<ContentValues> dataValueList) {
+        for (ContentValues values : dataValueList) {
+            String mimeType = values.getAsString(Data.MIMETYPE);
+            if (TextUtils.isEmpty(mimeType)) {
+                Log.e(TAG, "Mimetype is required. Ignoring: " + values);
+                continue;
+            }
+
+            // Won't override the contact name
+            if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                continue;
+            }
+
+            DataKind kind = source.getKindForMimetype(mimeType);
+            if (kind == null) {
+                Log.e(TAG, "Mimetype not supported for account type " + source.accountType
+                        + ". Ignoring: " + values);
+                continue;
+            }
+
+            ValuesDelta entry = ValuesDelta.fromAfter(values);
+            if (isEmpty(entry, kind)) {
+                continue;
+            }
+
+            ArrayList<ValuesDelta> entries = state.getMimeEntries(mimeType);
+
+            if (kind.isList || GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                // Check for duplicates
+                boolean addEntry = true;
+                int count = 0;
+                if (entries != null && entries.size() > 0) {
+                    for (ValuesDelta delta : entries) {
+                        if (!delta.isDelete()) {
+                            if (areEqual(delta, values, kind)) {
+                                addEntry = false;
+                                break;
+                            }
+                            count++;
+                        }
+                    }
+                }
+
+                if (kind.typeOverallMax != -1 && count >= kind.typeOverallMax) {
+                    Log.e(TAG, "Mimetype allows at most " + kind.typeOverallMax
+                            + " entries. Ignoring: " + values);
+                    addEntry = false;
+                }
+
+                if (addEntry) {
+                    addEntry = adjustType(entry, entries, kind);
+                }
+
+                if (addEntry) {
+                    state.addEntry(entry);
+                }
+            } else {
+                // Non-list entries should not be overridden
+                boolean addEntry = true;
+                if (entries != null && entries.size() > 0) {
+                    for (ValuesDelta delta : entries) {
+                        if (!delta.isDelete() && !isEmpty(delta, kind)) {
+                            addEntry = false;
+                            break;
+                        }
+                    }
+                    if (addEntry) {
+                        for (ValuesDelta delta : entries) {
+                            delta.markDeleted();
+                        }
+                    }
+                }
+
+                if (addEntry) {
+                    addEntry = adjustType(entry, entries, kind);
+                }
+
+                if (addEntry) {
+                    state.addEntry(entry);
+                } else if (Note.CONTENT_ITEM_TYPE.equals(mimeType)){
+                    // Note is most likely to contain large amounts of text
+                    // that we don't want to drop on the ground.
+                    for (ValuesDelta delta : entries) {
+                        if (!isEmpty(delta, kind)) {
+                            delta.put(Note.NOTE, delta.getAsString(Note.NOTE) + "\n"
+                                    + values.getAsString(Note.NOTE));
+                            break;
+                        }
+                    }
+                } else {
+                    Log.e(TAG, "Will not override mimetype " + mimeType + ". Ignoring: "
+                            + values);
+                }
+            }
+        }
+    }
+
+    /**
+     * Checks if the data kind allows addition of another entry (e.g. Exchange only
+     * supports two "work" phone numbers).  If not, tries to switch to one of the
+     * unused types.  If successful, returns true.
+     */
+    private static boolean adjustType(
+            ValuesDelta entry, ArrayList<ValuesDelta> entries, DataKind kind) {
+        if (kind.typeColumn == null || kind.typeList == null || kind.typeList.size() == 0) {
+            return true;
+        }
+
+        Integer typeInteger = entry.getAsInteger(kind.typeColumn);
+        int type = typeInteger != null ? typeInteger : kind.typeList.get(0).rawValue;
+
+        if (isTypeAllowed(type, entries, kind)) {
+            entry.put(kind.typeColumn, type);
+            return true;
+        }
+
+        // Specified type is not allowed - choose the first available type that is allowed
+        int size = kind.typeList.size();
+        for (int i = 0; i < size; i++) {
+            EditType editType = kind.typeList.get(i);
+            if (isTypeAllowed(editType.rawValue, entries, kind)) {
+                entry.put(kind.typeColumn, editType.rawValue);
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Checks if a new entry of the specified type can be added to the raw
+     * contact. For example, Exchange only supports two "work" phone numbers, so
+     * addition of a third would not be allowed.
+     */
+    private static boolean isTypeAllowed(int type, ArrayList<ValuesDelta> entries, DataKind kind) {
+        int max = 0;
+        int size = kind.typeList.size();
+        for (int i = 0; i < size; i++) {
+            EditType editType = kind.typeList.get(i);
+            if (editType.rawValue == type) {
+                max = editType.specificMax;
+                break;
+            }
+        }
+
+        if (max == 0) {
+            // This type is not allowed at all
+            return false;
+        }
+
+        if (max == -1) {
+            // Unlimited instances of this type are allowed
+            return true;
+        }
+
+        return getEntryCountByType(entries, kind.typeColumn, type) < max;
+    }
+
+    /**
+     * Counts occurrences of the specified type in the supplied entry list.
+     */
+    private static int getEntryCountByType(
+            ArrayList<ValuesDelta> entries, String typeColumn, int type) {
+        int count = 0;
+        int size = entries.size();
+        for (int i = 0; i < size; i++) {
+            Integer typeInteger = entries.get(i).getAsInteger(typeColumn);
+            if (typeInteger != null && typeInteger == type) {
+                count++;
+            }
+        }
+        return count;
     }
 
     /**
diff --git a/src/com/android/contacts/model/EntitySet.java b/src/com/android/contacts/model/EntitySet.java
deleted file mode 100644
index 830f8da..0000000
--- a/src/com/android/contacts/model/EntitySet.java
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import android.content.ContentProviderOperation;
-import android.content.ContentResolver;
-import android.content.Entity;
-import android.content.EntityIterator;
-import android.content.ContentProviderOperation.Builder;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.provider.ContactsContract.AggregationExceptions;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.RawContactsEntity;
-
-import com.google.android.collect.Lists;
-
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-
-import java.util.ArrayList;
-
-/**
- * Container for multiple {@link EntityDelta} objects, usually when editing
- * together as an entire aggregate. Provides convenience methods for parceling
- * and applying another {@link EntitySet} over it.
- */
-public class EntitySet extends ArrayList<EntityDelta> implements Parcelable {
-    private boolean mSplitRawContacts;
-
-    private EntitySet() {
-    }
-
-    /**
-     * Create an {@link EntitySet} that contains the given {@link EntityDelta},
-     * usually when inserting a new {@link Contacts} entry.
-     */
-    public static EntitySet fromSingle(EntityDelta delta) {
-        final EntitySet state = new EntitySet();
-        state.add(delta);
-        return state;
-    }
-
-    /**
-     * Create an {@link EntitySet} based on {@link Contacts} specified by the
-     * given query parameters. This closes the {@link EntityIterator} when
-     * finished, so it doesn't subscribe to updates.
-     */
-    public static EntitySet fromQuery(ContentResolver resolver, String selection,
-            String[] selectionArgs, String sortOrder) {
-        EntityIterator iterator = RawContacts.newEntityIterator(resolver.query(
-                RawContactsEntity.CONTENT_URI, null, selection, selectionArgs,
-                sortOrder));
-        try {
-            final EntitySet state = new EntitySet();
-            // Perform background query to pull contact details
-            while (iterator.hasNext()) {
-                // Read all contacts into local deltas to prepare for edits
-                final Entity before = iterator.next();
-                final EntityDelta entity = EntityDelta.fromBefore(before);
-                state.add(entity);
-            }
-            return state;
-        } finally {
-            iterator.close();
-        }
-    }
-
-    /**
-     * Merge the "after" values from the given {@link EntitySet}, discarding any
-     * previous "after" states. This is typically used when re-parenting user
-     * edits onto an updated {@link EntitySet}.
-     */
-    public static EntitySet mergeAfter(EntitySet local, EntitySet remote) {
-        if (local == null) local = new EntitySet();
-
-        // For each entity in the remote set, try matching over existing
-        for (EntityDelta remoteEntity : remote) {
-            final Long rawContactId = remoteEntity.getValues().getId();
-
-            // Find or create local match and merge
-            final EntityDelta localEntity = local.getByRawContactId(rawContactId);
-            final EntityDelta merged = EntityDelta.mergeAfter(localEntity, remoteEntity);
-
-            if (localEntity == null && merged != null) {
-                // No local entry before, so insert
-                local.add(merged);
-            }
-        }
-
-        return local;
-    }
-
-    /**
-     * Build a list of {@link ContentProviderOperation} that will transform all
-     * the "before" {@link Entity} states into the modified state which all
-     * {@link EntityDelta} objects represent. This method specifically creates
-     * any {@link AggregationExceptions} rules needed to groups edits together.
-     */
-    public ArrayList<ContentProviderOperation> buildDiff() {
-        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
-
-        final long rawContactId = this.findRawContactId();
-        int firstInsertRow = -1;
-
-        // First pass enforces versions remain consistent
-        for (EntityDelta delta : this) {
-            delta.buildAssert(diff);
-        }
-
-        final int assertMark = diff.size();
-        int backRefs[] = new int[size()];
-
-        int rawContactIndex = 0;
-
-        // Second pass builds actual operations
-        for (EntityDelta delta : this) {
-            final int firstBatch = diff.size();
-            final boolean isInsert = delta.isContactInsert();
-            backRefs[rawContactIndex++] = isInsert ? firstBatch : -1;
-
-            delta.buildDiff(diff);
-
-            // Only create rules for inserts
-            if (!isInsert) continue;
-
-            // If we are going to split all contacts, there is no point in first combining them
-            if (mSplitRawContacts) continue;
-
-            if (rawContactId != -1) {
-                // Has existing contact, so bind to it strongly
-                final Builder builder = beginKeepTogether();
-                builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId);
-                builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID2, firstBatch);
-                diff.add(builder.build());
-
-            } else if (firstInsertRow == -1) {
-                // First insert case, so record row
-                firstInsertRow = firstBatch;
-
-            } else {
-                // Additional insert case, so point at first insert
-                final Builder builder = beginKeepTogether();
-                builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID1, firstInsertRow);
-                builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID2, firstBatch);
-                diff.add(builder.build());
-            }
-        }
-
-        if (mSplitRawContacts) {
-            buildSplitContactDiff(diff, backRefs);
-        }
-
-        // No real changes if only left with asserts
-        if (diff.size() == assertMark) {
-            diff.clear();
-        }
-
-        return diff;
-    }
-
-    /**
-     * Start building a {@link ContentProviderOperation} that will keep two
-     * {@link RawContacts} together.
-     */
-    protected Builder beginKeepTogether() {
-        final Builder builder = ContentProviderOperation
-                .newUpdate(AggregationExceptions.CONTENT_URI);
-        builder.withValue(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_TOGETHER);
-        return builder;
-    }
-
-    /**
-     * Builds {@link AggregationExceptions} to split all constituent raw contacts into
-     * separate contacts.
-     */
-    private void buildSplitContactDiff(final ArrayList<ContentProviderOperation> diff,
-            int[] backRefs) {
-        int count = size();
-        for (int i = 0; i < count; i++) {
-            for (int j = 0; j < count; j++) {
-                if (i != j) {
-                    buildSplitContactDiff(diff, i, j, backRefs);
-                }
-            }
-        }
-    }
-
-    /**
-     * Construct a {@link AggregationExceptions#TYPE_KEEP_SEPARATE}.
-     */
-    private void buildSplitContactDiff(ArrayList<ContentProviderOperation> diff, int index1,
-            int index2, int[] backRefs) {
-        Builder builder =
-                ContentProviderOperation.newUpdate(AggregationExceptions.CONTENT_URI);
-        builder.withValue(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_SEPARATE);
-
-        Long rawContactId1 = get(index1).getValues().getAsLong(RawContacts._ID);
-        int backRef1 = backRefs[index1];
-        if (rawContactId1 != null && rawContactId1 >= 0) {
-            builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId1);
-        } else if (backRef1 >= 0) {
-            builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID1, backRef1);
-        } else {
-            return;
-        }
-
-        Long rawContactId2 = get(index2).getValues().getAsLong(RawContacts._ID);
-        int backRef2 = backRefs[index2];
-        if (rawContactId2 != null && rawContactId2 >= 0) {
-            builder.withValue(AggregationExceptions.RAW_CONTACT_ID2, rawContactId2);
-        } else if (backRef2 >= 0) {
-            builder.withValueBackReference(AggregationExceptions.RAW_CONTACT_ID2, backRef2);
-        } else {
-            return;
-        }
-
-        diff.add(builder.build());
-    }
-
-    /**
-     * Search all contained {@link EntityDelta} for the first one with an
-     * existing {@link RawContacts#_ID} value. Usually used when creating
-     * {@link AggregationExceptions} during an update.
-     */
-    public long findRawContactId() {
-        for (EntityDelta delta : this) {
-            final Long rawContactId = delta.getValues().getAsLong(RawContacts._ID);
-            if (rawContactId != null && rawContactId >= 0) {
-                return rawContactId;
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Find {@link RawContacts#_ID} of the requested {@link EntityDelta}.
-     */
-    public Long getRawContactId(int index) {
-        if (index >= 0 && index < this.size()) {
-            final EntityDelta delta = this.get(index);
-            final ValuesDelta values = delta.getValues();
-            if (values.isVisible()) {
-                return values.getAsLong(RawContacts._ID);
-            }
-        }
-        return null;
-    }
-
-    public EntityDelta getByRawContactId(Long rawContactId) {
-        final int index = this.indexOfRawContactId(rawContactId);
-        return (index == -1) ? null : this.get(index);
-    }
-
-    /**
-     * Find index of given {@link RawContacts#_ID} when present.
-     */
-    public int indexOfRawContactId(Long rawContactId) {
-        if (rawContactId == null) return -1;
-        final int size = this.size();
-        for (int i = 0; i < size; i++) {
-            final Long currentId = getRawContactId(i);
-            if (rawContactId.equals(currentId)) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
-    public ValuesDelta getSuperPrimaryEntry(final String mimeType) {
-        ValuesDelta primary = null;
-        ValuesDelta randomEntry = null;
-        for (EntityDelta delta : this) {
-            final ArrayList<ValuesDelta> mimeEntries = delta.getMimeEntries(mimeType);
-            if (mimeEntries == null) return null;
-
-            for (ValuesDelta entry : mimeEntries) {
-                if (entry.isSuperPrimary()) {
-                    return entry;
-                } else if (primary == null && entry.isPrimary()) {
-                    primary = entry;
-                } else if (randomEntry == null) {
-                    randomEntry = entry;
-                }
-            }
-        }
-        // When no direct super primary, return something
-        if (primary != null) {
-            return primary;
-        }
-        return randomEntry;
-    }
-
-    public void splitRawContacts() {
-        mSplitRawContacts = true;
-    }
-
-    /** {@inheritDoc} */
-    public int describeContents() {
-        // Nothing special about this parcel
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    public void writeToParcel(Parcel dest, int flags) {
-        final int size = this.size();
-        dest.writeInt(size);
-        for (EntityDelta delta : this) {
-            dest.writeParcelable(delta, flags);
-        }
-    }
-
-    public void readFromParcel(Parcel source) {
-        final ClassLoader loader = getClass().getClassLoader();
-        final int size = source.readInt();
-        for (int i = 0; i < size; i++) {
-            this.add(source.<EntityDelta> readParcelable(loader));
-        }
-    }
-
-    public static final Parcelable.Creator<EntitySet> CREATOR = new Parcelable.Creator<EntitySet>() {
-        public EntitySet createFromParcel(Parcel in) {
-            final EntitySet state = new EntitySet();
-            state.readFromParcel(in);
-            return state;
-        }
-
-        public EntitySet[] newArray(int size) {
-            return new EntitySet[size];
-        }
-    };
-}
diff --git a/src/com/android/contacts/model/ExchangeAccountType.java b/src/com/android/contacts/model/ExchangeAccountType.java
new file mode 100644
index 0000000..910dfc6
--- /dev/null
+++ b/src/com/android/contacts/model/ExchangeAccountType.java
@@ -0,0 +1,312 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import com.android.contacts.R;
+import com.google.android.collect.Lists;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Im;
+import android.provider.ContactsContract.CommonDataKinds.Nickname;
+import android.provider.ContactsContract.CommonDataKinds.Note;
+import android.provider.ContactsContract.CommonDataKinds.Organization;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.CommonDataKinds.Website;
+
+import java.util.Locale;
+
+public class ExchangeAccountType extends FallbackAccountType {
+
+    public static final String ACCOUNT_TYPE = "com.android.exchange";
+
+    public ExchangeAccountType(String resPackageName) {
+        this.accountType = ACCOUNT_TYPE;
+        this.resPackageName = null;
+        this.summaryResPackageName = resPackageName;
+    }
+
+    @Override
+    protected void inflate(Context context, int inflateLevel) {
+
+        inflateStructuredName(context, inflateLevel);
+        inflateNickname(context, inflateLevel);
+        inflatePhone(context, inflateLevel);
+        inflateEmail(context, inflateLevel);
+        inflateStructuredPostal(context, inflateLevel);
+        inflateIm(context, inflateLevel);
+        inflateOrganization(context, inflateLevel);
+        inflatePhoto(context, inflateLevel);
+        inflateNote(context, inflateLevel);
+        inflateEvent(context, inflateLevel);
+        inflateWebsite(context, inflateLevel);
+        inflateGroupMembership(context, inflateLevel);
+
+        setInflatedLevel(inflateLevel);
+    }
+
+    @Override
+    protected DataKind inflateStructuredName(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateStructuredName(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            boolean displayOrderPrimary =
+                    context.getResources().getBoolean(R.bool.config_editor_field_order_primary);
+            kind.typeOverallMax = 1;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
+                    FLAGS_PERSON_NAME).setOptional(true));
+            if (!displayOrderPrimary) {
+                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME,
+                        R.string.name_family, FLAGS_PERSON_NAME));
+                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME,
+                        R.string.name_middle, FLAGS_PERSON_NAME).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME,
+                        R.string.name_given, FLAGS_PERSON_NAME));
+                kind.fieldList.add(new EditField(StructuredName.SUFFIX,
+                        R.string.name_suffix, FLAGS_PERSON_NAME).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
+                        R.string.name_phonetic_family, FLAGS_PHONETIC).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
+                        R.string.name_phonetic_given, FLAGS_PHONETIC).setOptional(true));
+            } else {
+                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME,
+                        R.string.name_given, FLAGS_PERSON_NAME));
+                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME,
+                        R.string.name_middle, FLAGS_PERSON_NAME).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME,
+                        R.string.name_family, FLAGS_PERSON_NAME));
+                kind.fieldList.add(new EditField(StructuredName.SUFFIX,
+                        R.string.name_suffix, FLAGS_PERSON_NAME).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
+                        R.string.name_phonetic_given, FLAGS_PHONETIC).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
+                        R.string.name_phonetic_family, FLAGS_PHONETIC).setOptional(true));
+            }
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateNickname(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateNickname(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.isList = false;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Nickname.NAME, R.string.nicknameLabelsGroup,
+                    FLAGS_PERSON_NAME));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflatePhone(Context context, int inflateLevel) {
+        final DataKind kind = super.inflatePhone(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeColumn = Phone.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildPhoneType(Phone.TYPE_HOME).setSpecificMax(2));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE).setSpecificMax(1));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK).setSpecificMax(2));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true)
+                    .setSpecificMax(1));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true)
+                    .setSpecificMax(1));
+            kind.typeList
+                    .add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true).setSpecificMax(1));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true).setSpecificMax(1));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true)
+                    .setSpecificMax(1));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true).setSpecificMax(1));
+            kind.typeList
+                    .add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true).setSpecificMax(1));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true)
+                    .setSpecificMax(1));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateEmail(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateEmail(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeOverallMax = 3;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateStructuredPostal(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateStructuredPostal(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            final boolean useJapaneseOrder =
+                Locale.JAPANESE.getLanguage().equals(Locale.getDefault().getLanguage());
+            kind.typeColumn = StructuredPostal.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_WORK).setSpecificMax(1));
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_HOME).setSpecificMax(1));
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_OTHER).setSpecificMax(1));
+
+            kind.fieldList = Lists.newArrayList();
+            if (useJapaneseOrder) {
+                kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
+                        R.string.postal_country, FLAGS_POSTAL).setOptional(true));
+                kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
+                        R.string.postal_postcode, FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.REGION,
+                        R.string.postal_region, FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.CITY,
+                        R.string.postal_city,FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.STREET,
+                        R.string.postal_street, FLAGS_POSTAL));
+            } else {
+                kind.fieldList.add(new EditField(StructuredPostal.STREET,
+                        R.string.postal_street, FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.CITY,
+                        R.string.postal_city,FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.REGION,
+                        R.string.postal_region, FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
+                        R.string.postal_postcode, FLAGS_POSTAL));
+                kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
+                        R.string.postal_country, FLAGS_POSTAL).setOptional(true));
+            }
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateIm(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateIm(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeOverallMax = 3;
+
+            // NOTE: even though a traditional "type" exists, for editing
+            // purposes we're using the protocol to pick labels
+
+            kind.defaultValues = new ContentValues();
+            kind.defaultValues.put(Im.TYPE, Im.TYPE_OTHER);
+
+            kind.typeColumn = Im.PROTOCOL;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildImType(Im.PROTOCOL_AIM));
+            kind.typeList.add(buildImType(Im.PROTOCOL_MSN));
+            kind.typeList.add(buildImType(Im.PROTOCOL_YAHOO));
+            kind.typeList.add(buildImType(Im.PROTOCOL_SKYPE));
+            kind.typeList.add(buildImType(Im.PROTOCOL_QQ));
+            kind.typeList.add(buildImType(Im.PROTOCOL_GOOGLE_TALK));
+            kind.typeList.add(buildImType(Im.PROTOCOL_ICQ));
+            kind.typeList.add(buildImType(Im.PROTOCOL_JABBER));
+            kind.typeList.add(buildImType(Im.PROTOCOL_CUSTOM).setSecondary(true).setCustomColumn(
+                    Im.CUSTOM_PROTOCOL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Im.DATA, R.string.imLabelsGroup, FLAGS_EMAIL));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateOrganization(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateOrganization(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.isList = false;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Organization.COMPANY, R.string.ghostData_company,
+                    FLAGS_GENERIC_NAME));
+            kind.fieldList.add(new EditField(Organization.TITLE, R.string.ghostData_title,
+                    FLAGS_GENERIC_NAME));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflatePhoto(Context context, int inflateLevel) {
+        final DataKind kind = super.inflatePhoto(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeOverallMax = 1;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Photo.PHOTO, -1, -1));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateNote(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateNote(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Note.NOTE, R.string.label_notes, FLAGS_NOTE));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateWebsite(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateWebsite(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.isList = false;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Website.URL, R.string.websiteLabelsGroup, FLAGS_WEBSITE));
+        }
+
+        return kind;
+    }
+
+    @Override
+    public int getHeaderColor(Context context) {
+        return 0xffd5ba96;
+    }
+
+    @Override
+    public int getSideBarColor(Context context) {
+        return 0xffb58e59;
+    }
+}
diff --git a/src/com/android/contacts/model/ExchangeSource.java b/src/com/android/contacts/model/ExchangeSource.java
deleted file mode 100644
index 3f2ab6c..0000000
--- a/src/com/android/contacts/model/ExchangeSource.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import com.android.contacts.R;
-import com.google.android.collect.Lists;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Im;
-import android.provider.ContactsContract.CommonDataKinds.Nickname;
-import android.provider.ContactsContract.CommonDataKinds.Note;
-import android.provider.ContactsContract.CommonDataKinds.Organization;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.provider.ContactsContract.CommonDataKinds.StructuredName;
-import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
-import android.provider.ContactsContract.CommonDataKinds.Website;
-
-import java.util.Locale;
-
-public class ExchangeSource extends FallbackSource {
-
-    public static final String ACCOUNT_TYPE = "com.android.exchange";
-
-    public ExchangeSource(String resPackageName) {
-        this.accountType = ACCOUNT_TYPE;
-        this.resPackageName = null;
-        this.summaryResPackageName = resPackageName;
-    }
-
-    @Override
-    protected void inflate(Context context, int inflateLevel) {
-
-        inflateStructuredName(context, inflateLevel);
-        inflateNickname(context, inflateLevel);
-        inflatePhone(context, inflateLevel);
-        inflateEmail(context, inflateLevel);
-        inflateStructuredPostal(context, inflateLevel);
-        inflateIm(context, inflateLevel);
-        inflateOrganization(context, inflateLevel);
-        inflatePhoto(context, inflateLevel);
-        inflateNote(context, inflateLevel);
-        inflateWebsite(context, inflateLevel);
-
-        setInflatedLevel(inflateLevel);
-    }
-
-    @Override
-    protected DataKind inflateStructuredName(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateStructuredName(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            boolean displayOrderPrimary =
-                    context.getResources().getBoolean(R.bool.config_editor_field_order_primary);
-            kind.typeOverallMax = 1;
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
-                    FLAGS_PERSON_NAME).setOptional(true));
-            if (!displayOrderPrimary) {
-                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME,
-                        R.string.name_family, FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME,
-                        R.string.name_middle, FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME,
-                        R.string.name_given, FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.SUFFIX,
-                        R.string.name_suffix, FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
-                        R.string.name_phonetic_family, FLAGS_PHONETIC).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
-                        R.string.name_phonetic_given, FLAGS_PHONETIC).setOptional(true));
-            } else {
-                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME,
-                        R.string.name_given, FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME,
-                        R.string.name_middle, FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME,
-                        R.string.name_family, FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.SUFFIX,
-                        R.string.name_suffix, FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
-                        R.string.name_phonetic_given, FLAGS_PHONETIC).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
-                        R.string.name_phonetic_family, FLAGS_PHONETIC).setOptional(true));
-            }
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateNickname(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateNickname(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.isList = false;
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Nickname.NAME, R.string.nicknameLabelsGroup,
-                    FLAGS_PERSON_NAME));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflatePhone(Context context, int inflateLevel) {
-        final DataKind kind = super.inflatePhone(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeColumn = Phone.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildPhoneType(Phone.TYPE_HOME).setSpecificMax(2));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE).setSpecificMax(1));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK).setSpecificMax(2));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true)
-                    .setSpecificMax(1));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true)
-                    .setSpecificMax(1));
-            kind.typeList
-                    .add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true).setSpecificMax(1));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true).setSpecificMax(1));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true)
-                    .setSpecificMax(1));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true).setSpecificMax(1));
-            kind.typeList
-                    .add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true).setSpecificMax(1));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true)
-                    .setSpecificMax(1).setCustomColumn(Phone.LABEL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateEmail(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateEmail(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeOverallMax = 3;
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateStructuredPostal(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateStructuredPostal(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            final boolean useJapaneseOrder =
-                Locale.JAPANESE.getLanguage().equals(Locale.getDefault().getLanguage());
-            kind.typeColumn = StructuredPostal.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_WORK).setSpecificMax(1));
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_HOME).setSpecificMax(1));
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_OTHER).setSpecificMax(1));
-
-            kind.fieldList = Lists.newArrayList();
-            if (useJapaneseOrder) {
-                kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
-                        R.string.postal_country, FLAGS_POSTAL).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
-                        R.string.postal_postcode, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.REGION,
-                        R.string.postal_region, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.CITY,
-                        R.string.postal_city,FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.STREET,
-                        R.string.postal_street, FLAGS_POSTAL));
-            } else {
-                kind.fieldList.add(new EditField(StructuredPostal.STREET,
-                        R.string.postal_street, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.CITY,
-                        R.string.postal_city,FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.REGION,
-                        R.string.postal_region, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
-                        R.string.postal_postcode, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
-                        R.string.postal_country, FLAGS_POSTAL).setOptional(true));
-            }
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateIm(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateIm(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeOverallMax = 3;
-
-            // NOTE: even though a traditional "type" exists, for editing
-            // purposes we're using the protocol to pick labels
-
-            kind.defaultValues = new ContentValues();
-            kind.defaultValues.put(Im.TYPE, Im.TYPE_OTHER);
-
-            kind.typeColumn = Im.PROTOCOL;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildImType(Im.PROTOCOL_AIM));
-            kind.typeList.add(buildImType(Im.PROTOCOL_MSN));
-            kind.typeList.add(buildImType(Im.PROTOCOL_YAHOO));
-            kind.typeList.add(buildImType(Im.PROTOCOL_SKYPE));
-            kind.typeList.add(buildImType(Im.PROTOCOL_QQ));
-            kind.typeList.add(buildImType(Im.PROTOCOL_GOOGLE_TALK));
-            kind.typeList.add(buildImType(Im.PROTOCOL_ICQ));
-            kind.typeList.add(buildImType(Im.PROTOCOL_JABBER));
-            kind.typeList.add(buildImType(Im.PROTOCOL_CUSTOM).setSecondary(true).setCustomColumn(
-                    Im.CUSTOM_PROTOCOL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Im.DATA, R.string.imLabelsGroup, FLAGS_EMAIL));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateOrganization(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateOrganization(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.isList = false;
-            kind.typeColumn = Organization.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildOrgType(Organization.TYPE_WORK).setSpecificMax(1));
-            kind.typeList.add(buildOrgType(Organization.TYPE_OTHER).setSpecificMax(1));
-            kind.typeList.add(buildOrgType(Organization.TYPE_CUSTOM).setSecondary(true)
-                    .setSpecificMax(1));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Organization.COMPANY, R.string.ghostData_company,
-                    FLAGS_GENERIC_NAME));
-            kind.fieldList.add(new EditField(Organization.TITLE, R.string.ghostData_title,
-                    FLAGS_GENERIC_NAME));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflatePhoto(Context context, int inflateLevel) {
-        final DataKind kind = super.inflatePhoto(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeOverallMax = 1;
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Photo.PHOTO, -1, -1));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateNote(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateNote(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Note.NOTE, R.string.label_notes, FLAGS_NOTE));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateWebsite(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateWebsite(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.isList = false;
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Website.URL, R.string.websiteLabelsGroup, FLAGS_WEBSITE));
-        }
-
-        return kind;
-    }
-
-    @Override
-    public int getHeaderColor(Context context) {
-        return 0xffd5ba96;
-    }
-
-    @Override
-    public int getSideBarColor(Context context) {
-        return 0xffb58e59;
-    }
-}
diff --git a/src/com/android/contacts/model/ExternalAccountType.java b/src/com/android/contacts/model/ExternalAccountType.java
new file mode 100644
index 0000000..ee6f603
--- /dev/null
+++ b/src/com/android/contacts/model/ExternalAccountType.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.util.AttributeSet;
+import android.util.Xml;
+
+import java.io.IOException;
+import java.util.List;
+
+/*
+
+<!-- example of what SourceConstraints would look like in XML -->
+<!-- NOTE: may not directly match the current structure version -->
+
+<DataKind
+    mimeType="vnd.android.cursor.item/email"
+    title="@string/title_postal"
+    icon="@drawable/icon_postal"
+    weight="12"
+    editable="true">
+
+    <!-- these are defined using string-builder-ish -->
+    <ActionHeader></ActionHeader>
+    <ActionBody socialSummary="true" />  <!-- can pull together various columns -->
+
+    <!-- ordering handles precedence the "insert/add" case -->
+    <!-- assume uniform type when missing "column", use title in place -->
+    <EditTypes column="data5" overallMax="-1">
+        <EditType rawValue="0" label="@string/type_home" specificMax="-1" />
+        <EditType rawValue="1" label="@string/type_work" specificMax="-1" secondary="true" />
+        <EditType rawValue="4" label="@string/type_custom" customColumn="data6" specificMax="-1" secondary="true" />
+    </EditTypes>
+
+    <!-- when single edit field, simplifies edit case -->
+    <EditField column="data1" title="@string/field_family_name" android:inputType="textCapWords|textPhonetic" />
+    <EditField column="data2" title="@string/field_given_name" android:minLines="2" />
+    <EditField column="data3" title="@string/field_suffix" />
+
+</DataKind>
+
+*/
+
+/**
+ * Internal structure that represents constraints and styles for a specific data
+ * source, such as the various data types they support, including details on how
+ * those types should be rendered and edited.
+ * <p>
+ * In the future this may be inflated from XML defined by a data source.
+ */
+public class ExternalAccountType extends FallbackAccountType {
+    private static final String ACTION_SYNC_ADAPTER = "android.content.SyncAdapter";
+    private static final String METADATA_CONTACTS = "android.provider.CONTACTS_STRUCTURE";
+
+    private interface InflateTags {
+        final String CONTACTS_SOURCE_LEGACY = "ContactsSource";
+        final String CONTACTS_ACCOUNT_TYPE = "ContactsAccountType";
+        final String CONTACTS_DATA_KIND = "ContactsDataKind";
+    }
+
+    public ExternalAccountType(String resPackageName) {
+        this.resPackageName = resPackageName;
+        this.summaryResPackageName = resPackageName;
+    }
+
+    /**
+     * Ensure that the constraint rules behind this {@link BaseAccountType} have
+     * been inflated. Because this may involve parsing meta-data from
+     * {@link PackageManager}, it shouldn't be called from a UI thread.
+     */
+    @Override
+    public void inflate(Context context, int inflateLevel) {
+        // Handle unknown sources by searching their package
+        final PackageManager pm = context.getPackageManager();
+        final Intent syncAdapter = new Intent(ACTION_SYNC_ADAPTER);
+        final List<ResolveInfo> matches = pm.queryIntentServices(syncAdapter,
+                PackageManager.GET_META_DATA);
+        for (ResolveInfo info : matches) {
+            final XmlResourceParser parser = info.serviceInfo.loadXmlMetaData(pm,
+                    METADATA_CONTACTS);
+            if (parser == null) continue;
+            inflate(context, parser);
+        }
+
+        // Bring in name and photo from fallback source, which are non-optional
+        inflateStructuredName(context, inflateLevel);
+        inflatePhoto(context, inflateLevel);
+
+        setInflatedLevel(inflateLevel);
+    }
+
+    /**
+     * Inflate this {@link BaseAccountType} from the given parser. This may only
+     * load details matching the publicly-defined schema.
+     */
+    protected void inflate(Context context, XmlPullParser parser) {
+        final AttributeSet attrs = Xml.asAttributeSet(parser);
+
+        try {
+            int type;
+            while ((type = parser.next()) != XmlPullParser.START_TAG
+                    && type != XmlPullParser.END_DOCUMENT) {
+                // Drain comments and whitespace
+            }
+
+            if (type != XmlPullParser.START_TAG) {
+                throw new IllegalStateException("No start tag found");
+            }
+
+            String rootTag = parser.getName();
+            if (!InflateTags.CONTACTS_ACCOUNT_TYPE.equals(rootTag) &&
+                    !InflateTags.CONTACTS_SOURCE_LEGACY.equals(rootTag)) {
+                throw new IllegalStateException("Top level element must be "
+                        + InflateTags.CONTACTS_ACCOUNT_TYPE + ", not " + rootTag);
+            }
+
+            // Parse all children kinds
+            final int depth = parser.getDepth();
+            while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
+                    && type != XmlPullParser.END_DOCUMENT) {
+                if (type == XmlPullParser.END_TAG
+                        || !InflateTags.CONTACTS_DATA_KIND.equals(rootTag)) {
+                    continue;
+                }
+
+                final TypedArray a = context.obtainStyledAttributes(attrs,
+                        android.R.styleable.ContactsDataKind);
+                final DataKind kind = new DataKind();
+
+                kind.mimeType = a
+                        .getString(com.android.internal.R.styleable.ContactsDataKind_mimeType);
+                kind.iconRes = a.getResourceId(
+                        com.android.internal.R.styleable.ContactsDataKind_icon, -1);
+
+                final String summaryColumn = a
+                        .getString(com.android.internal.R.styleable.ContactsDataKind_summaryColumn);
+                if (summaryColumn != null) {
+                    // Inflate a specific column as summary when requested
+                    kind.actionHeader = new FallbackAccountType.SimpleInflater(summaryColumn);
+                }
+
+                final String detailColumn = a
+                        .getString(com.android.internal.R.styleable.ContactsDataKind_detailColumn);
+                final boolean detailSocialSummary = a.getBoolean(
+                        com.android.internal.R.styleable.ContactsDataKind_detailSocialSummary,
+                        false);
+
+                if (detailSocialSummary) {
+                    // Inflate social summary when requested
+                    kind.actionBodySocial = true;
+                }
+
+                if (detailColumn != null) {
+                    // Inflate specific column as summary
+                    kind.actionBody = new FallbackAccountType.SimpleInflater(detailColumn);
+                }
+
+                addKind(kind);
+            }
+        } catch (XmlPullParserException e) {
+            throw new IllegalStateException("Problem reading XML", e);
+        } catch (IOException e) {
+            throw new IllegalStateException("Problem reading XML", e);
+        }
+    }
+
+    @Override
+    public int getHeaderColor(Context context) {
+        return 0xff6d86b4;
+    }
+
+    @Override
+    public int getSideBarColor(Context context) {
+        return 0xff6d86b4;
+    }
+}
diff --git a/src/com/android/contacts/model/ExternalSource.java b/src/com/android/contacts/model/ExternalSource.java
deleted file mode 100644
index aa9d888..0000000
--- a/src/com/android/contacts/model/ExternalSource.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.res.TypedArray;
-import android.content.res.XmlResourceParser;
-import android.util.AttributeSet;
-import android.util.Xml;
-
-import java.io.IOException;
-import java.util.List;
-
-/*
-
-<!-- example of what SourceConstraints would look like in XML -->
-<!-- NOTE: may not directly match the current structure version -->
-
-<DataKind
-    mimeType="vnd.android.cursor.item/email"
-    title="@string/title_postal"
-    icon="@drawable/icon_postal"
-    weight="12"
-    editable="true">
-
-    <!-- these are defined using string-builder-ish -->
-    <ActionHeader></ActionHeader>
-    <ActionBody socialSummary="true" />  <!-- can pull together various columns -->
-
-    <!-- ordering handles precedence the "insert/add" case -->
-    <!-- assume uniform type when missing "column", use title in place -->
-    <EditTypes column="data5" overallMax="-1">
-        <EditType rawValue="0" label="@string/type_home" specificMax="-1" />
-        <EditType rawValue="1" label="@string/type_work" specificMax="-1" secondary="true" />
-        <EditType rawValue="4" label="@string/type_custom" customColumn="data6" specificMax="-1" secondary="true" />
-    </EditTypes>
-
-    <!-- when single edit field, simplifies edit case -->
-    <EditField column="data1" title="@string/field_family_name" android:inputType="textCapWords|textPhonetic" />
-    <EditField column="data2" title="@string/field_given_name" android:minLines="2" />
-    <EditField column="data3" title="@string/field_suffix" />
-
-</DataKind>
-
-*/
-
-/**
- * Internal structure that represents constraints and styles for a specific data
- * source, such as the various data types they support, including details on how
- * those types should be rendered and edited.
- * <p>
- * In the future this may be inflated from XML defined by a data source.
- */
-public class ExternalSource extends FallbackSource {
-    private static final String ACTION_SYNC_ADAPTER = "android.content.SyncAdapter";
-    private static final String METADATA_CONTACTS = "android.provider.CONTACTS_STRUCTURE";
-
-    private interface InflateTags {
-        final String CONTACTS_SOURCE = "ContactsSource";
-        final String CONTACTS_DATA_KIND = "ContactsDataKind";
-    }
-
-    public ExternalSource(String resPackageName) {
-        this.resPackageName = resPackageName;
-        this.summaryResPackageName = resPackageName;
-    }
-
-    /**
-     * Ensure that the constraint rules behind this {@link ContactsSource} have
-     * been inflated. Because this may involve parsing meta-data from
-     * {@link PackageManager}, it shouldn't be called from a UI thread.
-     */
-    @Override
-    public void inflate(Context context, int inflateLevel) {
-        // Handle unknown sources by searching their package
-        final PackageManager pm = context.getPackageManager();
-        final Intent syncAdapter = new Intent(ACTION_SYNC_ADAPTER);
-        final List<ResolveInfo> matches = pm.queryIntentServices(syncAdapter,
-                PackageManager.GET_META_DATA);
-        for (ResolveInfo info : matches) {
-            final XmlResourceParser parser = info.serviceInfo.loadXmlMetaData(pm,
-                    METADATA_CONTACTS);
-            if (parser == null) continue;
-            inflate(context, parser);
-        }
-
-        // Bring in name and photo from fallback source, which are non-optional
-        inflateStructuredName(context, inflateLevel);
-        inflatePhoto(context, inflateLevel);
-
-        setInflatedLevel(inflateLevel);
-    }
-
-    /**
-     * Inflate this {@link ContactsSource} from the given parser. This may only
-     * load details matching the publicly-defined schema.
-     */
-    protected void inflate(Context context, XmlPullParser parser) {
-        final AttributeSet attrs = Xml.asAttributeSet(parser);
-
-        try {
-            int type;
-            while ((type = parser.next()) != XmlPullParser.START_TAG
-                    && type != XmlPullParser.END_DOCUMENT) {
-                // Drain comments and whitespace
-            }
-
-            if (type != XmlPullParser.START_TAG) {
-                throw new IllegalStateException("No start tag found");
-            }
-
-            if (!InflateTags.CONTACTS_SOURCE.equals(parser.getName())) {
-                throw new IllegalStateException("Top level element must be "
-                        + InflateTags.CONTACTS_SOURCE);
-            }
-
-            // Parse all children kinds
-            final int depth = parser.getDepth();
-            while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
-                    && type != XmlPullParser.END_DOCUMENT) {
-                if (type == XmlPullParser.END_TAG
-                        || !InflateTags.CONTACTS_DATA_KIND.equals(parser.getName())) {
-                    continue;
-                }
-
-                final TypedArray a = context.obtainStyledAttributes(attrs,
-                        android.R.styleable.ContactsDataKind);
-                final DataKind kind = new DataKind();
-
-                kind.mimeType = a
-                        .getString(com.android.internal.R.styleable.ContactsDataKind_mimeType);
-                kind.iconRes = a.getResourceId(
-                        com.android.internal.R.styleable.ContactsDataKind_icon, -1);
-
-                final String summaryColumn = a
-                        .getString(com.android.internal.R.styleable.ContactsDataKind_summaryColumn);
-                if (summaryColumn != null) {
-                    // Inflate a specific column as summary when requested
-                    kind.actionHeader = new FallbackSource.SimpleInflater(summaryColumn);
-                }
-
-                final String detailColumn = a
-                        .getString(com.android.internal.R.styleable.ContactsDataKind_detailColumn);
-                final boolean detailSocialSummary = a.getBoolean(
-                        com.android.internal.R.styleable.ContactsDataKind_detailSocialSummary,
-                        false);
-
-                if (detailSocialSummary) {
-                    // Inflate social summary when requested
-                    kind.actionBodySocial = true;
-                }
-
-                if (detailColumn != null) {
-                    // Inflate specific column as summary
-                    kind.actionBody = new FallbackSource.SimpleInflater(detailColumn);
-                }
-
-                addKind(kind);
-            }
-        } catch (XmlPullParserException e) {
-            throw new IllegalStateException("Problem reading XML", e);
-        } catch (IOException e) {
-            throw new IllegalStateException("Problem reading XML", e);
-        }
-    }
-
-    @Override
-    public int getHeaderColor(Context context) {
-        return 0xff6d86b4;
-    }
-
-    @Override
-    public int getSideBarColor(Context context) {
-        return 0xff6d86b4;
-    }
-}
diff --git a/src/com/android/contacts/model/FallbackAccountType.java b/src/com/android/contacts/model/FallbackAccountType.java
new file mode 100644
index 0000000..4519bae
--- /dev/null
+++ b/src/com/android/contacts/model/FallbackAccountType.java
@@ -0,0 +1,717 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import com.android.contacts.R;
+import com.google.android.collect.Lists;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.provider.ContactsContract.CommonDataKinds.BaseTypes;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Event;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.CommonDataKinds.Im;
+import android.provider.ContactsContract.CommonDataKinds.Nickname;
+import android.provider.ContactsContract.CommonDataKinds.Note;
+import android.provider.ContactsContract.CommonDataKinds.Organization;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.CommonDataKinds.SipAddress;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.CommonDataKinds.Website;
+import android.view.inputmethod.EditorInfo;
+
+public class FallbackAccountType extends BaseAccountType {
+    protected static final int FLAGS_PHONE = EditorInfo.TYPE_CLASS_PHONE;
+    protected static final int FLAGS_EMAIL = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
+    protected static final int FLAGS_PERSON_NAME = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS | EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME;
+    protected static final int FLAGS_PHONETIC = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_VARIATION_PHONETIC;
+    protected static final int FLAGS_GENERIC_NAME = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS;
+    protected static final int FLAGS_NOTE = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+    protected static final int FLAGS_EVENT = EditorInfo.TYPE_CLASS_TEXT;
+    protected static final int FLAGS_WEBSITE = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_VARIATION_URI;
+    protected static final int FLAGS_POSTAL = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_VARIATION_POSTAL_ADDRESS | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS
+            | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+    protected static final int FLAGS_SIP_ADDRESS = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;  // since SIP addresses have the same
+                                                             // basic format as email addresses
+
+    public FallbackAccountType() {
+        this.accountType = null;
+        this.titleRes = R.string.account_phone;
+        this.iconRes = R.drawable.ic_launcher_contacts;
+    }
+
+    @Override
+    protected void inflate(Context context, int inflateLevel) {
+
+        inflateStructuredName(context, inflateLevel);
+        inflateNickname(context, inflateLevel);
+        inflatePhone(context, inflateLevel);
+        inflateEmail(context, inflateLevel);
+        inflateStructuredPostal(context, inflateLevel);
+        inflateIm(context, inflateLevel);
+        inflateOrganization(context, inflateLevel);
+        inflatePhoto(context, inflateLevel);
+        inflateNote(context, inflateLevel);
+        inflateWebsite(context, inflateLevel);
+        inflateEvent(context, inflateLevel);
+        inflateSipAddress(context, inflateLevel);
+        inflateGroupMembership(context, inflateLevel);
+
+        setInflatedLevel(inflateLevel);
+
+    }
+
+    protected EditType buildPhoneType(int type) {
+        return new EditType(type, Phone.getTypeLabelResource(type));
+    }
+
+    protected EditType buildEmailType(int type) {
+        return new EditType(type, Email.getTypeLabelResource(type));
+    }
+
+    protected EditType buildPostalType(int type) {
+        return new EditType(type, StructuredPostal.getTypeLabelResource(type));
+    }
+
+    protected EditType buildImType(int type) {
+        return new EditType(type, Im.getProtocolLabelResource(type));
+    }
+
+    protected EditType buildEventType(int type) {
+        return new EditType(type, Event.getTypeResource(type));
+    }
+
+    protected DataKind inflateStructuredName(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(StructuredName.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(StructuredName.CONTENT_ITEM_TYPE,
+                    R.string.nameLabelsGroup, -1, -1, true));
+            kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
+            kind.actionBody = new SimpleInflater(Nickname.NAME);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(StructuredName.DISPLAY_NAME,
+                    R.string.full_name, FLAGS_PERSON_NAME).setShortForm(true));
+
+            boolean displayOrderPrimary =
+                    context.getResources().getBoolean(R.bool.config_editor_field_order_primary);
+
+            if (!displayOrderPrimary) {
+                kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME, R.string.name_given,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.SUFFIX, R.string.name_suffix,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
+                        R.string.name_phonetic_family, FLAGS_PHONETIC).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
+                        R.string.name_phonetic_middle, FLAGS_PHONETIC).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
+                        R.string.name_phonetic_given, FLAGS_PHONETIC).setLongForm(true));
+            } else {
+                kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME, R.string.name_given,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.SUFFIX, R.string.name_suffix,
+                        FLAGS_PERSON_NAME).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
+                        R.string.name_phonetic_given, FLAGS_PHONETIC).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
+                        R.string.name_phonetic_middle, FLAGS_PHONETIC).setLongForm(true));
+                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
+                        R.string.name_phonetic_family, FLAGS_PHONETIC).setLongForm(true));
+            }
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateNickname(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Nickname.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Nickname.CONTENT_ITEM_TYPE,
+                    R.string.nicknameLabelsGroup, -1, 115, true));
+            kind.secondary = true;
+            kind.isList = false;
+            kind.actionHeader = new SimpleInflater(R.string.nicknameLabelsGroup);
+            kind.actionBody = new SimpleInflater(Nickname.NAME);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.defaultValues = new ContentValues();
+            kind.defaultValues.put(Nickname.TYPE, Nickname.TYPE_DEFAULT);
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Nickname.NAME, R.string.nicknameLabelsGroup,
+                    FLAGS_PERSON_NAME));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflatePhone(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup,
+                    android.R.drawable.sym_action_call, 10, true));
+            kind.iconAltRes = R.drawable.sym_action_sms;
+            kind.actionHeader = new PhoneActionInflater();
+            kind.actionAltHeader = new PhoneActionAltInflater();
+            kind.actionBody = new SimpleInflater(Phone.NUMBER);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeColumn = Phone.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
+                    Phone.LABEL));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_CALLBACK).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_ISDN).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_MAIN).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER_FAX).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_TELEX).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_TTY_TDD).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_MOBILE).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_PAGER).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true)
+                    .setCustomColumn(Phone.LABEL));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateEmail(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Email.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Email.CONTENT_ITEM_TYPE,
+                    R.string.emailLabelsGroup, R.drawable.sym_action_email, 15, true));
+            kind.actionHeader = new EmailActionInflater();
+            kind.actionBody = new SimpleInflater(Email.DATA);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeColumn = Email.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildEmailType(Email.TYPE_HOME));
+            kind.typeList.add(buildEmailType(Email.TYPE_WORK));
+            kind.typeList.add(buildEmailType(Email.TYPE_OTHER));
+            kind.typeList.add(buildEmailType(Email.TYPE_MOBILE));
+            kind.typeList.add(buildEmailType(Email.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
+                    Email.LABEL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateStructuredPostal(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(StructuredPostal.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(StructuredPostal.CONTENT_ITEM_TYPE,
+                    R.string.postalLabelsGroup, R.drawable.sym_action_map, 25, true));
+            kind.actionHeader = new PostalActionInflater();
+            kind.actionBody = new SimpleInflater(StructuredPostal.FORMATTED_ADDRESS);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeColumn = StructuredPostal.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_HOME));
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_WORK));
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_OTHER));
+            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_CUSTOM).setSecondary(true)
+                    .setCustomColumn(StructuredPostal.LABEL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(
+                    new EditField(StructuredPostal.FORMATTED_ADDRESS, R.string.postal_address,
+                            FLAGS_POSTAL).setMinLines(3));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateIm(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Im.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Im.CONTENT_ITEM_TYPE, R.string.imLabelsGroup,
+                    android.R.drawable.sym_action_chat, 20, true));
+            kind.secondary = true;
+            kind.actionHeader = new ImActionInflater();
+            kind.actionBody = new SimpleInflater(Im.DATA);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            // NOTE: even though a traditional "type" exists, for editing
+            // purposes we're using the protocol to pick labels
+
+            kind.defaultValues = new ContentValues();
+            kind.defaultValues.put(Im.TYPE, Im.TYPE_OTHER);
+
+            kind.typeColumn = Im.PROTOCOL;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildImType(Im.PROTOCOL_AIM));
+            kind.typeList.add(buildImType(Im.PROTOCOL_MSN));
+            kind.typeList.add(buildImType(Im.PROTOCOL_YAHOO));
+            kind.typeList.add(buildImType(Im.PROTOCOL_SKYPE));
+            kind.typeList.add(buildImType(Im.PROTOCOL_QQ));
+            kind.typeList.add(buildImType(Im.PROTOCOL_GOOGLE_TALK));
+            kind.typeList.add(buildImType(Im.PROTOCOL_ICQ));
+            kind.typeList.add(buildImType(Im.PROTOCOL_JABBER));
+            kind.typeList.add(buildImType(Im.PROTOCOL_CUSTOM).setSecondary(true).setCustomColumn(
+                    Im.CUSTOM_PROTOCOL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Im.DATA, R.string.imLabelsGroup, FLAGS_EMAIL));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateOrganization(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Organization.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Organization.CONTENT_ITEM_TYPE,
+                    R.string.organizationLabelsGroup, -1, 5, true));
+            kind.actionHeader = new SimpleInflater(Organization.COMPANY);
+            kind.actionBody = new SimpleInflater(Organization.TITLE);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.isList = false;
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Organization.COMPANY, R.string.ghostData_company,
+                    FLAGS_GENERIC_NAME));
+            kind.fieldList.add(new EditField(Organization.TITLE, R.string.ghostData_title,
+                    FLAGS_GENERIC_NAME));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflatePhoto(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Photo.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Photo.CONTENT_ITEM_TYPE, -1, -1, -1, true));
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Photo.PHOTO, -1, -1));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateNote(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Note.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Note.CONTENT_ITEM_TYPE,
+                    R.string.label_notes, -1, 110, true));
+            kind.isList = false;
+            kind.secondary = true;
+            kind.actionHeader = new SimpleInflater(R.string.label_notes);
+            kind.actionBody = new SimpleInflater(Note.NOTE);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Note.NOTE, R.string.label_notes, FLAGS_NOTE));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateWebsite(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Website.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(Website.CONTENT_ITEM_TYPE,
+                    R.string.websiteLabelsGroup, -1, 120, true));
+            kind.secondary = true;
+            kind.actionHeader = new SimpleInflater(R.string.websiteLabelsGroup);
+            kind.actionBody = new SimpleInflater(Website.URL);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.defaultValues = new ContentValues();
+            kind.defaultValues.put(Website.TYPE, Website.TYPE_OTHER);
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Website.URL, R.string.websiteLabelsGroup, FLAGS_WEBSITE));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateEvent(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(Event.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            // TODO make the event field editable.  The difficulty is that Google Contacts
+            // drops incorrectly formatted dates.  This means that we would
+            // need to know exactly how the sync adapter wants the date formatted and
+            // then have a rigid UI and automatic formatting of the date for the sync adapter.
+            kind = addKind(new DataKind(Event.CONTENT_ITEM_TYPE,
+                    R.string.eventLabelsGroup, -1, 150, false));
+            kind.secondary = true;
+            kind.actionHeader = new EventActionInflater();
+            kind.actionBody = new SimpleInflater(Event.START_DATE);
+
+            kind.typeColumn = Event.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildEventType(Event.TYPE_BIRTHDAY));
+            kind.typeList.add(buildEventType(Event.TYPE_ANNIVERSARY));
+            kind.typeList.add(buildEventType(Event.TYPE_OTHER));
+            kind.typeList.add(buildEventType(Event.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
+                    Event.LABEL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Event.DATA, R.string.eventLabelsGroup, FLAGS_EVENT));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateSipAddress(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(SipAddress.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            // The icon specified here is the one that gets displayed for
+            // "Internet call" items, in the "view contact" UI within the
+            // Contacts app.
+            //
+            // This is independent of the "SIP call" icon that gets
+            // displayed in the Quick Contacts widget, which comes from
+            // the android:icon attribute of the SIP-related
+            // intent-filters in the Phone app's manifest.
+
+            kind = addKind(new DataKind(SipAddress.CONTENT_ITEM_TYPE,
+                    R.string.label_sip_address, android.R.drawable.sym_action_call, 130, true));
+
+            kind.isList = false;
+            kind.secondary = true;
+            kind.actionHeader = new SimpleInflater(R.string.label_sip_address);
+            kind.actionBody = new SimpleInflater(SipAddress.SIP_ADDRESS);
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(SipAddress.SIP_ADDRESS,
+                                             R.string.label_sip_address, FLAGS_SIP_ADDRESS));
+        }
+
+        return kind;
+    }
+
+    protected DataKind inflateGroupMembership(Context context, int inflateLevel) {
+        DataKind kind = getKindForMimetype(GroupMembership.CONTENT_ITEM_TYPE);
+        if (kind == null) {
+            kind = addKind(new DataKind(GroupMembership.CONTENT_ITEM_TYPE,
+                    R.string.groupsLabel, android.R.drawable.sym_contact_card, 999, true));
+
+            kind.isList = false;
+        }
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(GroupMembership.GROUP_ROW_ID, -1, -1));
+        }
+
+        return kind;
+    }
+
+    /**
+     * Simple inflater that assumes a string resource has a "%s" that will be
+     * filled from the given column.
+     */
+    public static class SimpleInflater implements StringInflater {
+        private final int mStringRes;
+        private final String mColumnName;
+
+        public SimpleInflater(int stringRes) {
+            this(stringRes, null);
+        }
+
+        public SimpleInflater(String columnName) {
+            this(-1, columnName);
+        }
+
+        public SimpleInflater(int stringRes, String columnName) {
+            mStringRes = stringRes;
+            mColumnName = columnName;
+        }
+
+        public CharSequence inflateUsing(Context context, Cursor cursor) {
+            final int index = mColumnName != null ? cursor.getColumnIndex(mColumnName) : -1;
+            final boolean validString = mStringRes > 0;
+            final boolean validColumn = index != -1;
+
+            final CharSequence stringValue = validString ? context.getText(mStringRes) : null;
+            final CharSequence columnValue = validColumn ? cursor.getString(index) : null;
+
+            if (validString && validColumn) {
+                return String.format(stringValue.toString(), columnValue);
+            } else if (validString) {
+                return stringValue;
+            } else if (validColumn) {
+                return columnValue;
+            } else {
+                return null;
+            }
+        }
+
+        public CharSequence inflateUsing(Context context, ContentValues values) {
+            final boolean validColumn = values.containsKey(mColumnName);
+            final boolean validString = mStringRes > 0;
+
+            final CharSequence stringValue = validString ? context.getText(mStringRes) : null;
+            final CharSequence columnValue = validColumn ? values.getAsString(mColumnName) : null;
+
+            if (validString && validColumn) {
+                return String.format(stringValue.toString(), columnValue);
+            } else if (validString) {
+                return stringValue;
+            } else if (validColumn) {
+                return columnValue;
+            } else {
+                return null;
+            }
+        }
+    }
+
+    public static abstract class CommonInflater implements StringInflater {
+        protected abstract int getTypeLabelResource(Integer type);
+
+        protected boolean isCustom(Integer type) {
+            return type == BaseTypes.TYPE_CUSTOM;
+        }
+
+        protected String getTypeColumn() {
+            return Phone.TYPE;
+        }
+
+        protected String getLabelColumn() {
+            return Phone.LABEL;
+        }
+
+        protected CharSequence getTypeLabel(Resources res, Integer type, CharSequence label) {
+            final int labelRes = getTypeLabelResource(type);
+            if (type == null) {
+                return res.getText(labelRes);
+            } else if (isCustom(type)) {
+                return res.getString(labelRes, label == null ? "" : label);
+            } else {
+                return res.getText(labelRes);
+            }
+        }
+
+        public CharSequence inflateUsing(Context context, Cursor cursor) {
+            final Integer type = cursor.getInt(cursor.getColumnIndex(getTypeColumn()));
+            final String label = cursor.getString(cursor.getColumnIndex(getLabelColumn()));
+            return getTypeLabel(context.getResources(), type, label);
+        }
+
+        public CharSequence inflateUsing(Context context, ContentValues values) {
+            final Integer type = values.getAsInteger(getTypeColumn());
+            final String label = values.getAsString(getLabelColumn());
+            return getTypeLabel(context.getResources(), type, label);
+        }
+    }
+
+    public static class PhoneActionInflater extends CommonInflater {
+        @Override
+        protected boolean isCustom(Integer type) {
+            return type == Phone.TYPE_CUSTOM || type == Phone.TYPE_ASSISTANT;
+        }
+
+        @Override
+        protected int getTypeLabelResource(Integer type) {
+            if (type == null) return R.string.call_other;
+            switch (type) {
+                case Phone.TYPE_HOME: return R.string.call_home;
+                case Phone.TYPE_MOBILE: return R.string.call_mobile;
+                case Phone.TYPE_WORK: return R.string.call_work;
+                case Phone.TYPE_FAX_WORK: return R.string.call_fax_work;
+                case Phone.TYPE_FAX_HOME: return R.string.call_fax_home;
+                case Phone.TYPE_PAGER: return R.string.call_pager;
+                case Phone.TYPE_OTHER: return R.string.call_other;
+                case Phone.TYPE_CALLBACK: return R.string.call_callback;
+                case Phone.TYPE_CAR: return R.string.call_car;
+                case Phone.TYPE_COMPANY_MAIN: return R.string.call_company_main;
+                case Phone.TYPE_ISDN: return R.string.call_isdn;
+                case Phone.TYPE_MAIN: return R.string.call_main;
+                case Phone.TYPE_OTHER_FAX: return R.string.call_other_fax;
+                case Phone.TYPE_RADIO: return R.string.call_radio;
+                case Phone.TYPE_TELEX: return R.string.call_telex;
+                case Phone.TYPE_TTY_TDD: return R.string.call_tty_tdd;
+                case Phone.TYPE_WORK_MOBILE: return R.string.call_work_mobile;
+                case Phone.TYPE_WORK_PAGER: return R.string.call_work_pager;
+                case Phone.TYPE_ASSISTANT: return R.string.call_assistant;
+                case Phone.TYPE_MMS: return R.string.call_mms;
+                default: return R.string.call_custom;
+            }
+        }
+    }
+
+    public static class PhoneActionAltInflater extends CommonInflater {
+        @Override
+        protected boolean isCustom(Integer type) {
+            return (type == Phone.TYPE_CUSTOM || type == Phone.TYPE_ASSISTANT);
+        }
+
+        @Override
+        protected int getTypeLabelResource(Integer type) {
+            if (type == null) return R.string.sms_other;
+            switch (type) {
+                case Phone.TYPE_HOME: return R.string.sms_home;
+                case Phone.TYPE_MOBILE: return R.string.sms_mobile;
+                case Phone.TYPE_WORK: return R.string.sms_work;
+                case Phone.TYPE_FAX_WORK: return R.string.sms_fax_work;
+                case Phone.TYPE_FAX_HOME: return R.string.sms_fax_home;
+                case Phone.TYPE_PAGER: return R.string.sms_pager;
+                case Phone.TYPE_OTHER: return R.string.sms_other;
+                case Phone.TYPE_CALLBACK: return R.string.sms_callback;
+                case Phone.TYPE_CAR: return R.string.sms_car;
+                case Phone.TYPE_COMPANY_MAIN: return R.string.sms_company_main;
+                case Phone.TYPE_ISDN: return R.string.sms_isdn;
+                case Phone.TYPE_MAIN: return R.string.sms_main;
+                case Phone.TYPE_OTHER_FAX: return R.string.sms_other_fax;
+                case Phone.TYPE_RADIO: return R.string.sms_radio;
+                case Phone.TYPE_TELEX: return R.string.sms_telex;
+                case Phone.TYPE_TTY_TDD: return R.string.sms_tty_tdd;
+                case Phone.TYPE_WORK_MOBILE: return R.string.sms_work_mobile;
+                case Phone.TYPE_WORK_PAGER: return R.string.sms_work_pager;
+                case Phone.TYPE_ASSISTANT: return R.string.sms_assistant;
+                case Phone.TYPE_MMS: return R.string.sms_mms;
+                default: return R.string.sms_custom;
+            }
+        }
+    }
+
+    public static class EmailActionInflater extends CommonInflater {
+        @Override
+        protected int getTypeLabelResource(Integer type) {
+            if (type == null) return R.string.email;
+            switch (type) {
+                case Email.TYPE_HOME: return R.string.email_home;
+                case Email.TYPE_WORK: return R.string.email_work;
+                case Email.TYPE_OTHER: return R.string.email_other;
+                case Email.TYPE_MOBILE: return R.string.email_mobile;
+                default: return R.string.email_custom;
+            }
+        }
+    }
+
+    public static class EventActionInflater extends CommonInflater {
+        @Override
+        protected int getTypeLabelResource(Integer type) {
+            return Event.getTypeResource(type);
+        }
+    }
+
+    public static class PostalActionInflater extends CommonInflater {
+        @Override
+        protected int getTypeLabelResource(Integer type) {
+            if (type == null) return R.string.map_other;
+            switch (type) {
+                case StructuredPostal.TYPE_HOME: return R.string.map_home;
+                case StructuredPostal.TYPE_WORK: return R.string.map_work;
+                case StructuredPostal.TYPE_OTHER: return R.string.map_other;
+                default: return R.string.map_custom;
+            }
+        }
+    }
+
+    public static class ImActionInflater extends CommonInflater {
+        @Override
+        protected String getTypeColumn() {
+            return Im.PROTOCOL;
+        }
+
+        @Override
+        protected String getLabelColumn() {
+            return Im.CUSTOM_PROTOCOL;
+        }
+
+        @Override
+        protected int getTypeLabelResource(Integer type) {
+            if (type == null) return R.string.chat;
+            switch (type) {
+                case Im.PROTOCOL_AIM: return R.string.chat_aim;
+                case Im.PROTOCOL_MSN: return R.string.chat_msn;
+                case Im.PROTOCOL_YAHOO: return R.string.chat_yahoo;
+                case Im.PROTOCOL_SKYPE: return R.string.chat_skype;
+                case Im.PROTOCOL_QQ: return R.string.chat_qq;
+                case Im.PROTOCOL_GOOGLE_TALK: return R.string.chat_gtalk;
+                case Im.PROTOCOL_ICQ: return R.string.chat_icq;
+                case Im.PROTOCOL_JABBER: return R.string.chat_jabber;
+                case Im.PROTOCOL_NETMEETING: return R.string.chat;
+                default: return R.string.chat;
+            }
+        }
+    }
+
+    @Override
+    public int getHeaderColor(Context context) {
+        return 0xff7f93bc;
+    }
+
+    @Override
+    public int getSideBarColor(Context context) {
+        return 0xffbdc7b8;
+    }
+}
diff --git a/src/com/android/contacts/model/FallbackSource.java b/src/com/android/contacts/model/FallbackSource.java
deleted file mode 100644
index f36752a..0000000
--- a/src/com/android/contacts/model/FallbackSource.java
+++ /dev/null
@@ -1,713 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import com.android.contacts.R;
-import com.google.android.collect.Lists;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.res.Resources;
-import android.database.Cursor;
-import android.provider.ContactsContract.CommonDataKinds.BaseTypes;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Event;
-import android.provider.ContactsContract.CommonDataKinds.Im;
-import android.provider.ContactsContract.CommonDataKinds.Nickname;
-import android.provider.ContactsContract.CommonDataKinds.Note;
-import android.provider.ContactsContract.CommonDataKinds.Organization;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.provider.ContactsContract.CommonDataKinds.SipAddress;
-import android.provider.ContactsContract.CommonDataKinds.StructuredName;
-import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
-import android.provider.ContactsContract.CommonDataKinds.Website;
-import android.view.inputmethod.EditorInfo;
-
-import java.util.Locale;
-
-public class FallbackSource extends ContactsSource {
-    protected static final int FLAGS_PHONE = EditorInfo.TYPE_CLASS_PHONE;
-    protected static final int FLAGS_EMAIL = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
-    protected static final int FLAGS_PERSON_NAME = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS | EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME;
-    protected static final int FLAGS_PHONETIC = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_VARIATION_PHONETIC;
-    protected static final int FLAGS_GENERIC_NAME = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS;
-    protected static final int FLAGS_NOTE = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
-    protected static final int FLAGS_WEBSITE = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_VARIATION_URI;
-    protected static final int FLAGS_POSTAL = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_VARIATION_POSTAL_ADDRESS | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS
-            | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
-    protected static final int FLAGS_SIP_ADDRESS = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;  // since SIP addresses have the same
-                                                             // basic format as email addresses
-
-    public FallbackSource() {
-        this.accountType = null;
-        this.titleRes = R.string.account_phone;
-        this.iconRes = R.drawable.ic_launcher_contacts;
-    }
-
-    @Override
-    protected void inflate(Context context, int inflateLevel) {
-
-        inflateStructuredName(context, inflateLevel);
-        inflateNickname(context, inflateLevel);
-        inflatePhone(context, inflateLevel);
-        inflateEmail(context, inflateLevel);
-        inflateStructuredPostal(context, inflateLevel);
-        inflateIm(context, inflateLevel);
-        inflateOrganization(context, inflateLevel);
-        inflatePhoto(context, inflateLevel);
-        inflateNote(context, inflateLevel);
-        inflateWebsite(context, inflateLevel);
-        inflateEvent(context, inflateLevel);
-        inflateSipAddress(context, inflateLevel);
-
-        setInflatedLevel(inflateLevel);
-
-    }
-
-    protected EditType buildPhoneType(int type) {
-        return new EditType(type, Phone.getTypeLabelResource(type));
-    }
-
-    protected EditType buildEmailType(int type) {
-        return new EditType(type, Email.getTypeLabelResource(type));
-    }
-
-    protected EditType buildPostalType(int type) {
-        return new EditType(type, StructuredPostal.getTypeLabelResource(type));
-    }
-
-    protected EditType buildImType(int type) {
-        return new EditType(type, Im.getProtocolLabelResource(type));
-    }
-
-    protected EditType buildOrgType(int type) {
-        return new EditType(type, Organization.getTypeLabelResource(type));
-    }
-
-    protected DataKind inflateStructuredName(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(StructuredName.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(StructuredName.CONTENT_ITEM_TYPE,
-                    R.string.nameLabelsGroup, -1, -1, true));
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            boolean displayOrderPrimary =
-                    context.getResources().getBoolean(R.bool.config_editor_field_order_primary);
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
-                    FLAGS_PERSON_NAME).setOptional(true));
-            if (!displayOrderPrimary) {
-                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family,
-                        FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle,
-                        FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME, R.string.name_given,
-                        FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.SUFFIX, R.string.name_suffix,
-                        FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
-                        R.string.name_phonetic_family, FLAGS_PHONETIC).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
-                        R.string.name_phonetic_middle, FLAGS_PHONETIC).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
-                        R.string.name_phonetic_given, FLAGS_PHONETIC).setOptional(true));
-            } else {
-                kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME, R.string.name_given,
-                        FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle,
-                        FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family,
-                        FLAGS_PERSON_NAME));
-                kind.fieldList.add(new EditField(StructuredName.SUFFIX, R.string.name_suffix,
-                        FLAGS_PERSON_NAME).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME,
-                        R.string.name_phonetic_given, FLAGS_PHONETIC).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME,
-                        R.string.name_phonetic_middle, FLAGS_PHONETIC).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME,
-                        R.string.name_phonetic_family, FLAGS_PHONETIC).setOptional(true));
-            }
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateNickname(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Nickname.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Nickname.CONTENT_ITEM_TYPE,
-                    R.string.nicknameLabelsGroup, -1, 115, true));
-            kind.secondary = true;
-            kind.isList = false;
-            kind.actionHeader = new SimpleInflater(R.string.nicknameLabelsGroup);
-            kind.actionBody = new SimpleInflater(Nickname.NAME);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.defaultValues = new ContentValues();
-            kind.defaultValues.put(Nickname.TYPE, Nickname.TYPE_DEFAULT);
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Nickname.NAME, R.string.nicknameLabelsGroup,
-                    FLAGS_PERSON_NAME));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflatePhone(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Phone.CONTENT_ITEM_TYPE, R.string.phoneLabelsGroup,
-                    android.R.drawable.sym_action_call, 10, true));
-            kind.iconAltRes = R.drawable.sym_action_sms;
-            kind.actionHeader = new PhoneActionInflater();
-            kind.actionAltHeader = new PhoneActionAltInflater();
-            kind.actionBody = new SimpleInflater(Phone.NUMBER);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeColumn = Phone.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
-                    Phone.LABEL));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_CALLBACK).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_CAR).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_COMPANY_MAIN).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_ISDN).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_MAIN).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER_FAX).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_RADIO).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_TELEX).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_TTY_TDD).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_MOBILE).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK_PAGER).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_ASSISTANT).setSecondary(true)
-                    .setCustomColumn(Phone.LABEL));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_MMS).setSecondary(true));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateEmail(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Email.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Email.CONTENT_ITEM_TYPE,
-                    R.string.emailLabelsGroup, android.R.drawable.sym_action_email, 15, true));
-            kind.actionHeader = new EmailActionInflater();
-            kind.actionBody = new SimpleInflater(Email.DATA);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeColumn = Email.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildEmailType(Email.TYPE_HOME));
-            kind.typeList.add(buildEmailType(Email.TYPE_WORK));
-            kind.typeList.add(buildEmailType(Email.TYPE_OTHER));
-            kind.typeList.add(buildEmailType(Email.TYPE_MOBILE));
-            kind.typeList.add(buildEmailType(Email.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
-                    Email.LABEL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateStructuredPostal(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(StructuredPostal.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(StructuredPostal.CONTENT_ITEM_TYPE,
-                    R.string.postalLabelsGroup, R.drawable.sym_action_map, 25, true));
-            kind.actionHeader = new PostalActionInflater();
-            kind.actionBody = new SimpleInflater(StructuredPostal.FORMATTED_ADDRESS);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            final boolean useJapaneseOrder =
-                Locale.JAPANESE.getLanguage().equals(Locale.getDefault().getLanguage());
-            kind.typeColumn = StructuredPostal.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_HOME));
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_WORK));
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_OTHER));
-            kind.typeList.add(buildPostalType(StructuredPostal.TYPE_CUSTOM).setSecondary(true)
-                    .setCustomColumn(StructuredPostal.LABEL));
-
-            kind.fieldList = Lists.newArrayList();
-
-            if (useJapaneseOrder) {
-                kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
-                        R.string.postal_country, FLAGS_POSTAL).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
-                        R.string.postal_postcode, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.REGION,
-                        R.string.postal_region, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.CITY,
-                        R.string.postal_city, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.NEIGHBORHOOD,
-                        R.string.postal_neighborhood, FLAGS_POSTAL).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredPostal.STREET,
-                        R.string.postal_street, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.POBOX,
-                        R.string.postal_pobox, FLAGS_POSTAL).setOptional(true));
-            } else {
-                kind.fieldList.add(new EditField(StructuredPostal.STREET,
-                        R.string.postal_street, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.POBOX,
-                        R.string.postal_pobox, FLAGS_POSTAL).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredPostal.NEIGHBORHOOD,
-                        R.string.postal_neighborhood, FLAGS_POSTAL).setOptional(true));
-                kind.fieldList.add(new EditField(StructuredPostal.CITY,
-                        R.string.postal_city, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.REGION,
-                        R.string.postal_region, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.POSTCODE,
-                        R.string.postal_postcode, FLAGS_POSTAL));
-                kind.fieldList.add(new EditField(StructuredPostal.COUNTRY,
-                        R.string.postal_country, FLAGS_POSTAL).setOptional(true));
-            }
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateIm(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Im.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Im.CONTENT_ITEM_TYPE, R.string.imLabelsGroup,
-                    android.R.drawable.sym_action_chat, 20, true));
-            kind.secondary = true;
-            kind.actionHeader = new ImActionInflater();
-            kind.actionBody = new SimpleInflater(Im.DATA);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            // NOTE: even though a traditional "type" exists, for editing
-            // purposes we're using the protocol to pick labels
-
-            kind.defaultValues = new ContentValues();
-            kind.defaultValues.put(Im.TYPE, Im.TYPE_OTHER);
-
-            kind.typeColumn = Im.PROTOCOL;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildImType(Im.PROTOCOL_AIM));
-            kind.typeList.add(buildImType(Im.PROTOCOL_MSN));
-            kind.typeList.add(buildImType(Im.PROTOCOL_YAHOO));
-            kind.typeList.add(buildImType(Im.PROTOCOL_SKYPE));
-            kind.typeList.add(buildImType(Im.PROTOCOL_QQ));
-            kind.typeList.add(buildImType(Im.PROTOCOL_GOOGLE_TALK));
-            kind.typeList.add(buildImType(Im.PROTOCOL_ICQ));
-            kind.typeList.add(buildImType(Im.PROTOCOL_JABBER));
-            kind.typeList.add(buildImType(Im.PROTOCOL_CUSTOM).setSecondary(true).setCustomColumn(
-                    Im.CUSTOM_PROTOCOL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Im.DATA, R.string.imLabelsGroup, FLAGS_EMAIL));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateOrganization(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Organization.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Organization.CONTENT_ITEM_TYPE,
-                    R.string.organizationLabelsGroup, R.drawable.sym_action_organization, 30, true));
-            kind.actionHeader = new SimpleInflater(Organization.COMPANY);
-            kind.actionBody = new SimpleInflater(Organization.TITLE);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeColumn = Organization.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildOrgType(Organization.TYPE_WORK));
-            kind.typeList.add(buildOrgType(Organization.TYPE_OTHER));
-            kind.typeList.add(buildOrgType(Organization.TYPE_CUSTOM).setSecondary(true)
-                    .setCustomColumn(Organization.LABEL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Organization.COMPANY, R.string.ghostData_company,
-                    FLAGS_GENERIC_NAME));
-            kind.fieldList.add(new EditField(Organization.TITLE, R.string.ghostData_title,
-                    FLAGS_GENERIC_NAME));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflatePhoto(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Photo.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Photo.CONTENT_ITEM_TYPE, -1, -1, -1, true));
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Photo.PHOTO, -1, -1));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateNote(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Note.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Note.CONTENT_ITEM_TYPE,
-                    R.string.label_notes, R.drawable.sym_note, 110, true));
-            kind.isList = false;
-            kind.secondary = true;
-            kind.actionHeader = new SimpleInflater(R.string.label_notes);
-            kind.actionBody = new SimpleInflater(Note.NOTE);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Note.NOTE, R.string.label_notes, FLAGS_NOTE));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateWebsite(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Website.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Website.CONTENT_ITEM_TYPE,
-                    R.string.websiteLabelsGroup, -1, 120, true));
-            kind.secondary = true;
-            kind.actionHeader = new SimpleInflater(R.string.websiteLabelsGroup);
-            kind.actionBody = new SimpleInflater(Website.URL);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.defaultValues = new ContentValues();
-            kind.defaultValues.put(Website.TYPE, Website.TYPE_OTHER);
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Website.URL, R.string.websiteLabelsGroup, FLAGS_WEBSITE));
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateEvent(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(Event.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            kind = addKind(new DataKind(Event.CONTENT_ITEM_TYPE,
-                    R.string.eventLabelsGroup, -1, 150, false));
-            kind.secondary = true;
-            kind.actionHeader = new EventActionInflater();
-            kind.actionBody = new SimpleInflater(Event.START_DATE);
-        }
-
-        return kind;
-    }
-
-    protected DataKind inflateSipAddress(Context context, int inflateLevel) {
-        DataKind kind = getKindForMimetype(SipAddress.CONTENT_ITEM_TYPE);
-        if (kind == null) {
-            // The icon specified here is the one that gets displayed for
-            // "Internet call" items, in the "view contact" UI within the
-            // Contacts app.
-            //
-            // This is independent of the "SIP call" icon that gets
-            // displayed in the Quick Contacts widget, which comes from
-            // the android:icon attribute of the SIP-related
-            // intent-filters in the Phone app's manifest.
-
-            kind = addKind(new DataKind(SipAddress.CONTENT_ITEM_TYPE,
-                    R.string.label_sip_address, android.R.drawable.sym_action_call, 130, true));
-
-            kind.isList = false;
-            kind.secondary = true;
-            kind.actionHeader = new SimpleInflater(R.string.label_sip_address);
-            kind.actionBody = new SimpleInflater(SipAddress.SIP_ADDRESS);
-        }
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(SipAddress.SIP_ADDRESS,
-                                             R.string.label_sip_address, FLAGS_SIP_ADDRESS));
-        }
-
-        return kind;
-    }
-
-    /**
-     * Simple inflater that assumes a string resource has a "%s" that will be
-     * filled from the given column.
-     */
-    public static class SimpleInflater implements StringInflater {
-        private final int mStringRes;
-        private final String mColumnName;
-
-        public SimpleInflater(int stringRes) {
-            this(stringRes, null);
-        }
-
-        public SimpleInflater(String columnName) {
-            this(-1, columnName);
-        }
-
-        public SimpleInflater(int stringRes, String columnName) {
-            mStringRes = stringRes;
-            mColumnName = columnName;
-        }
-
-        public CharSequence inflateUsing(Context context, Cursor cursor) {
-            final int index = mColumnName != null ? cursor.getColumnIndex(mColumnName) : -1;
-            final boolean validString = mStringRes > 0;
-            final boolean validColumn = index != -1;
-
-            final CharSequence stringValue = validString ? context.getText(mStringRes) : null;
-            final CharSequence columnValue = validColumn ? cursor.getString(index) : null;
-
-            if (validString && validColumn) {
-                return String.format(stringValue.toString(), columnValue);
-            } else if (validString) {
-                return stringValue;
-            } else if (validColumn) {
-                return columnValue;
-            } else {
-                return null;
-            }
-        }
-
-        public CharSequence inflateUsing(Context context, ContentValues values) {
-            final boolean validColumn = values.containsKey(mColumnName);
-            final boolean validString = mStringRes > 0;
-
-            final CharSequence stringValue = validString ? context.getText(mStringRes) : null;
-            final CharSequence columnValue = validColumn ? values.getAsString(mColumnName) : null;
-
-            if (validString && validColumn) {
-                return String.format(stringValue.toString(), columnValue);
-            } else if (validString) {
-                return stringValue;
-            } else if (validColumn) {
-                return columnValue;
-            } else {
-                return null;
-            }
-        }
-    }
-
-    public static abstract class CommonInflater implements StringInflater {
-        protected abstract int getTypeLabelResource(Integer type);
-
-        protected boolean isCustom(Integer type) {
-            return type == BaseTypes.TYPE_CUSTOM;
-        }
-
-        protected String getTypeColumn() {
-            return Phone.TYPE;
-        }
-
-        protected String getLabelColumn() {
-            return Phone.LABEL;
-        }
-
-        protected CharSequence getTypeLabel(Resources res, Integer type, CharSequence label) {
-            final int labelRes = getTypeLabelResource(type);
-            if (type == null) {
-                return res.getText(labelRes);
-            } else if (isCustom(type)) {
-                return res.getString(labelRes, label == null ? "" : label);
-            } else {
-                return res.getText(labelRes);
-            }
-        }
-
-        public CharSequence inflateUsing(Context context, Cursor cursor) {
-            final Integer type = cursor.getInt(cursor.getColumnIndex(getTypeColumn()));
-            final String label = cursor.getString(cursor.getColumnIndex(getLabelColumn()));
-            return getTypeLabel(context.getResources(), type, label);
-        }
-
-        public CharSequence inflateUsing(Context context, ContentValues values) {
-            final Integer type = values.getAsInteger(getTypeColumn());
-            final String label = values.getAsString(getLabelColumn());
-            return getTypeLabel(context.getResources(), type, label);
-        }
-    }
-
-    public static class PhoneActionInflater extends CommonInflater {
-        @Override
-        protected boolean isCustom(Integer type) {
-            return type == Phone.TYPE_CUSTOM || type == Phone.TYPE_ASSISTANT;
-        }
-
-        @Override
-        protected int getTypeLabelResource(Integer type) {
-            if (type == null) return R.string.call_other;
-            switch (type) {
-                case Phone.TYPE_HOME: return R.string.call_home;
-                case Phone.TYPE_MOBILE: return R.string.call_mobile;
-                case Phone.TYPE_WORK: return R.string.call_work;
-                case Phone.TYPE_FAX_WORK: return R.string.call_fax_work;
-                case Phone.TYPE_FAX_HOME: return R.string.call_fax_home;
-                case Phone.TYPE_PAGER: return R.string.call_pager;
-                case Phone.TYPE_OTHER: return R.string.call_other;
-                case Phone.TYPE_CALLBACK: return R.string.call_callback;
-                case Phone.TYPE_CAR: return R.string.call_car;
-                case Phone.TYPE_COMPANY_MAIN: return R.string.call_company_main;
-                case Phone.TYPE_ISDN: return R.string.call_isdn;
-                case Phone.TYPE_MAIN: return R.string.call_main;
-                case Phone.TYPE_OTHER_FAX: return R.string.call_other_fax;
-                case Phone.TYPE_RADIO: return R.string.call_radio;
-                case Phone.TYPE_TELEX: return R.string.call_telex;
-                case Phone.TYPE_TTY_TDD: return R.string.call_tty_tdd;
-                case Phone.TYPE_WORK_MOBILE: return R.string.call_work_mobile;
-                case Phone.TYPE_WORK_PAGER: return R.string.call_work_pager;
-                case Phone.TYPE_ASSISTANT: return R.string.call_assistant;
-                case Phone.TYPE_MMS: return R.string.call_mms;
-                default: return R.string.call_custom;
-            }
-        }
-    }
-
-    public static class PhoneActionAltInflater extends CommonInflater {
-        @Override
-        protected boolean isCustom(Integer type) {
-            return (type == Phone.TYPE_CUSTOM || type == Phone.TYPE_ASSISTANT);
-        }
-
-        @Override
-        protected int getTypeLabelResource(Integer type) {
-            if (type == null) return R.string.sms_other;
-            switch (type) {
-                case Phone.TYPE_HOME: return R.string.sms_home;
-                case Phone.TYPE_MOBILE: return R.string.sms_mobile;
-                case Phone.TYPE_WORK: return R.string.sms_work;
-                case Phone.TYPE_FAX_WORK: return R.string.sms_fax_work;
-                case Phone.TYPE_FAX_HOME: return R.string.sms_fax_home;
-                case Phone.TYPE_PAGER: return R.string.sms_pager;
-                case Phone.TYPE_OTHER: return R.string.sms_other;
-                case Phone.TYPE_CALLBACK: return R.string.sms_callback;
-                case Phone.TYPE_CAR: return R.string.sms_car;
-                case Phone.TYPE_COMPANY_MAIN: return R.string.sms_company_main;
-                case Phone.TYPE_ISDN: return R.string.sms_isdn;
-                case Phone.TYPE_MAIN: return R.string.sms_main;
-                case Phone.TYPE_OTHER_FAX: return R.string.sms_other_fax;
-                case Phone.TYPE_RADIO: return R.string.sms_radio;
-                case Phone.TYPE_TELEX: return R.string.sms_telex;
-                case Phone.TYPE_TTY_TDD: return R.string.sms_tty_tdd;
-                case Phone.TYPE_WORK_MOBILE: return R.string.sms_work_mobile;
-                case Phone.TYPE_WORK_PAGER: return R.string.sms_work_pager;
-                case Phone.TYPE_ASSISTANT: return R.string.sms_assistant;
-                case Phone.TYPE_MMS: return R.string.sms_mms;
-                default: return R.string.sms_custom;
-            }
-        }
-    }
-
-    public static class EmailActionInflater extends CommonInflater {
-        @Override
-        protected int getTypeLabelResource(Integer type) {
-            if (type == null) return R.string.email;
-            switch (type) {
-                case Email.TYPE_HOME: return R.string.email_home;
-                case Email.TYPE_WORK: return R.string.email_work;
-                case Email.TYPE_OTHER: return R.string.email_other;
-                case Email.TYPE_MOBILE: return R.string.email_mobile;
-                default: return R.string.email_custom;
-            }
-        }
-    }
-
-    public static class EventActionInflater extends CommonInflater {
-        @Override
-        protected int getTypeLabelResource(Integer type) {
-            return Event.getTypeResource(type);
-        }
-    }
-
-    public static class PostalActionInflater extends CommonInflater {
-        @Override
-        protected int getTypeLabelResource(Integer type) {
-            if (type == null) return R.string.map_other;
-            switch (type) {
-                case StructuredPostal.TYPE_HOME: return R.string.map_home;
-                case StructuredPostal.TYPE_WORK: return R.string.map_work;
-                case StructuredPostal.TYPE_OTHER: return R.string.map_other;
-                default: return R.string.map_custom;
-            }
-        }
-    }
-
-    public static class ImActionInflater extends CommonInflater {
-        @Override
-        protected String getTypeColumn() {
-            return Im.PROTOCOL;
-        }
-
-        @Override
-        protected String getLabelColumn() {
-            return Im.CUSTOM_PROTOCOL;
-        }
-
-        @Override
-        protected int getTypeLabelResource(Integer type) {
-            if (type == null) return R.string.chat;
-            switch (type) {
-                case Im.PROTOCOL_AIM: return R.string.chat_aim;
-                case Im.PROTOCOL_MSN: return R.string.chat_msn;
-                case Im.PROTOCOL_YAHOO: return R.string.chat_yahoo;
-                case Im.PROTOCOL_SKYPE: return R.string.chat_skype;
-                case Im.PROTOCOL_QQ: return R.string.chat_qq;
-                case Im.PROTOCOL_GOOGLE_TALK: return R.string.chat_gtalk;
-                case Im.PROTOCOL_ICQ: return R.string.chat_icq;
-                case Im.PROTOCOL_JABBER: return R.string.chat_jabber;
-                case Im.PROTOCOL_NETMEETING: return R.string.chat;
-                default: return R.string.chat;
-            }
-        }
-    }
-
-    @Override
-    public int getHeaderColor(Context context) {
-        return 0xff7f93bc;
-    }
-
-    @Override
-    public int getSideBarColor(Context context) {
-        return 0xffbdc7b8;
-    }
-}
diff --git a/src/com/android/contacts/model/GoogleAccountType.java b/src/com/android/contacts/model/GoogleAccountType.java
new file mode 100644
index 0000000..404c109
--- /dev/null
+++ b/src/com/android/contacts/model/GoogleAccountType.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2009 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.model;
+
+import com.android.contacts.R;
+import com.google.android.collect.Lists;
+
+import android.content.Context;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+
+public class GoogleAccountType extends FallbackAccountType {
+    public static final String ACCOUNT_TYPE = "com.google";
+
+    public GoogleAccountType(String resPackageName) {
+        this.accountType = ACCOUNT_TYPE;
+        this.resPackageName = null;
+        this.summaryResPackageName = resPackageName;
+    }
+
+    @Override
+    protected void inflate(Context context, int inflateLevel) {
+
+        inflateStructuredName(context, inflateLevel);
+        inflateNickname(context, inflateLevel);
+        inflatePhone(context, inflateLevel);
+        inflateEmail(context, inflateLevel);
+        inflateStructuredPostal(context, inflateLevel);
+        inflateIm(context, inflateLevel);
+        inflateOrganization(context, inflateLevel);
+        inflatePhoto(context, inflateLevel);
+        inflateNote(context, inflateLevel);
+        inflateWebsite(context, inflateLevel);
+        inflateEvent(context, inflateLevel);
+        inflateSipAddress(context, inflateLevel);
+        inflateGroupMembership(context, inflateLevel);
+
+        setInflatedLevel(inflateLevel);
+
+    }
+
+    @Override
+    protected DataKind inflatePhone(Context context, int inflateLevel) {
+        final DataKind kind = super.inflatePhone(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeColumn = Phone.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
+            kind.typeList.add(buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
+                    Phone.LABEL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
+        }
+
+        return kind;
+    }
+
+    @Override
+    protected DataKind inflateEmail(Context context, int inflateLevel) {
+        final DataKind kind = super.inflateEmail(context, BaseAccountType.LEVEL_MIMETYPES);
+
+        if (inflateLevel >= BaseAccountType.LEVEL_CONSTRAINTS) {
+            kind.typeColumn = Email.TYPE;
+            kind.typeList = Lists.newArrayList();
+            kind.typeList.add(buildEmailType(Email.TYPE_HOME));
+            kind.typeList.add(buildEmailType(Email.TYPE_WORK));
+            kind.typeList.add(buildEmailType(Email.TYPE_OTHER));
+            kind.typeList.add(buildEmailType(Email.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
+                    Email.LABEL));
+
+            kind.fieldList = Lists.newArrayList();
+            kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
+        }
+
+        return kind;
+    }
+
+    @Override
+    public int getHeaderColor(Context context) {
+        return 0xff89c2c2;
+    }
+
+    @Override
+    public int getSideBarColor(Context context) {
+        return 0xff5bb4b4;
+    }
+}
diff --git a/src/com/android/contacts/model/GoogleSource.java b/src/com/android/contacts/model/GoogleSource.java
deleted file mode 100644
index d6dfbb6..0000000
--- a/src/com/android/contacts/model/GoogleSource.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import com.android.contacts.R;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.google.android.collect.Lists;
-
-import android.accounts.Account;
-import android.content.ContentProviderOperation;
-import android.content.ContentProviderResult;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.OperationApplicationException;
-import android.database.Cursor;
-import android.os.RemoteException;
-import android.provider.ContactsContract;
-import android.provider.ContactsContract.Groups;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.Contacts.Data;
-
-import java.util.ArrayList;
-
-public class GoogleSource extends FallbackSource {
-    public static final String ACCOUNT_TYPE = "com.google";
-
-    private static final String SELECTION_GROUPS_BY_TITLE_AND_ACCOUNT =
-            Groups.TITLE + "=? AND " + Groups.ACCOUNT_NAME + "=? AND " + Groups.ACCOUNT_TYPE + "=?";
-
-    public GoogleSource(String resPackageName) {
-        this.accountType = ACCOUNT_TYPE;
-        this.resPackageName = null;
-        this.summaryResPackageName = resPackageName;
-    }
-
-    @Override
-    protected void inflate(Context context, int inflateLevel) {
-
-        inflateStructuredName(context, inflateLevel);
-        inflateNickname(context, inflateLevel);
-        inflatePhone(context, inflateLevel);
-        inflateEmail(context, inflateLevel);
-        inflateStructuredPostal(context, inflateLevel);
-        inflateIm(context, inflateLevel);
-        inflateOrganization(context, inflateLevel);
-        inflatePhoto(context, inflateLevel);
-        inflateNote(context, inflateLevel);
-        inflateWebsite(context, inflateLevel);
-        inflateEvent(context, inflateLevel);
-        inflateSipAddress(context, inflateLevel);
-
-        // TODO: GOOGLE: GROUPMEMBERSHIP
-
-        setInflatedLevel(inflateLevel);
-
-    }
-
-    @Override
-    protected DataKind inflatePhone(Context context, int inflateLevel) {
-        final DataKind kind = super.inflatePhone(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeColumn = Phone.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildPhoneType(Phone.TYPE_HOME));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_MOBILE));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_WORK));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_WORK).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_FAX_HOME).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_PAGER).setSecondary(true));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_OTHER));
-            kind.typeList.add(buildPhoneType(Phone.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
-                    Phone.LABEL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Phone.NUMBER, R.string.phoneLabelsGroup, FLAGS_PHONE));
-        }
-
-        return kind;
-    }
-
-    @Override
-    protected DataKind inflateEmail(Context context, int inflateLevel) {
-        final DataKind kind = super.inflateEmail(context, ContactsSource.LEVEL_MIMETYPES);
-
-        if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            kind.typeColumn = Email.TYPE;
-            kind.typeList = Lists.newArrayList();
-            kind.typeList.add(buildEmailType(Email.TYPE_HOME));
-            kind.typeList.add(buildEmailType(Email.TYPE_WORK));
-            kind.typeList.add(buildEmailType(Email.TYPE_OTHER));
-            kind.typeList.add(buildEmailType(Email.TYPE_CUSTOM).setSecondary(true).setCustomColumn(
-                    Email.LABEL));
-
-            kind.fieldList = Lists.newArrayList();
-            kind.fieldList.add(new EditField(Email.DATA, R.string.emailLabelsGroup, FLAGS_EMAIL));
-        }
-
-        return kind;
-    }
-
-    // TODO: this should come from resource in the future
-    // Note that frameworks/base/core/java/android/pim/vcard/VCardEntry.java also wants
-    // this String.
-    private static final String GOOGLE_MY_CONTACTS_GROUP = "System Group: My Contacts";
-
-    public static final void attemptMyContactsMembership(EntityDelta state, Context context) {
-        final ValuesDelta stateValues = state.getValues();
-	stateValues.setFromTemplate(true);
-        final String accountName = stateValues.getAsString(RawContacts.ACCOUNT_NAME);
-        final String accountType = stateValues.getAsString(RawContacts.ACCOUNT_TYPE);
-        attemptMyContactsMembership(state, accountName, accountType, context, true);
-    }
-
-    public static final void createMyContactsIfNotExist(Account account, Context context) {
-        attemptMyContactsMembership(null, account.name, account.type, context, true);
-    }
-
-    /**
-     *
-     * @param allowRecur If the group is created between querying/about to create, we recur.  But
-     *     to prevent excess recursion, we provide a flag to make sure we only do the recursion loop
-     *     once
-     */
-    private static final void attemptMyContactsMembership(EntityDelta state,
-                final String accountName, final String accountType, Context context,
-                boolean allowRecur) {
-        final ContentResolver resolver = context.getContentResolver();
-
-        Cursor cursor = resolver.query(Groups.CONTENT_URI,
-                new String[] {Groups.TITLE, Groups.SOURCE_ID, Groups.SHOULD_SYNC},
-                Groups.ACCOUNT_NAME + " =? AND " + Groups.ACCOUNT_TYPE + " =?",
-                new String[] {accountName, accountType}, null);
-
-        boolean myContactsExists = false;
-        long assignToGroupSourceId = -1;
-        while (cursor.moveToNext()) {
-            if (GOOGLE_MY_CONTACTS_GROUP.equals(cursor.getString(0))) {
-                myContactsExists = true;
-            }
-            if (assignToGroupSourceId == -1 && cursor.getInt(2) != 0) {
-                assignToGroupSourceId = cursor.getInt(1);
-            }
-
-            if (myContactsExists && assignToGroupSourceId != -1) {
-                break;
-            }
-        }
-
-        if (myContactsExists && state == null) {
-            return;
-        }
-
-        try {
-            final ContentValues values = new ContentValues();
-            values.put(Data.MIMETYPE, GroupMembership.CONTENT_ITEM_TYPE);
-
-            if (!myContactsExists) {
-                // create the group if it doesn't exist
-                final ContentValues newGroup = new ContentValues();
-                newGroup.put(Groups.TITLE, GOOGLE_MY_CONTACTS_GROUP);
-
-                newGroup.put(Groups.ACCOUNT_NAME, accountName);
-                newGroup.put(Groups.ACCOUNT_TYPE, accountType);
-                newGroup.put(Groups.GROUP_VISIBLE, "1");
-
-                ArrayList<ContentProviderOperation> operations =
-                    new ArrayList<ContentProviderOperation>();
-
-                operations.add(ContentProviderOperation
-                        .newAssertQuery(Groups.CONTENT_URI)
-                        .withSelection(SELECTION_GROUPS_BY_TITLE_AND_ACCOUNT,
-                                new String[] {GOOGLE_MY_CONTACTS_GROUP, accountName, accountType})
-                        .withExpectedCount(0).build());
-                operations.add(ContentProviderOperation
-                        .newInsert(Groups.CONTENT_URI)
-                        .withValues(newGroup)
-                        .build());
-                try {
-                    ContentProviderResult[] results = resolver.applyBatch(
-                            ContactsContract.AUTHORITY, operations);
-                    values.put(GroupMembership.GROUP_ROW_ID, ContentUris.parseId(results[1].uri));
-                } catch (RemoteException e) {
-                    throw new IllegalStateException("Problem querying for groups", e);
-                } catch (OperationApplicationException e) {
-                    // the group was created after the query but before we tried to create it
-                    if (allowRecur) {
-                        attemptMyContactsMembership(
-                                state, accountName, accountType, context, false);
-                    }
-                    return;
-                }
-            } else {
-                if (assignToGroupSourceId != -1) {
-                    values.put(GroupMembership.GROUP_SOURCE_ID, assignToGroupSourceId);
-                } else {
-                    // there are no Groups to add this contact to, so don't apply any membership
-                    // TODO: alert user that their contact will be dropped?
-                }
-            }
-            if (state != null) {
-                state.addEntry(ValuesDelta.fromAfter(values));
-            }
-        } finally {
-            cursor.close();
-        }
-    }
-
-    @Override
-    public int getHeaderColor(Context context) {
-        return 0xff89c2c2;
-    }
-
-    @Override
-    public int getSideBarColor(Context context) {
-        return 0xff5bb4b4;
-    }
-}
diff --git a/src/com/android/contacts/model/Sources.java b/src/com/android/contacts/model/Sources.java
deleted file mode 100644
index be3f17d..0000000
--- a/src/com/android/contacts/model/Sources.java
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (C) 2009 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.model;
-
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.google.android.collect.Lists;
-import com.google.android.collect.Maps;
-import com.google.android.collect.Sets;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.accounts.AuthenticatorDescription;
-import android.accounts.OnAccountsUpdateListener;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.IContentService;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.SyncAdapterType;
-import android.content.pm.PackageManager;
-import android.os.RemoteException;
-import android.provider.ContactsContract;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Locale;
-
-/**
- * Singleton holder for all parsed {@link ContactsSource} available on the
- * system, typically filled through {@link PackageManager} queries.
- */
-public class Sources extends BroadcastReceiver implements OnAccountsUpdateListener {
-    private static final String TAG = "Sources";
-
-    private Context mContext;
-    private Context mApplicationContext;
-    private AccountManager mAccountManager;
-
-    private ContactsSource mFallbackSource = null;
-
-    private HashMap<String, ContactsSource> mSources = Maps.newHashMap();
-    private HashSet<String> mKnownPackages = Sets.newHashSet();
-
-    private static SoftReference<Sources> sInstance = null;
-
-    /**
-     * Requests the singleton instance of {@link Sources} with data bound from
-     * the available authenticators. This method blocks until its interaction
-     * with {@link AccountManager} is finished, so don't call from a UI thread.
-     */
-    public static synchronized Sources getInstance(Context context) {
-        Sources sources = sInstance == null ? null : sInstance.get();
-        if (sources == null) {
-            sources = new Sources(context);
-            sInstance = new SoftReference<Sources>(sources);
-        }
-        return sources;
-    }
-
-    /**
-     * Internal constructor that only performs initial parsing.
-     */
-    private Sources(Context context) {
-        mContext = context;
-        mApplicationContext = context.getApplicationContext();
-        mAccountManager = AccountManager.get(mApplicationContext);
-
-        // Create fallback contacts source for on-phone contacts
-        mFallbackSource = new FallbackSource();
-
-        queryAccounts();
-
-        // Request updates when packages or accounts change
-        IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
-        filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
-        filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
-        filter.addDataScheme("package");
-        mApplicationContext.registerReceiver(this, filter);
-        IntentFilter sdFilter = new IntentFilter();
-        sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE);
-        sdFilter.addAction(Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE);
-        mApplicationContext.registerReceiver(this, sdFilter);
-
-        // Request updates when locale is changed so that the order of each field will
-        // be able to be changed on the locale change.
-        filter = new IntentFilter(Intent.ACTION_LOCALE_CHANGED);
-        mApplicationContext.registerReceiver(this, filter);
-
-        mAccountManager.addOnAccountsUpdatedListener(this, null, false);
-    }
-
-    /** @hide exposed for unit tests */
-    public Sources(ContactsSource... sources) {
-        for (ContactsSource source : sources) {
-            addSource(source);
-        }
-    }
-
-    protected void addSource(ContactsSource source) {
-        mSources.put(source.accountType, source);
-        mKnownPackages.add(source.resPackageName);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        final String action = intent.getAction();
-
-        if (Intent.ACTION_PACKAGE_REMOVED.equals(action)
-                || Intent.ACTION_PACKAGE_ADDED.equals(action)
-                || Intent.ACTION_PACKAGE_CHANGED.equals(action) ||
-                Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action) ||
-                Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
-            String[] pkgList = null;
-            // Handle applications on sdcard.
-            if (Intent.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE.equals(action) ||
-                    Intent.ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE.equals(action)) {
-                pkgList = intent.getStringArrayExtra(Intent.EXTRA_CHANGED_PACKAGE_LIST);
-            } else {
-                final String packageName = intent.getData().getSchemeSpecificPart();
-                pkgList = new String[] { packageName };
-            }
-            if (pkgList != null) {
-                for (String packageName : pkgList) {
-                    final boolean knownPackage = mKnownPackages.contains(packageName);
-                    if (knownPackage) {
-                        // Invalidate cache of existing source
-                        invalidateCache(packageName);
-                    } else {
-                        // Unknown source, so reload from scratch
-                        queryAccounts();
-                    }
-                }
-            }
-        } else if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
-            invalidateAllCache();
-        }
-    }
-
-    protected void invalidateCache(String packageName) {
-        for (ContactsSource source : mSources.values()) {
-            if (TextUtils.equals(packageName, source.resPackageName)) {
-                // Invalidate any cache for the changed package
-                source.invalidateCache();
-            }
-        }
-    }
-
-    protected void invalidateAllCache() {
-        mFallbackSource.invalidateCache();
-        for (ContactsSource source : mSources.values()) {
-            source.invalidateCache();
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onAccountsUpdated(Account[] accounts) {
-        // Refresh to catch any changed accounts
-        queryAccounts();
-    }
-
-    /**
-     * Blocking call to load all {@link AuthenticatorDescription} known by the
-     * {@link AccountManager} on the system.
-     */
-    protected synchronized void queryAccounts() {
-        mSources.clear();
-        mKnownPackages.clear();
-
-        final AccountManager am = mAccountManager;
-        final IContentService cs = ContentResolver.getContentService();
-
-        try {
-            final SyncAdapterType[] syncs = cs.getSyncAdapterTypes();
-            final AuthenticatorDescription[] auths = am.getAuthenticatorTypes();
-
-            for (SyncAdapterType sync : syncs) {
-                if (!ContactsContract.AUTHORITY.equals(sync.authority)) {
-                    // Skip sync adapters that don't provide contact data.
-                    continue;
-                }
-
-                // Look for the formatting details provided by each sync
-                // adapter, using the authenticator to find general resources.
-                final String accountType = sync.accountType;
-                final AuthenticatorDescription auth = findAuthenticator(auths, accountType);
-
-                ContactsSource source;
-                if (GoogleSource.ACCOUNT_TYPE.equals(accountType)) {
-                    source = new GoogleSource(auth.packageName);
-                } else if (ExchangeSource.ACCOUNT_TYPE.equals(accountType)) {
-                    source = new ExchangeSource(auth.packageName);
-                } else {
-                    // TODO: use syncadapter package instead, since it provides resources
-                    Log.d(TAG, "Creating external source for type=" + accountType
-                            + ", packageName=" + auth.packageName);
-                    source = new ExternalSource(auth.packageName);
-                    source.readOnly = !sync.supportsUploading();
-                }
-
-                source.accountType = auth.type;
-                source.titleRes = auth.labelId;
-                source.iconRes = auth.iconId;
-
-                addSource(source);
-            }
-        } catch (RemoteException e) {
-            Log.w(TAG, "Problem loading accounts: " + e.toString());
-        }
-    }
-
-    /**
-     * Find a specific {@link AuthenticatorDescription} in the provided list
-     * that matches the given account type.
-     */
-    protected static AuthenticatorDescription findAuthenticator(AuthenticatorDescription[] auths,
-            String accountType) {
-        for (AuthenticatorDescription auth : auths) {
-            if (accountType.equals(auth.type)) {
-                return auth;
-            }
-        }
-        throw new IllegalStateException("Couldn't find authenticator for specific account type");
-    }
-
-    /**
-     * Return list of all known, writable {@link ContactsSource}. Sources
-     * returned may require inflation before they can be used.
-     */
-    public ArrayList<Account> getAccounts(boolean writableOnly) {
-        final AccountManager am = mAccountManager;
-        final Account[] accounts = am.getAccounts();
-        final ArrayList<Account> matching = Lists.newArrayList();
-
-        for (Account account : accounts) {
-            // Ensure we have details loaded for each account
-            final ContactsSource source = getInflatedSource(account.type,
-                    ContactsSource.LEVEL_SUMMARY);
-            final boolean hasContacts = source != null;
-            final boolean matchesWritable = (!writableOnly || (writableOnly && !source.readOnly));
-            if (hasContacts && matchesWritable) {
-                matching.add(account);
-            }
-        }
-        return matching;
-    }
-
-    /**
-     * Find the best {@link DataKind} matching the requested
-     * {@link ContactsSource#accountType} and {@link DataKind#mimeType}. If no
-     * direct match found, we try searching {@link #mFallbackSource}.
-     * When fourceRefresh is set to true, cache is refreshed and inflation of each
-     * EditField will occur.
-     */
-    public DataKind getKindOrFallback(String accountType, String mimeType, Context context,
-            int inflateLevel) {
-        DataKind kind = null;
-
-        // Try finding source and kind matching request
-        final ContactsSource source = mSources.get(accountType);
-        if (source != null) {
-            source.ensureInflated(context, inflateLevel);
-            kind = source.getKindForMimetype(mimeType);
-        }
-
-        if (kind == null) {
-            // Nothing found, so try fallback as last resort
-            mFallbackSource.ensureInflated(context, inflateLevel);
-            kind = mFallbackSource.getKindForMimetype(mimeType);
-        }
-
-        if (kind == null) {
-            Log.w(TAG, "Unknown type=" + accountType + ", mime=" + mimeType);
-        }
-
-        return kind;
-    }
-
-    /**
-     * Return {@link ContactsSource} for the given account type.
-     */
-    public ContactsSource getInflatedSource(String accountType, int inflateLevel) {
-        // Try finding specific source, otherwise use fallback
-        ContactsSource source = mSources.get(accountType);
-        if (source == null) source = mFallbackSource;
-
-        if (source.isInflated(inflateLevel)) {
-            // Already inflated, so return directly
-            return source;
-        } else {
-            // Not inflated, but requested that we force-inflate
-            source.ensureInflated(mContext, inflateLevel);
-            return source;
-        }
-    }
-}
diff --git a/src/com/android/contacts/preference/ContactsPreferenceActivity.java b/src/com/android/contacts/preference/ContactsPreferenceActivity.java
new file mode 100644
index 0000000..3ec2e61
--- /dev/null
+++ b/src/com/android/contacts/preference/ContactsPreferenceActivity.java
@@ -0,0 +1,1100 @@
+/*
+ * Copyright (C) 2009 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.preference;
+
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.GoogleAccountType;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.util.EmptyService;
+import com.android.contacts.util.LocalizedNameResolver;
+import com.android.contacts.util.WeakAsyncTask;
+import com.google.android.collect.Lists;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.ExpandableListActivity;
+import android.app.ProgressDialog;
+import android.content.ContentProviderOperation;
+import android.content.ContentProviderOperation.Builder;
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.EntityIterator;
+import android.content.Intent;
+import android.content.OperationApplicationException;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.preference.PreferenceActivity;
+import android.preference.PreferenceActivity.Header;
+import android.preference.PreferenceManager;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Groups;
+import android.provider.ContactsContract.Settings;
+import android.util.Log;
+import android.view.ContextMenu;
+import android.view.LayoutInflater;
+import android.view.MenuItem;
+import android.view.MenuItem.OnMenuItemClickListener;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseExpandableListAdapter;
+import android.widget.CheckBox;
+import android.widget.ExpandableListAdapter;
+import android.widget.ExpandableListView;
+import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Contacts settings.
+ */
+public final class ContactsPreferenceActivity extends PreferenceActivity
+//implements
+//        AdapterView.OnItemClickListener, View.OnClickListener
+        {
+    private static final String TAG = "ContactsSettingsActivity";
+
+    /**
+     * Populate the activity with the top-level headers.
+     */
+    @Override
+    public void onBuildHeaders(List<Header> target) {
+        loadHeadersFromResource(R.xml.preference_headers, target);
+    }
+
+
+//    public interface Prefs {
+//        public static final String DISPLAY_ONLY_PHONES = "only_phones";
+//        public static final boolean DISPLAY_ONLY_PHONES_DEFAULT = false;
+//
+//    }
+//
+//    private static final int DIALOG_SORT_ORDER = 1;
+//    private static final int DIALOG_DISPLAY_ORDER = 2;
+//
+//    private ExpandableListView mList;
+//    private DisplayAdapter mAdapter;
+//
+//    private SharedPreferences mPrefs;
+//    private ContactsPreferences mContactsPrefs;
+//
+//    private CheckBox mDisplayPhones;
+//
+//    private View mHeaderPhones;
+//    private View mHeaderSeparator;
+//
+//    private View mSortOrderView;
+//    private TextView mSortOrderTextView;
+//    private int mSortOrder;
+//
+//    private View mDisplayOrderView;
+//    private TextView mDisplayOrderTextView;
+//    private int mDisplayOrder;
+//
+//    @Override
+//    protected void onCreate(Bundle icicle) {
+//        super.onCreate(icicle);
+//        setContentView(R.layout.contacts_preferences);
+//
+//        mList = getExpandableListView();
+//        mList.setHeaderDividersEnabled(true);
+//        mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
+//        mContactsPrefs = new ContactsPreferences(this);
+//        mAdapter = new DisplayAdapter(this);
+//
+//        final LayoutInflater inflater = getLayoutInflater();
+//
+//        createWithPhonesOnlyPreferenceView(inflater);
+//        createSortOrderPreferenceView(inflater);
+//        createDisplayOrderPreferenceView(inflater);
+//        createDisplayGroupHeader(inflater);
+//
+//        findViewById(R.id.btn_done).setOnClickListener(this);
+//        findViewById(R.id.btn_discard).setOnClickListener(this);
+//
+//        // Catch clicks on the header views
+//        mList.setOnItemClickListener(this);
+//        mList.setOnCreateContextMenuListener(this);
+//
+//        mSortOrder = mContactsPrefs.getSortOrder();
+//        mDisplayOrder = mContactsPrefs.getDisplayOrder();
+//    }
+//
+//    private void createWithPhonesOnlyPreferenceView(LayoutInflater inflater) {
+//        // Add the "Only contacts with phones" header modifier.
+//        mHeaderPhones = inflater.inflate(R.layout.display_options_phones_only, mList, false);
+//        mHeaderPhones.setId(R.id.header_phones);
+//        mDisplayPhones = (CheckBox) mHeaderPhones.findViewById(android.R.id.checkbox);
+//        mDisplayPhones.setChecked(mPrefs.getBoolean(Prefs.DISPLAY_ONLY_PHONES,
+//                Prefs.DISPLAY_ONLY_PHONES_DEFAULT));
+//        {
+//            final TextView text1 = (TextView)mHeaderPhones.findViewById(android.R.id.text1);
+//            final TextView text2 = (TextView)mHeaderPhones.findViewById(android.R.id.text2);
+//            text1.setText(R.string.showFilterPhones);
+//            text2.setText(R.string.showFilterPhonesDescrip);
+//        }
+//    }
+//
+//    private void createSortOrderPreferenceView(LayoutInflater inflater) {
+//        mSortOrderView = inflater.inflate(R.layout.preference_with_more_button, mList, false);
+//
+//        View preferenceLayout = mSortOrderView.findViewById(R.id.preference);
+//
+//        TextView label = (TextView)preferenceLayout.findViewById(R.id.label);
+//        label.setText(getString(R.string.display_options_sort_list_by));
+//
+//        mSortOrderTextView = (TextView)preferenceLayout.findViewById(R.id.data);
+//    }
+//
+//    private void createDisplayOrderPreferenceView(LayoutInflater inflater) {
+//        mDisplayOrderView = inflater.inflate(R.layout.preference_with_more_button, mList, false);
+//        View preferenceLayout = mDisplayOrderView.findViewById(R.id.preference);
+//
+//        TextView label = (TextView)preferenceLayout.findViewById(R.id.label);
+//        label.setText(getString(R.string.display_options_view_names_as));
+//
+//        mDisplayOrderTextView = (TextView)preferenceLayout.findViewById(R.id.data);
+//    }
+//
+//    private void createDisplayGroupHeader(LayoutInflater inflater) {
+//        // Add the separator before showing the detailed group list.
+//        mHeaderSeparator = inflater.inflate(R.layout.list_separator, mList, false);
+//        {
+//            final TextView text1 = (TextView)mHeaderSeparator;
+//            text1.setText(R.string.headerContactGroups);
+//        }
+//    }
+//
+//    @Override
+//    protected void onResume() {
+//        super.onResume();
+//        mList.removeHeaderView(mHeaderPhones);
+//        mList.removeHeaderView(mSortOrderView);
+//        mList.removeHeaderView(mDisplayOrderView);
+//        mList.removeHeaderView(mHeaderSeparator);
+//
+//        // List adapter needs to be reset, because header views cannot be added
+//        // to a list with an existing adapter.
+//        setListAdapter(null);
+//
+//        mList.addHeaderView(mHeaderPhones, null, true);
+//        if (mContactsPrefs.isSortOrderUserChangeable()) {
+//            mList.addHeaderView(mSortOrderView, null, true);
+//        }
+//
+//        if (mContactsPrefs.isSortOrderUserChangeable()) {
+//            mList.addHeaderView(mDisplayOrderView, null, true);
+//        }
+//
+//        mList.addHeaderView(mHeaderSeparator, null, false);
+//
+//        setListAdapter(mAdapter);
+//
+//        bindView();
+//
+//        // Start background query to find account details
+//        new QueryGroupsTask(this).execute();
+//    }
+//
+//    private void bindView() {
+//        mSortOrderTextView.setText(
+//                mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY
+//                        ? getString(R.string.display_options_sort_by_given_name)
+//                        : getString(R.string.display_options_sort_by_family_name));
+//
+//        mDisplayOrderTextView.setText(
+//                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY
+//                        ? getString(R.string.display_options_view_given_name_first)
+//                        : getString(R.string.display_options_view_family_name_first));
+//    }
+//
+//    @Override
+//    protected Dialog onCreateDialog(int id, Bundle args) {
+//        switch (id) {
+//            case DIALOG_SORT_ORDER:
+//                return createSortOrderDialog();
+//            case DIALOG_DISPLAY_ORDER:
+//                return createDisplayOrderDialog();
+//        }
+//
+//        return null;
+//    }
+//
+//    private Dialog createSortOrderDialog() {
+//        String[] items = new String[] {
+//                getString(R.string.display_options_sort_by_given_name),
+//                getString(R.string.display_options_sort_by_family_name),
+//        };
+//
+//        return new AlertDialog.Builder(this)
+//            .setIcon(com.android.internal.R.drawable.ic_dialog_menu_generic)
+//            .setTitle(R.string.display_options_sort_list_by)
+//            .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
+//                    public void onClick(DialogInterface dialog, int whichButton) {
+//                        setSortOrder(dialog);
+//                        dialog.dismiss();
+//                    }
+//                })
+//            .setNegativeButton(android.R.string.cancel, null)
+//            .create();
+//    }
+//
+//    private Dialog createDisplayOrderDialog() {
+//        String[] items = new String[] {
+//                getString(R.string.display_options_view_given_name_first),
+//                getString(R.string.display_options_view_family_name_first),
+//        };
+//
+//        return new AlertDialog.Builder(this)
+//            .setIcon(com.android.internal.R.drawable.ic_dialog_menu_generic)
+//            .setTitle(R.string.display_options_view_names_as)
+//            .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
+//                    public void onClick(DialogInterface dialog, int whichButton) {
+//                        setDisplayOrder(dialog);
+//                        dialog.dismiss();
+//                    }
+//                })
+//            .setNegativeButton(android.R.string.cancel, null)
+//            .create();
+//    }
+//
+//    @Override
+//    protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
+//        switch (id) {
+//            case DIALOG_SORT_ORDER:
+//                setCheckedItem(dialog,
+//                        mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY ? 0 : 1);
+//                break;
+//            case DIALOG_DISPLAY_ORDER:
+//                setCheckedItem(dialog,
+//                        mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY
+//                                ? 0 : 1);
+//                break;
+//        }
+//    }
+//
+//    private void setCheckedItem(Dialog dialog, int position) {
+//        ListView listView = ((AlertDialog)dialog).getListView();
+//        listView.setItemChecked(position, true);
+//        listView.setSelection(position);
+//    }
+//
+//    protected void setSortOrder(DialogInterface dialog) {
+//        ListView listView = ((AlertDialog)dialog).getListView();
+//        int checked = listView.getCheckedItemPosition();
+//        mSortOrder = checked == 0
+//                ? ContactsContract.Preferences.SORT_ORDER_PRIMARY
+//                : ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE;
+//
+//        bindView();
+//    }
+//
+//    protected void setDisplayOrder(DialogInterface dialog) {
+//        ListView listView = ((AlertDialog)dialog).getListView();
+//        int checked = listView.getCheckedItemPosition();
+//        mDisplayOrder = checked == 0
+//                ? ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY
+//                : ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE;
+//
+//        bindView();
+//    }
+//
+//    /**
+//     * Background operation to build set of {@link AccountDisplay} for each
+//     * {@link AccountTypes#getAccounts(boolean)} that provides groups.
+//     */
+//    private static class QueryGroupsTask extends
+//            WeakAsyncTask<Void, Void, AccountSet, ContactsPreferenceActivity> {
+//        public QueryGroupsTask(ContactsPreferenceActivity target) {
+//            super(target);
+//        }
+//
+//        @Override
+//        protected AccountSet doInBackground(ContactsPreferenceActivity target,
+//                Void... params) {
+//            final Context context = target;
+//            final AccountTypes sources = AccountTypes.getInstance(context);
+//            final ContentResolver resolver = context.getContentResolver();
+//
+//            // Inflate groups entry for each account
+//            final AccountSet accounts = new AccountSet();
+//            for (Account account : sources.getAccounts(false)) {
+//                accounts.add(new AccountDisplay(resolver, account.name, account.type));
+//            }
+//
+//            return accounts;
+//        }
+//
+//        @Override
+//        protected void onPostExecute(ContactsPreferenceActivity target, AccountSet result) {
+//            target.mAdapter.setAccounts(result);
+//        }
+//    }
+//
+//    private static final int DEFAULT_SHOULD_SYNC = 1;
+//    private static final int DEFAULT_VISIBLE = 0;
+//
+//    /**
+//     * Entry holding any changes to {@link Groups} or {@link Settings} rows,
+//     * such as {@link Groups#SHOULD_SYNC} or {@link Groups#GROUP_VISIBLE}.
+//     */
+//    protected static class GroupDelta extends ValuesDelta {
+//        private boolean mUngrouped = false;
+//        private boolean mAccountHasGroups;
+//
+//        private GroupDelta() {
+//            super();
+//        }
+//
+//        /**
+//         * Build {@link GroupDelta} from the {@link Settings} row for the given
+//         * {@link Settings#ACCOUNT_NAME} and {@link Settings#ACCOUNT_TYPE}.
+//         */
+//        public static GroupDelta fromSettings(ContentResolver resolver, String accountName,
+//                String accountType, boolean accountHasGroups) {
+//            final Uri settingsUri = Settings.CONTENT_URI.buildUpon()
+//                    .appendQueryParameter(Settings.ACCOUNT_NAME, accountName)
+//                    .appendQueryParameter(Settings.ACCOUNT_TYPE, accountType).build();
+//            final Cursor cursor = resolver.query(settingsUri, new String[] {
+//                    Settings.SHOULD_SYNC, Settings.UNGROUPED_VISIBLE
+//            }, null, null, null);
+//
+//            try {
+//                final ContentValues values = new ContentValues();
+//                values.put(Settings.ACCOUNT_NAME, accountName);
+//                values.put(Settings.ACCOUNT_TYPE, accountType);
+//
+//                if (cursor != null && cursor.moveToFirst()) {
+//                    // Read existing values when present
+//                    values.put(Settings.SHOULD_SYNC, cursor.getInt(0));
+//                    values.put(Settings.UNGROUPED_VISIBLE, cursor.getInt(1));
+//                    return fromBefore(values).setUngrouped(accountHasGroups);
+//                } else {
+//                    // Nothing found, so treat as create
+//                    values.put(Settings.SHOULD_SYNC, DEFAULT_SHOULD_SYNC);
+//                    values.put(Settings.UNGROUPED_VISIBLE, DEFAULT_VISIBLE);
+//                    return fromAfter(values).setUngrouped(accountHasGroups);
+//                }
+//            } finally {
+//                if (cursor != null) cursor.close();
+//            }
+//        }
+//
+//        public static GroupDelta fromBefore(ContentValues before) {
+//            final GroupDelta entry = new GroupDelta();
+//            entry.mBefore = before;
+//            entry.mAfter = new ContentValues();
+//            return entry;
+//        }
+//
+//        public static GroupDelta fromAfter(ContentValues after) {
+//            final GroupDelta entry = new GroupDelta();
+//            entry.mBefore = null;
+//            entry.mAfter = after;
+//            return entry;
+//        }
+//
+//        protected GroupDelta setUngrouped(boolean accountHasGroups) {
+//            mUngrouped = true;
+//            mAccountHasGroups = accountHasGroups;
+//            return this;
+//        }
+//
+//        @Override
+//        public boolean beforeExists() {
+//            return mBefore != null;
+//        }
+//
+//        public boolean getShouldSync() {
+//            return getAsInteger(mUngrouped ? Settings.SHOULD_SYNC : Groups.SHOULD_SYNC,
+//                    DEFAULT_SHOULD_SYNC) != 0;
+//        }
+//
+//        public boolean getVisible() {
+//            return getAsInteger(mUngrouped ? Settings.UNGROUPED_VISIBLE : Groups.GROUP_VISIBLE,
+//                    DEFAULT_VISIBLE) != 0;
+//        }
+//
+//        public void putShouldSync(boolean shouldSync) {
+//            put(mUngrouped ? Settings.SHOULD_SYNC : Groups.SHOULD_SYNC, shouldSync ? 1 : 0);
+//        }
+//
+//        public void putVisible(boolean visible) {
+//            put(mUngrouped ? Settings.UNGROUPED_VISIBLE : Groups.GROUP_VISIBLE, visible ? 1 : 0);
+//        }
+//
+//        private String getAccountType() {
+//            return (mBefore == null ? mAfter : mBefore).getAsString(Settings.ACCOUNT_TYPE);
+//        }
+//
+//        public CharSequence getTitle(Context context) {
+//            if (mUngrouped) {
+//                final String customAllContactsName =
+//                        LocalizedNameResolver.getAllContactsName(context, getAccountType());
+//                if (customAllContactsName != null) {
+//                    return customAllContactsName;
+//                }
+//                if (mAccountHasGroups) {
+//                    return context.getText(R.string.display_ungrouped);
+//                } else {
+//                    return context.getText(R.string.display_all_contacts);
+//                }
+//            } else {
+//                final Integer titleRes = getAsInteger(Groups.TITLE_RES);
+//                if (titleRes != null) {
+//                    final String packageName = getAsString(Groups.RES_PACKAGE);
+//                    return context.getPackageManager().getText(packageName, titleRes, null);
+//                } else {
+//                    return getAsString(Groups.TITLE);
+//                }
+//            }
+//        }
+//
+//        /**
+//         * Build a possible {@link ContentProviderOperation} to persist any
+//         * changes to the {@link Groups} or {@link Settings} row described by
+//         * this {@link GroupDelta}.
+//         */
+//        public ContentProviderOperation buildDiff() {
+//            if (isNoop()) {
+//                return null;
+//            } else if (isUpdate()) {
+//                // When has changes and "before" exists, then "update"
+//                final Builder builder = ContentProviderOperation
+//                        .newUpdate(mUngrouped ? Settings.CONTENT_URI : addCallerIsSyncAdapterParameter(Groups.CONTENT_URI));
+//                if (mUngrouped) {
+//                    builder.withSelection(Settings.ACCOUNT_NAME + "=? AND " + Settings.ACCOUNT_TYPE
+//                            + "=?", new String[] {
+//                            this.getAsString(Settings.ACCOUNT_NAME),
+//                            this.getAsString(Settings.ACCOUNT_TYPE)
+//                    });
+//                } else {
+//                    builder.withSelection(Groups._ID + "=" + this.getId(), null);
+//                }
+//                builder.withValues(mAfter);
+//                return builder.build();
+//            } else if (isInsert() && mUngrouped) {
+//                // Only allow inserts for Settings
+//                mAfter.remove(mIdColumn);
+//                final Builder builder = ContentProviderOperation.newInsert(Settings.CONTENT_URI);
+//                builder.withValues(mAfter);
+//                return builder.build();
+//            } else {
+//                throw new IllegalStateException("Unexpected delete or insert");
+//            }
+//        }
+//    }
+//
+//    private static Uri addCallerIsSyncAdapterParameter(Uri uri) {
+//        return uri.buildUpon()
+//	        .appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, "true")
+//	        .build();
+//    }
+//
+//    /**
+//     * {@link Comparator} to sort by {@link Groups#_ID}.
+//     */
+//    private static Comparator<GroupDelta> sIdComparator = new Comparator<GroupDelta>() {
+//        public int compare(GroupDelta object1, GroupDelta object2) {
+//            final Long id1 = object1.getId();
+//            final Long id2 = object2.getId();
+//            if (id1 == null && id2 == null) {
+//                return 0;
+//            } else if (id1 == null) {
+//                return -1;
+//            } else if (id2 == null) {
+//                return 1;
+//            } else if (id1 < id2) {
+//                return -1;
+//            } else if (id1 > id2) {
+//                return 1;
+//            } else {
+//                return 0;
+//            }
+//        }
+//    };
+//
+//    /**
+//     * Set of all {@link AccountDisplay} entries, one for each source.
+//     */
+//    protected static class AccountSet extends ArrayList<AccountDisplay> {
+//        public ArrayList<ContentProviderOperation> buildDiff() {
+//            final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
+//            for (AccountDisplay account : this) {
+//                account.buildDiff(diff);
+//            }
+//            return diff;
+//        }
+//    }
+//
+//    /**
+//     * {@link GroupDelta} details for a single {@link Account}, usually shown as
+//     * children under a single expandable group.
+//     */
+//    protected static class AccountDisplay {
+//        public String mName;
+//        public String mType;
+//
+//        public GroupDelta mUngrouped;
+//        public ArrayList<GroupDelta> mSyncedGroups = Lists.newArrayList();
+//        public ArrayList<GroupDelta> mUnsyncedGroups = Lists.newArrayList();
+//
+//        /**
+//         * Build an {@link AccountDisplay} covering all {@link Groups} under the
+//         * given {@link Account}.
+//         */
+//        public AccountDisplay(ContentResolver resolver, String accountName, String accountType) {
+//            mName = accountName;
+//            mType = accountType;
+//
+//            final Uri groupsUri = Groups.CONTENT_URI.buildUpon()
+//                    .appendQueryParameter(Groups.ACCOUNT_NAME, accountName)
+//                    .appendQueryParameter(Groups.ACCOUNT_TYPE, accountType).build();
+//            EntityIterator iterator = ContactsContract.Groups.newEntityIterator(resolver.query(
+//                    groupsUri, null, null, null, null));
+//            try {
+//                boolean hasGroups = false;
+//
+//                // Create entries for each known group
+//                while (iterator.hasNext()) {
+//                    final ContentValues values = iterator.next().getEntityValues();
+//                    final GroupDelta group = GroupDelta.fromBefore(values);
+//                    addGroup(group);
+//                    hasGroups = true;
+//                }
+//                // Create single entry handling ungrouped status
+//                mUngrouped = GroupDelta.fromSettings(resolver, accountName, accountType, hasGroups);
+//                addGroup(mUngrouped);
+//            } finally {
+//                iterator.close();
+//            }
+//        }
+//
+//        /**
+//         * Add the given {@link GroupDelta} internally, filing based on its
+//         * {@link GroupDelta#getShouldSync()} status.
+//         */
+//        private void addGroup(GroupDelta group) {
+//            if (group.getShouldSync()) {
+//                mSyncedGroups.add(group);
+//            } else {
+//                mUnsyncedGroups.add(group);
+//            }
+//        }
+//
+//        /**
+//         * Set the {@link GroupDelta#putShouldSync(boolean)} value for all
+//         * children {@link GroupDelta} rows.
+//         */
+//        public void setShouldSync(boolean shouldSync) {
+//            final Iterator<GroupDelta> oppositeChildren = shouldSync ?
+//                    mUnsyncedGroups.iterator() : mSyncedGroups.iterator();
+//            while (oppositeChildren.hasNext()) {
+//                final GroupDelta child = oppositeChildren.next();
+//                setShouldSync(child, shouldSync, false);
+//                oppositeChildren.remove();
+//            }
+//        }
+//
+//        public void setShouldSync(GroupDelta child, boolean shouldSync) {
+//            setShouldSync(child, shouldSync, true);
+//        }
+//
+//        /**
+//         * Set {@link GroupDelta#putShouldSync(boolean)}, and file internally
+//         * based on updated state.
+//         */
+//        public void setShouldSync(GroupDelta child, boolean shouldSync, boolean attemptRemove) {
+//            child.putShouldSync(shouldSync);
+//            if (shouldSync) {
+//                if (attemptRemove) {
+//                    mUnsyncedGroups.remove(child);
+//                }
+//                mSyncedGroups.add(child);
+//                Collections.sort(mSyncedGroups, sIdComparator);
+//            } else {
+//                if (attemptRemove) {
+//                    mSyncedGroups.remove(child);
+//                }
+//                mUnsyncedGroups.add(child);
+//            }
+//        }
+//
+//        /**
+//         * Build set of {@link ContentProviderOperation} to persist any user
+//         * changes to {@link GroupDelta} rows under this {@link Account}.
+//         */
+//        public void buildDiff(ArrayList<ContentProviderOperation> diff) {
+//            for (GroupDelta group : mSyncedGroups) {
+//                final ContentProviderOperation oper = group.buildDiff();
+//                if (oper != null) diff.add(oper);
+//            }
+//            for (GroupDelta group : mUnsyncedGroups) {
+//                final ContentProviderOperation oper = group.buildDiff();
+//                if (oper != null) diff.add(oper);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * {@link ExpandableListAdapter} that shows {@link GroupDelta} settings,
+//     * grouped by {@link Account} source. Shows footer row when any groups are
+//     * unsynced, as determined through {@link AccountDisplay#mUnsyncedGroups}.
+//     */
+//    protected static class DisplayAdapter extends BaseExpandableListAdapter {
+//        private Context mContext;
+//        private LayoutInflater mInflater;
+//        private AccountTypes mSources;
+//        private AccountSet mAccounts;
+//
+//        private boolean mChildWithPhones = false;
+//
+//        public DisplayAdapter(Context context) {
+//            mContext = context;
+//            mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+//            mSources = AccountTypes.getInstance(context);
+//        }
+//
+//        public void setAccounts(AccountSet accounts) {
+//            mAccounts = accounts;
+//            notifyDataSetChanged();
+//        }
+//
+//        /**
+//         * In group descriptions, show the number of contacts with phone
+//         * numbers, in addition to the total contacts.
+//         */
+//        public void setChildDescripWithPhones(boolean withPhones) {
+//            mChildWithPhones = withPhones;
+//        }
+//
+//        /** {@inheritDoc} */
+//        public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
+//                View convertView, ViewGroup parent) {
+//            if (convertView == null) {
+//                convertView = mInflater.inflate(R.layout.display_child, parent, false);
+//            }
+//
+//            final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
+//            final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
+//            final CheckBox checkbox = (CheckBox)convertView.findViewById(android.R.id.checkbox);
+//
+//            final AccountDisplay account = mAccounts.get(groupPosition);
+//            final GroupDelta child = (GroupDelta)this.getChild(groupPosition, childPosition);
+//            if (child != null) {
+//                // Handle normal group, with title and checkbox
+//                final boolean groupVisible = child.getVisible();
+//                checkbox.setVisibility(View.VISIBLE);
+//                checkbox.setChecked(groupVisible);
+//
+//                final CharSequence groupTitle = child.getTitle(mContext);
+//                text1.setText(groupTitle);
+//
+////              final int count = cursor.getInt(GroupsQuery.SUMMARY_COUNT);
+////              final int withPhones = cursor.getInt(GroupsQuery.SUMMARY_WITH_PHONES);
+//
+////              final CharSequence descrip = mContext.getResources().getQuantityString(
+////                      mChildWithPhones ? R.plurals.groupDescripPhones : R.plurals.groupDescrip,
+////                      count, count, withPhones);
+//
+////              text2.setText(descrip);
+//                text2.setVisibility(View.GONE);
+//            } else {
+//                // When unknown child, this is "more" footer view
+//                checkbox.setVisibility(View.GONE);
+//                text1.setText(R.string.display_more_groups);
+//                text2.setVisibility(View.GONE);
+//            }
+//
+//            return convertView;
+//        }
+//
+//        /** {@inheritDoc} */
+//        public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
+//                ViewGroup parent) {
+//            if (convertView == null) {
+//                convertView = mInflater.inflate(R.layout.display_group, parent, false);
+//            }
+//
+//            final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
+//            final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
+//
+//            final AccountDisplay account = (AccountDisplay)this.getGroup(groupPosition);
+//
+//            final BaseAccountType source = mSources.getInflatedSource(account.mType,
+//                    BaseAccountType.LEVEL_SUMMARY);
+//
+//            text1.setText(account.mName);
+//            text2.setText(source.getDisplayLabel(mContext));
+//            text2.setVisibility(account.mName == null ? View.GONE : View.VISIBLE);
+//
+//            return convertView;
+//        }
+//
+//        /** {@inheritDoc} */
+//        public Object getChild(int groupPosition, int childPosition) {
+//            final AccountDisplay account = mAccounts.get(groupPosition);
+//            final boolean validChild = childPosition >= 0
+//                    && childPosition < account.mSyncedGroups.size();
+//            if (validChild) {
+//                return account.mSyncedGroups.get(childPosition);
+//            } else {
+//                return null;
+//            }
+//        }
+//
+//        /** {@inheritDoc} */
+//        public long getChildId(int groupPosition, int childPosition) {
+//            final GroupDelta child = (GroupDelta)getChild(groupPosition, childPosition);
+//            if (child != null) {
+//                final Long childId = child.getId();
+//                return childId != null ? childId : Long.MIN_VALUE;
+//            } else {
+//                return Long.MIN_VALUE;
+//            }
+//        }
+//
+//        /** {@inheritDoc} */
+//        public int getChildrenCount(int groupPosition) {
+//            // Count is any synced groups, plus possible footer
+//            final AccountDisplay account = mAccounts.get(groupPosition);
+//            final boolean anyHidden = account.mUnsyncedGroups.size() > 0;
+//            return account.mSyncedGroups.size() + (anyHidden ? 1 : 0);
+//        }
+//
+//        /** {@inheritDoc} */
+//        public Object getGroup(int groupPosition) {
+//            return mAccounts.get(groupPosition);
+//        }
+//
+//        /** {@inheritDoc} */
+//        public int getGroupCount() {
+//            if (mAccounts == null) {
+//                return 0;
+//            }
+//            return mAccounts.size();
+//        }
+//
+//        /** {@inheritDoc} */
+//        public long getGroupId(int groupPosition) {
+//            return groupPosition;
+//        }
+//
+//        /** {@inheritDoc} */
+//        public boolean hasStableIds() {
+//            return true;
+//        }
+//
+//        /** {@inheritDoc} */
+//        public boolean isChildSelectable(int groupPosition, int childPosition) {
+//            return true;
+//        }
+//    }
+//
+//    /**
+//     * Handle any clicks on header views added to our {@link #mAdapter}, which
+//     * are usually the global modifier checkboxes.
+//     */
+//    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+//        Log.d(TAG, "OnItemClick, position=" + position + ", id=" + id);
+//        if (view == mHeaderPhones) {
+//            mDisplayPhones.toggle();
+//            return;
+//        }
+//        if (view == mDisplayOrderView) {
+//            Log.d(TAG, "Showing Display Order dialog");
+//            showDialog(DIALOG_DISPLAY_ORDER);
+//            return;
+//        }
+//        if (view == mSortOrderView) {
+//            Log.d(TAG, "Showing Sort Order dialog");
+//            showDialog(DIALOG_SORT_ORDER);
+//            return;
+//        }
+//    }
+//
+//    /** {@inheritDoc} */
+//    public void onClick(View view) {
+//        switch (view.getId()) {
+//            case R.id.btn_done: {
+//                this.doSaveAction();
+//                break;
+//            }
+//            case R.id.btn_discard: {
+//                this.finish();
+//                break;
+//            }
+//        }
+//    }
+//
+//    /**
+//     * Assign a specific value to {@link Prefs#DISPLAY_ONLY_PHONES}, refreshing
+//     * the visible list as needed.
+//     */
+//    protected void setDisplayOnlyPhones(boolean displayOnlyPhones) {
+//        mDisplayPhones.setChecked(displayOnlyPhones);
+//
+//        Editor editor = mPrefs.edit();
+//        editor.putBoolean(Prefs.DISPLAY_ONLY_PHONES, displayOnlyPhones);
+//        editor.apply();
+//
+//        mAdapter.setChildDescripWithPhones(displayOnlyPhones);
+//        mAdapter.notifyDataSetChanged();
+//    }
+//
+//    /**
+//     * Handle any clicks on {@link ExpandableListAdapter} children, which
+//     * usually mean toggling its visible state.
+//     */
+//    @Override
+//    public boolean onChildClick(ExpandableListView parent, View view, int groupPosition,
+//            int childPosition, long id) {
+//        final CheckBox checkbox = (CheckBox)view.findViewById(android.R.id.checkbox);
+//
+//        final AccountDisplay account = (AccountDisplay)mAdapter.getGroup(groupPosition);
+//        final GroupDelta child = (GroupDelta)mAdapter.getChild(groupPosition, childPosition);
+//        if (child != null) {
+//            checkbox.toggle();
+//            child.putVisible(checkbox.isChecked());
+//        } else {
+//            // Open context menu for bringing back unsynced
+//            this.openContextMenu(view);
+//        }
+//        return true;
+//    }
+//
+//    // TODO: move these definitions to framework constants when we begin
+//    // defining this mode through <sync-adapter> tags
+//    private static final int SYNC_MODE_UNSUPPORTED = 0;
+//    private static final int SYNC_MODE_UNGROUPED = 1;
+//    private static final int SYNC_MODE_EVERYTHING = 2;
+//
+//    protected int getSyncMode(AccountDisplay account) {
+//        // TODO: read sync mode through <sync-adapter> definition
+//        if (GoogleAccountType.ACCOUNT_TYPE.equals(account.mType)) {
+//            return SYNC_MODE_EVERYTHING;
+//        } else {
+//            return SYNC_MODE_UNSUPPORTED;
+//        }
+//    }
+//
+//    @Override
+//    public void onCreateContextMenu(ContextMenu menu, View view,
+//            ContextMenu.ContextMenuInfo menuInfo) {
+//        super.onCreateContextMenu(menu, view, menuInfo);
+//
+//        // Bail if not working with expandable long-press, or if not child
+//        if (!(menuInfo instanceof ExpandableListContextMenuInfo)) return;
+//
+//        final ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
+//        final int groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
+//        final int childPosition = ExpandableListView.getPackedPositionChild(info.packedPosition);
+//
+//        // Skip long-press on expandable parents
+//        if (childPosition == -1) return;
+//
+//        final AccountDisplay account = (AccountDisplay)mAdapter.getGroup(groupPosition);
+//        final GroupDelta child = (GroupDelta)mAdapter.getChild(groupPosition, childPosition);
+//
+//        // Ignore when selective syncing unsupported
+//        final int syncMode = getSyncMode(account);
+//        if (syncMode == SYNC_MODE_UNSUPPORTED) return;
+//
+//        if (child != null) {
+//            showRemoveSync(menu, account, child, syncMode);
+//        } else {
+//            showAddSync(menu, account, syncMode);
+//        }
+//    }
+//
+//    protected void showRemoveSync(ContextMenu menu, final AccountDisplay account,
+//            final GroupDelta child, final int syncMode) {
+//        final CharSequence title = child.getTitle(this);
+//
+//        menu.setHeaderTitle(title);
+//        menu.add(R.string.menu_sync_remove).setOnMenuItemClickListener(
+//                new OnMenuItemClickListener() {
+//                    public boolean onMenuItemClick(MenuItem item) {
+//                        handleRemoveSync(account, child, syncMode, title);
+//                        return true;
+//                    }
+//                });
+//    }
+//
+//    protected void handleRemoveSync(final AccountDisplay account, final GroupDelta child,
+//            final int syncMode, CharSequence title) {
+//        final boolean shouldSyncUngrouped = account.mUngrouped.getShouldSync();
+//        if (syncMode == SYNC_MODE_EVERYTHING && shouldSyncUngrouped
+//                && !child.equals(account.mUngrouped)) {
+//            // Warn before removing this group when it would cause ungrouped to stop syncing
+//            final AlertDialog.Builder builder = new AlertDialog.Builder(this);
+//            final CharSequence removeMessage = this.getString(
+//                    R.string.display_warn_remove_ungrouped, title);
+//            builder.setTitle(R.string.menu_sync_remove);
+//            builder.setMessage(removeMessage);
+//            builder.setNegativeButton(android.R.string.cancel, null);
+//            builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+//                public void onClick(DialogInterface dialog, int which) {
+//                    // Mark both this group and ungrouped to stop syncing
+//                    account.setShouldSync(account.mUngrouped, false);
+//                    account.setShouldSync(child, false);
+//                    mAdapter.notifyDataSetChanged();
+//                }
+//            });
+//            builder.show();
+//        } else {
+//            // Mark this group to not sync
+//            account.setShouldSync(child, false);
+//            mAdapter.notifyDataSetChanged();
+//        }
+//    }
+//
+//    protected void showAddSync(ContextMenu menu, final AccountDisplay account, final int syncMode) {
+//        menu.setHeaderTitle(R.string.dialog_sync_add);
+//
+//        // Create item for each available, unsynced group
+//        for (final GroupDelta child : account.mUnsyncedGroups) {
+//            if (!child.getShouldSync()) {
+//                final CharSequence title = child.getTitle(this);
+//                menu.add(title).setOnMenuItemClickListener(new OnMenuItemClickListener() {
+//                    public boolean onMenuItemClick(MenuItem item) {
+//                        // Adding specific group for syncing
+//                        if (child.mUngrouped && syncMode == SYNC_MODE_EVERYTHING) {
+//                            account.setShouldSync(true);
+//                        } else {
+//                            account.setShouldSync(child, true);
+//                        }
+//                        mAdapter.notifyDataSetChanged();
+//                        return true;
+//                    }
+//                });
+//            }
+//        }
+//    }
+//
+//    /** {@inheritDoc} */
+//    @Override
+//    public void onBackPressed() {
+//        doSaveAction();
+//    }
+//
+//    private void doSaveAction() {
+//        mContactsPrefs.setSortOrder(mSortOrder);
+//        mContactsPrefs.setDisplayOrder(mDisplayOrder);
+//
+//        if (mAdapter == null || mAdapter.mAccounts == null) {
+//            return;
+//        }
+//        setDisplayOnlyPhones(mDisplayPhones.isChecked());
+//        new UpdateTask(this).execute(mAdapter.mAccounts);
+//    }
+//
+//    /**
+//     * Background task that persists changes to {@link Groups#GROUP_VISIBLE},
+//     * showing spinner dialog to user while updating.
+//     */
+//    public static class UpdateTask extends
+//            WeakAsyncTask<AccountSet, Void, Void, Activity> {
+//        private WeakReference<ProgressDialog> mProgress;
+//
+//        public UpdateTask(Activity target) {
+//            super(target);
+//        }
+//
+//        /** {@inheritDoc} */
+//        @Override
+//        protected void onPreExecute(Activity target) {
+//            final Context context = target;
+//
+//            mProgress = new WeakReference<ProgressDialog>(ProgressDialog.show(context, null,
+//                    context.getText(R.string.savingDisplayGroups)));
+//
+//            // Before starting this task, start an empty service to protect our
+//            // process from being reclaimed by the system.
+//            context.startService(new Intent(context, EmptyService.class));
+//        }
+//
+//        /** {@inheritDoc} */
+//        @Override
+//        protected Void doInBackground(Activity target, AccountSet... params) {
+//            final Context context = target;
+//            final ContentValues values = new ContentValues();
+//            final ContentResolver resolver = context.getContentResolver();
+//
+//            try {
+//                // Build changes and persist in transaction
+//                final AccountSet set = params[0];
+//                final ArrayList<ContentProviderOperation> diff = set.buildDiff();
+//                resolver.applyBatch(ContactsContract.AUTHORITY, diff);
+//            } catch (RemoteException e) {
+//                Log.e(TAG, "Problem saving display groups", e);
+//            } catch (OperationApplicationException e) {
+//                Log.e(TAG, "Problem saving display groups", e);
+//            }
+//
+//            return null;
+//        }
+//
+//        /** {@inheritDoc} */
+//        @Override
+//        protected void onPostExecute(Activity target, Void result) {
+//            final Context context = target;
+//
+//            final ProgressDialog dialog = mProgress.get();
+//            if (dialog != null) {
+//                try {
+//                    dialog.dismiss();
+//                } catch (Exception e) {
+//                    Log.e(TAG, "Error dismissing progress dialog", e);
+//                }
+//            }
+//
+//            target.finish();
+//
+//            // Stop the service that was protecting us
+//            context.stopService(new Intent(context, EmptyService.class));
+//        }
+//    }
+//
+//    @Override
+//    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
+//            boolean globalSearch) {
+//        if (globalSearch) {
+//            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
+//        } else {
+//            ContactsSearchManager.startSearch(this, initialQuery);
+//        }
+//    }
+}
diff --git a/src/com/android/contacts/preference/ContactsPreferences.java b/src/com/android/contacts/preference/ContactsPreferences.java
new file mode 100644
index 0000000..540158d
--- /dev/null
+++ b/src/com/android/contacts/preference/ContactsPreferences.java
@@ -0,0 +1,160 @@
+/*
+ * 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.preference;
+
+import com.android.contacts.R;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.os.Handler;
+import android.provider.ContactsContract;
+import android.provider.Settings;
+import android.provider.Settings.SettingNotFoundException;
+
+/**
+ * Manages user preferences for contacts.
+ */
+public final class ContactsPreferences extends ContentObserver {
+
+    public static final String PREF_DISPLAY_ONLY_PHONES = "only_phones";
+    public static final boolean PREF_DISPLAY_ONLY_PHONES_DEFAULT = false;
+
+    private Context mContext;
+    private int mSortOrder = -1;
+    private int mDisplayOrder = -1;
+    private ChangeListener mListener = null;
+    private Handler mHandler;
+
+    public ContactsPreferences(Context context) {
+        super(null);
+        mContext = context;
+        mHandler = new Handler();
+    }
+
+    public boolean isSortOrderUserChangeable() {
+        return mContext.getResources().getBoolean(R.bool.config_sort_order_user_changeable);
+    }
+
+    public int getDefaultSortOrder() {
+        if (mContext.getResources().getBoolean(R.bool.config_default_sort_order_primary)) {
+            return ContactsContract.Preferences.SORT_ORDER_PRIMARY;
+        } else {
+            return ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE;
+        }
+    }
+
+    public int getSortOrder() {
+        if (!isSortOrderUserChangeable()) {
+            return getDefaultSortOrder();
+        }
+
+        if (mSortOrder == -1) {
+            try {
+                mSortOrder = Settings.System.getInt(mContext.getContentResolver(),
+                        ContactsContract.Preferences.SORT_ORDER);
+            } catch (SettingNotFoundException e) {
+                mSortOrder = getDefaultSortOrder();
+            }
+        }
+        return mSortOrder;
+    }
+
+    public void setSortOrder(int sortOrder) {
+        mSortOrder = sortOrder;
+        Settings.System.putInt(mContext.getContentResolver(),
+                ContactsContract.Preferences.SORT_ORDER, sortOrder);
+    }
+
+    public boolean isDisplayOrderUserChangeable() {
+        return mContext.getResources().getBoolean(R.bool.config_display_order_user_changeable);
+    }
+
+    public int getDefaultDisplayOrder() {
+        if (mContext.getResources().getBoolean(R.bool.config_default_display_order_primary)) {
+            return ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY;
+        } else {
+            return ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE;
+        }
+    }
+
+    public int getDisplayOrder() {
+        if (!isDisplayOrderUserChangeable()) {
+            return getDefaultDisplayOrder();
+        }
+
+        if (mDisplayOrder == -1) {
+            try {
+                mDisplayOrder = Settings.System.getInt(mContext.getContentResolver(),
+                        ContactsContract.Preferences.DISPLAY_ORDER);
+            } catch (SettingNotFoundException e) {
+                mDisplayOrder = getDefaultDisplayOrder();
+            }
+        }
+        return mDisplayOrder;
+    }
+
+    public void setDisplayOrder(int displayOrder) {
+        mDisplayOrder = displayOrder;
+        Settings.System.putInt(mContext.getContentResolver(),
+                ContactsContract.Preferences.DISPLAY_ORDER, displayOrder);
+    }
+
+    public void registerChangeListener(ChangeListener listener) {
+        if (mListener != null) unregisterChangeListener();
+
+        mListener = listener;
+
+        // Reset preferences to "unknown" because they may have changed while the
+        // observer was unregistered.
+        mDisplayOrder = -1;
+        mSortOrder = -1;
+
+        final ContentResolver contentResolver = mContext.getContentResolver();
+        contentResolver.registerContentObserver(
+                Settings.System.getUriFor(
+                        ContactsContract.Preferences.SORT_ORDER), false, this);
+        contentResolver.registerContentObserver(
+                Settings.System.getUriFor(
+                        ContactsContract.Preferences.DISPLAY_ORDER), false, this);
+    }
+
+    public void unregisterChangeListener() {
+        if (mListener != null) {
+            mContext.getContentResolver().unregisterContentObserver(this);
+            mListener = null;
+        }
+    }
+
+    @Override
+    public void onChange(boolean selfChange) {
+        // This notification is not sent on the Ui thread. Use the previously created Handler
+        // to switch to the Ui thread
+        mHandler.post(new Runnable() {
+            @Override
+            public void run() {
+                mSortOrder = -1;
+                mDisplayOrder = -1;
+                if (mListener != null) mListener.onChange();
+            }
+        });
+    }
+
+    public interface ChangeListener {
+        void onChange();
+    }
+}
diff --git a/src/com/android/contacts/preference/DisplayOptionsPreferenceFragment.java b/src/com/android/contacts/preference/DisplayOptionsPreferenceFragment.java
new file mode 100644
index 0000000..db4a94e
--- /dev/null
+++ b/src/com/android/contacts/preference/DisplayOptionsPreferenceFragment.java
@@ -0,0 +1,37 @@
+/*
+ * 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.preference;
+
+import com.android.contacts.R;
+
+import android.os.Bundle;
+import android.preference.PreferenceFragment;
+
+/**
+ * This fragment shows the preferences for the first header.
+ */
+public class DisplayOptionsPreferenceFragment extends PreferenceFragment {
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Load the preferences from an XML resource
+        addPreferencesFromResource(R.xml.preference_display_options);
+    }
+}
+
diff --git a/src/com/android/contacts/preference/DisplayOrderPreference.java b/src/com/android/contacts/preference/DisplayOrderPreference.java
new file mode 100644
index 0000000..fea01c8
--- /dev/null
+++ b/src/com/android/contacts/preference/DisplayOrderPreference.java
@@ -0,0 +1,83 @@
+/*
+ * 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.preference;
+
+import com.android.contacts.R;
+
+import android.content.Context;
+import android.preference.ListPreference;
+import android.provider.ContactsContract;
+import android.util.AttributeSet;
+
+/**
+ * Custom preference: view-name-as (first name first or last name first).
+ */
+public final class DisplayOrderPreference extends ListPreference {
+
+    private ContactsPreferences mPreferences;
+    private Context mContext;
+
+    public DisplayOrderPreference(Context context) {
+        super(context);
+        prepare();
+    }
+
+    public DisplayOrderPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        prepare();
+    }
+
+    private void prepare() {
+        mContext = getContext();
+        mPreferences = new ContactsPreferences(mContext);
+        setEntries(new String[]{
+                mContext.getString(R.string.display_options_view_given_name_first),
+                mContext.getString(R.string.display_options_view_family_name_first),
+        });
+        setEntryValues(new String[]{
+                String.valueOf(ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY),
+                String.valueOf(ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE),
+        });
+        setValue(String.valueOf(mPreferences.getDisplayOrder()));
+    }
+
+    @Override
+    protected boolean shouldPersist() {
+        return false;   // This preference takes care of its own storage
+    }
+
+    @Override
+    public CharSequence getSummary() {
+        switch (mPreferences.getDisplayOrder()) {
+            case ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY:
+                return mContext.getString(R.string.display_options_view_given_name_first);
+            case ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE:
+                return mContext.getString(R.string.display_options_view_family_name_first);
+        }
+        return null;
+    }
+
+    @Override
+    protected boolean persistString(String value) {
+        int newValue = Integer.parseInt(value);
+        if (newValue != mPreferences.getDisplayOrder()) {
+            mPreferences.setDisplayOrder(newValue);
+            notifyChanged();
+        }
+        return true;
+    }
+}
diff --git a/src/com/android/contacts/preference/SortOrderPreference.java b/src/com/android/contacts/preference/SortOrderPreference.java
new file mode 100644
index 0000000..81b034c
--- /dev/null
+++ b/src/com/android/contacts/preference/SortOrderPreference.java
@@ -0,0 +1,83 @@
+/*
+ * 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.preference;
+
+import com.android.contacts.R;
+
+import android.content.Context;
+import android.preference.ListPreference;
+import android.provider.ContactsContract;
+import android.util.AttributeSet;
+
+/**
+ * Custom preference: sort-by.
+ */
+public final class SortOrderPreference extends ListPreference {
+
+    private ContactsPreferences mPreferences;
+    private Context mContext;
+
+    public SortOrderPreference(Context context) {
+        super(context);
+        prepare();
+    }
+
+    public SortOrderPreference(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        prepare();
+    }
+
+    private void prepare() {
+        mContext = getContext();
+        mPreferences = new ContactsPreferences(mContext);
+        setEntries(new String[]{
+                mContext.getString(R.string.display_options_sort_by_given_name),
+                mContext.getString(R.string.display_options_sort_by_family_name),
+        });
+        setEntryValues(new String[]{
+                String.valueOf(ContactsContract.Preferences.SORT_ORDER_PRIMARY),
+                String.valueOf(ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE),
+        });
+        setValue(String.valueOf(mPreferences.getSortOrder()));
+    }
+
+    @Override
+    protected boolean shouldPersist() {
+        return false;   // This preference takes care of its own storage
+    }
+
+    @Override
+    public CharSequence getSummary() {
+        switch (mPreferences.getSortOrder()) {
+            case ContactsContract.Preferences.SORT_ORDER_PRIMARY:
+                return mContext.getString(R.string.display_options_sort_by_given_name);
+            case ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE:
+                return mContext.getString(R.string.display_options_sort_by_family_name);
+        }
+        return null;
+    }
+
+    @Override
+    protected boolean persistString(String value) {
+        int newValue = Integer.parseInt(value);
+        if (newValue != mPreferences.getSortOrder()) {
+            mPreferences.setSortOrder(newValue);
+            notifyChanged();
+        }
+        return true;
+    }
+}
diff --git a/src/com/android/contacts/quickcontact/CheckableImageView.java b/src/com/android/contacts/quickcontact/CheckableImageView.java
new file mode 100644
index 0000000..d1b75cb
--- /dev/null
+++ b/src/com/android/contacts/quickcontact/CheckableImageView.java
@@ -0,0 +1,63 @@
+/*
+ * 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.quickcontact;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.Checkable;
+import android.widget.ImageView;
+
+/**
+ * A special variation of ImageView that can be used as a checkable object.
+ * This is used as the background view of quickcontact chiclet, which is in checked state
+ * when disambig list is shown. Otherwise, it works identically to a ImageView.
+ */
+public class CheckableImageView extends ImageView implements Checkable {
+    private boolean mChecked;
+
+    private static final int[] CHECKED_STATE_SET = {
+        android.R.attr.state_checked
+    };
+
+    public CheckableImageView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    @Override
+    public int[] onCreateDrawableState(int extraSpace) {
+        final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
+        if (isChecked()) {
+            mergeDrawableStates(drawableState, CHECKED_STATE_SET);
+        }
+        return drawableState;
+    }
+
+    public void toggle() {
+        setChecked(!mChecked);
+    }
+
+    public boolean isChecked() {
+        return mChecked;
+    }
+
+    public void setChecked(boolean checked) {
+        if (mChecked != checked) {
+            mChecked = checked;
+            refreshDrawableState();
+        }
+    }
+}
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java
new file mode 100644
index 0000000..97df680
--- /dev/null
+++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2009 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.quickcontact;
+
+import android.app.Activity;
+import android.content.ContentUris;
+import android.content.Intent;
+import android.graphics.Rect;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.QuickContact;
+import android.provider.ContactsContract.RawContacts;
+import android.util.Log;
+
+/**
+ * Stub translucent activity that just shows {@link QuickContactWindow} floating
+ * above the caller. This temporary hack should eventually be replaced with
+ * direct framework support.
+ */
+public final class QuickContactActivity extends Activity implements
+        QuickContactWindow.OnDismissListener {
+    private static final String TAG = "QuickContactActivity";
+
+    static final boolean LOGV = false;
+    static final boolean FORCE_CREATE = false;
+
+    private QuickContactWindow mQuickContact;
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        if (LOGV) Log.d(TAG, "onCreate");
+
+        this.onNewIntent(getIntent());
+    }
+
+    @Override
+    public void onNewIntent(Intent intent) {
+        super.onNewIntent(intent);
+        if (LOGV) Log.d(TAG, "onNewIntent");
+
+        if (QuickContactWindow.TRACE_LAUNCH) {
+            android.os.Debug.startMethodTracing(QuickContactWindow.TRACE_TAG);
+        }
+
+        if (mQuickContact == null || FORCE_CREATE) {
+            if (LOGV) Log.d(TAG, "Preparing window");
+            mQuickContact = new QuickContactWindow(this, this);
+        }
+
+        // Use our local window token for now
+        Uri lookupUri = intent.getData();
+        // Check to see whether it comes from the old version.
+        if (android.provider.Contacts.AUTHORITY.equals(lookupUri.getAuthority())) {
+            final long rawContactId = ContentUris.parseId(lookupUri);
+            lookupUri = RawContacts.getContactLookupUri(getContentResolver(),
+                    ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
+        }
+        final Bundle extras = intent.getExtras();
+
+        // Read requested parameters for displaying
+        final Rect target = intent.getSourceBounds();
+        final int mode = extras.getInt(QuickContact.EXTRA_MODE, QuickContact.MODE_MEDIUM);
+        final String[] excludeMimes = extras.getStringArray(QuickContact.EXTRA_EXCLUDE_MIMES);
+
+        mQuickContact.show(lookupUri, target, mode, excludeMimes);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void onBackPressed() {
+        if (LOGV) Log.w(TAG, "Unexpected back captured by stub activity");
+        finish();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        if (LOGV) Log.d(TAG, "onPause");
+
+        // Dismiss any dialog when pausing
+        mQuickContact.dismiss();
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        if (LOGV) Log.d(TAG, "onDestroy");
+    }
+
+    /** {@inheritDoc} */
+    public void onDismiss(QuickContactWindow dialog) {
+        if (LOGV) Log.d(TAG, "onDismiss");
+
+        if (isTaskRoot() && !FORCE_CREATE) {
+            // Instead of stopping, simply push this to the back of the stack.
+            // This is only done when running at the top of the stack;
+            // otherwise, we have been launched by someone else so need to
+            // allow the user to go back to the caller.
+            moveTaskToBack(false);
+        } else {
+            finish();
+        }
+    }
+}
diff --git a/src/com/android/contacts/quickcontact/QuickContactWindow.java b/src/com/android/contacts/quickcontact/QuickContactWindow.java
new file mode 100644
index 0000000..4923f45
--- /dev/null
+++ b/src/com/android/contacts/quickcontact/QuickContactWindow.java
@@ -0,0 +1,1716 @@
+/*
+ * Copyright (C) 2009 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.quickcontact;
+
+import com.android.contacts.Collapser;
+import com.android.contacts.ContactPresenceIconUtil;
+import com.android.contacts.ContactsUtils;
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.util.Constants;
+import com.android.contacts.util.DataStatus;
+import com.android.contacts.util.NotifyingAsyncQueryHandler;
+import com.android.contacts.util.PhoneCapabilityTester;
+import com.android.internal.policy.PolicyManager;
+import com.google.android.collect.Sets;
+
+import android.content.ActivityNotFoundException;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Im;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.CommonDataKinds.SipAddress;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.CommonDataKinds.Website;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.QuickContact;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.ContactsContract.StatusUpdates;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.ActionMode;
+import android.view.ContextThemeWrapper;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewStub;
+import android.view.ViewTreeObserver.OnGlobalLayoutListener;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.accessibility.AccessibilityEvent;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.view.animation.Interpolator;
+import android.widget.AbsListView;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.HorizontalScrollView;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Window that shows QuickContact dialog for a specific {@link Contacts#_ID}.
+ */
+public class QuickContactWindow implements Window.Callback,
+        NotifyingAsyncQueryHandler.AsyncQueryListener, View.OnClickListener,
+        AbsListView.OnItemClickListener, CompoundButton.OnCheckedChangeListener, KeyEvent.Callback,
+        OnGlobalLayoutListener {
+    private static final String TAG = "QuickContactWindow";
+
+    /**
+     * Interface used to allow the person showing a {@link QuickContactWindow} to
+     * know when the window has been dismissed.
+     */
+    public interface OnDismissListener {
+        public void onDismiss(QuickContactWindow dialog);
+    }
+
+    /**
+     * Custom layout the sole purpose of which is to intercept the BACK key and
+     * close QC even when the soft keyboard is open.
+     */
+    public static class RootLayout extends RelativeLayout {
+
+        QuickContactWindow mQuickContactWindow;
+
+        public RootLayout(Context context, AttributeSet attrs) {
+            super(context, attrs);
+        }
+
+        /**
+         * Intercepts the BACK key event and dismisses QuickContact window.
+         */
+        @Override
+        public boolean dispatchKeyEventPreIme(KeyEvent event) {
+            if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+                mQuickContactWindow.onBackPressed();
+                return true;
+            } else {
+                return super.dispatchKeyEventPreIme(event);
+            }
+        }
+    }
+
+    private final Context mContext;
+    private final LayoutInflater mInflater;
+    private final WindowManager mWindowManager;
+    private Window mWindow;
+    private View mDecor;
+    private final Rect mRect = new Rect();
+
+    private boolean mDismissed = false;
+    private boolean mQuerying = false;
+    private boolean mShowing = false;
+
+    private NotifyingAsyncQueryHandler mHandler;
+    private OnDismissListener mDismissListener;
+    private ResolveCache mResolveCache;
+
+    private Uri mLookupUri;
+    private Rect mAnchor;
+
+    private int mShadowHoriz;
+    private int mShadowVert;
+    private int mShadowTouch;
+
+    private int mScreenWidth;
+    private int mScreenHeight;
+    private int mRequestedY;
+
+    private boolean mHasValidSocial = false;
+    private boolean mMakePrimary = false;
+
+    private ImageView mArrowUp;
+    private ImageView mArrowDown;
+
+    private int mMode;
+    private RootLayout mRootView;
+    private View mHeader;
+    private HorizontalScrollView mTrackScroll;
+    private ViewGroup mTrack;
+    private Animation mTrackAnim;
+
+    private View mFooter;
+    private View mFooterDisambig;
+    private ListView mResolveList;
+    private CheckableImageView mLastAction;
+    private CheckBox mSetPrimaryCheckBox;
+
+    private int mWindowRecycled = 0;
+    private int mActionRecycled = 0;
+
+    /**
+     * Set of {@link Action} that are associated with the aggregate currently
+     * displayed by this dialog, represented as a map from {@link String}
+     * MIME-type to {@link ActionList}.
+     */
+    private ActionMap mActions = new ActionMap();
+
+    /**
+     * Pool of unused {@link CheckableImageView} that have previously been
+     * inflated, and are ready to be recycled through {@link #obtainView()}.
+     */
+    private LinkedList<View> mActionPool = new LinkedList<View>();
+
+    private String[] mExcludeMimes;
+
+    /**
+     * {@link #PRECEDING_MIMETYPES} and {@link #FOLLOWING_MIMETYPES} are used to sort MIME-types.
+     *
+     * <p>The MIME-types in {@link #PRECEDING_MIMETYPES} appear in the front of the dialog,
+     * in the order in the array.
+     *
+     * <p>The ones in {@link #FOLLOWING_MIMETYPES} appear in the end of the dialog, in alphabetical
+     * order.
+     *
+     * <p>The rest go between them, in the order in the array.
+     */
+    private static final String[] PRECEDING_MIMETYPES = new String[] {
+            Phone.CONTENT_ITEM_TYPE,
+            SipAddress.CONTENT_ITEM_TYPE,
+            Contacts.CONTENT_ITEM_TYPE,
+            Constants.MIME_SMS_ADDRESS,
+            Email.CONTENT_ITEM_TYPE,
+    };
+
+    /**
+     * See {@link #PRECEDING_MIMETYPES}.
+     */
+    private static final String[] FOLLOWING_MIMETYPES = new String[] {
+            StructuredPostal.CONTENT_ITEM_TYPE,
+            Website.CONTENT_ITEM_TYPE,
+    };
+
+    /**
+     * Specific list {@link ApplicationInfo#packageName} of apps that are
+     * prefered <strong>only</strong> for the purposes of default icons when
+     * multiple {@link ResolveInfo} are found to match. This only happens when
+     * the user has not selected a default app yet, and they will still be
+     * presented with the system disambiguation dialog.
+     */
+    private static final HashSet<String> sPreferResolve = Sets.newHashSet(
+            "com.android.email",
+            "com.android.calendar",
+            "com.android.contacts",
+            "com.android.mms",
+            "com.android.phone",
+            "com.android.browser");
+
+    private static final int TOKEN_DATA = 1;
+
+    static final boolean LOGD = false;
+
+    static final boolean TRACE_LAUNCH = false;
+    static final String TRACE_TAG = "quickcontact";
+
+    /**
+     * Prepare a dialog to show in the given {@link Context}.
+     */
+    public QuickContactWindow(Context context) {
+        mContext = new ContextThemeWrapper(context, R.style.QuickContact);
+        mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
+
+        mWindow = PolicyManager.makeNewWindow(mContext);
+        mWindow.setCallback(this);
+        mWindow.setWindowManager(mWindowManager, null, null);
+        mWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED);
+
+        mWindow.setContentView(R.layout.quickcontact);
+
+        mRootView = (RootLayout)mWindow.findViewById(R.id.root);
+        mRootView.mQuickContactWindow = this;
+        mRootView.setFocusable(true);
+        mRootView.setFocusableInTouchMode(true);
+        mRootView.setDescendantFocusability(RootLayout.FOCUS_AFTER_DESCENDANTS);
+
+        mArrowUp = (ImageView)mWindow.findViewById(R.id.arrow_up);
+        mArrowDown = (ImageView)mWindow.findViewById(R.id.arrow_down);
+
+        mResolveCache = new ResolveCache(mContext);
+
+        final Resources res = mContext.getResources();
+        mShadowHoriz = res.getDimensionPixelSize(R.dimen.quickcontact_shadow_horiz);
+        mShadowVert = res.getDimensionPixelSize(R.dimen.quickcontact_shadow_vert);
+        mShadowTouch = res.getDimensionPixelSize(R.dimen.quickcontact_shadow_touch);
+
+        mScreenWidth = mWindowManager.getDefaultDisplay().getWidth();
+        mScreenHeight = mWindowManager.getDefaultDisplay().getHeight();
+
+        mTrack = (ViewGroup)mWindow.findViewById(R.id.quickcontact);
+        mTrackScroll = (HorizontalScrollView)mWindow.findViewById(R.id.scroll);
+
+        mFooter = mWindow.findViewById(R.id.footer);
+        mFooterDisambig = mWindow.findViewById(R.id.footer_disambig);
+        mResolveList = (ListView)mWindow.findViewById(android.R.id.list);
+        mSetPrimaryCheckBox = (CheckBox)mWindow.findViewById(android.R.id.checkbox);
+
+        mSetPrimaryCheckBox.setOnCheckedChangeListener(this);
+
+        // Prepare track entrance animation
+        mTrackAnim = AnimationUtils.loadAnimation(mContext, R.anim.quickcontact);
+        mTrackAnim.setInterpolator(new Interpolator() {
+            public float getInterpolation(float t) {
+                // Pushes past the target area, then snaps back into place.
+                // Equation for graphing: 1.2-((x*1.6)-1.1)^2
+                final float inner = (t * 1.55f) - 1.1f;
+                return 1.2f - inner * inner;
+            }
+        });
+
+        mHandler = new NotifyingAsyncQueryHandler(mContext, this);
+    }
+
+    /**
+     * Prepare a dialog to show in the given {@link Context}, and notify the
+     * given {@link OnDismissListener} each time this dialog is dismissed.
+     */
+    public QuickContactWindow(Context context, OnDismissListener dismissListener) {
+        this(context);
+        mDismissListener = dismissListener;
+    }
+
+    private View getHeaderView(int mode) {
+        View header = null;
+        switch (mode) {
+            case QuickContact.MODE_SMALL:
+                header = mWindow.findViewById(R.id.header_small);
+                break;
+            case QuickContact.MODE_MEDIUM:
+                header = mWindow.findViewById(R.id.header_medium);
+                break;
+            case QuickContact.MODE_LARGE:
+                header = mWindow.findViewById(R.id.header_large);
+                break;
+        }
+
+        if (header instanceof ViewStub) {
+            // Inflate actual header if we picked a stub
+            final ViewStub stub = (ViewStub)header;
+            header = stub.inflate();
+        } else if (header != null) {
+            header.setVisibility(View.VISIBLE);
+        }
+
+        return header;
+    }
+
+    /**
+     * Start showing a dialog for the given {@link Contacts#_ID} pointing
+     * towards the given location.
+     */
+    public synchronized void show(Uri lookupUri, Rect anchor, int mode, String[] excludeMimes) {
+        if (mQuerying || mShowing) {
+            Log.w(TAG, "dismissing before showing");
+            dismissInternal();
+        }
+
+        if (TRACE_LAUNCH && !android.os.Debug.isMethodTracingActive()) {
+            android.os.Debug.startMethodTracing(TRACE_TAG);
+        }
+
+        // Validate incoming parameters
+        final boolean validMode = (mode == QuickContact.MODE_SMALL
+                || mode == QuickContact.MODE_MEDIUM || mode == QuickContact.MODE_LARGE);
+        if (!validMode) {
+            throw new IllegalArgumentException("Invalid mode, expecting MODE_LARGE, "
+                    + "MODE_MEDIUM, or MODE_SMALL");
+        }
+
+        if (anchor == null) {
+            throw new IllegalArgumentException("Missing anchor rectangle");
+        }
+
+        // Prepare header view for requested mode
+        mLookupUri = lookupUri;
+        mAnchor = new Rect(anchor);
+        mMode = mode;
+        mExcludeMimes = excludeMimes;
+
+        mHeader = getHeaderView(mode);
+
+        setHeaderText(R.id.name, R.string.quickcontact_missing_name);
+
+        setHeaderText(R.id.status, null);
+        setHeaderText(R.id.timestamp, null);
+
+        setHeaderImage(R.id.presence, null);
+
+        resetTrack();
+
+        // We need to have a focused view inside the QuickContact window so
+        // that the BACK key event can be intercepted
+        mRootView.requestFocus();
+
+        mHasValidSocial = false;
+        mDismissed = false;
+        mQuerying = true;
+
+        // Start background query for data, but only select photo rows when they
+        // directly match the super-primary PHOTO_ID.
+        final Uri dataUri = getDataUri(lookupUri);
+        mHandler.cancelOperation(TOKEN_DATA);
+
+        // Only request photo data when required by mode
+        if (mMode == QuickContact.MODE_LARGE) {
+            // Select photos, but only super-primary
+            mHandler.startQuery(TOKEN_DATA, lookupUri, dataUri, DataQuery.PROJECTION, Data.MIMETYPE
+                    + "!=? OR (" + Data.MIMETYPE + "=? AND " + Data._ID + "=" + Contacts.PHOTO_ID
+                    + ")", new String[] { Photo.CONTENT_ITEM_TYPE, Photo.CONTENT_ITEM_TYPE }, null);
+        } else {
+            // Exclude all photos from cursor
+            mHandler.startQuery(TOKEN_DATA, lookupUri, dataUri, DataQuery.PROJECTION, Data.MIMETYPE
+                    + "!=?", new String[] { Photo.CONTENT_ITEM_TYPE }, null);
+        }
+    }
+
+    /**
+     * Build a {@link Uri} into the {@link Data} table for the requested
+     * {@link Contacts#CONTENT_LOOKUP_URI} style {@link Uri}.
+     */
+    private Uri getDataUri(Uri lookupUri) {
+        // TODO: Formalize method of extracting LOOKUP_KEY
+        final List<String> path = lookupUri.getPathSegments();
+        final boolean validLookup = path.size() >= 3 && "lookup".equals(path.get(1));
+        if (!validLookup) {
+            // We only accept valid lookup-style Uris
+            throw new IllegalArgumentException("Expecting lookup-style Uri");
+        } else if (path.size() == 3) {
+            // No direct _ID provided, so force a lookup
+            lookupUri = Contacts.lookupContact(mContext.getContentResolver(), lookupUri);
+        }
+
+        final long contactId = ContentUris.parseId(lookupUri);
+        return Uri.withAppendedPath(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId),
+                Contacts.Data.CONTENT_DIRECTORY);
+    }
+
+    /**
+     * Show the correct call-out arrow based on a {@link R.id} reference.
+     */
+    private void showArrow(int whichArrow, int requestedX) {
+        final View showArrow = (whichArrow == R.id.arrow_up) ? mArrowUp : mArrowDown;
+        final View hideArrow = (whichArrow == R.id.arrow_up) ? mArrowDown : mArrowUp;
+
+        final int arrowWidth = mArrowUp.getMeasuredWidth();
+
+        showArrow.setVisibility(View.VISIBLE);
+        ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams)showArrow.getLayoutParams();
+        param.leftMargin = requestedX - arrowWidth / 2;
+
+        hideArrow.setVisibility(View.INVISIBLE);
+    }
+
+    /**
+     * Actual internal method to show this dialog. Called only by
+     * {@link #considerShowing()} when all data requirements have been met.
+     */
+    private void showInternal() {
+        mDecor = mWindow.getDecorView();
+        mDecor.getViewTreeObserver().addOnGlobalLayoutListener(this);
+        WindowManager.LayoutParams l = mWindow.getAttributes();
+
+        l.width = mScreenWidth + mShadowHoriz + mShadowHoriz;
+        l.height = WindowManager.LayoutParams.WRAP_CONTENT;
+
+        // Force layout measuring pass so we have baseline numbers
+        mDecor.measure(l.width, l.height);
+        final int blockHeight = mDecor.getMeasuredHeight();
+
+        l.gravity = Gravity.TOP | Gravity.LEFT;
+        l.x = -mShadowHoriz;
+
+        if (mAnchor.top > blockHeight) {
+            // Show downwards callout when enough room, aligning bottom block
+            // edge with top of anchor area, and adjusting to inset arrow.
+            showArrow(R.id.arrow_down, mAnchor.centerX());
+            l.y = mAnchor.top - blockHeight + mShadowVert;
+            l.windowAnimations = R.style.QuickContactAboveAnimation;
+
+        } else {
+            // Otherwise show upwards callout, aligning block top with bottom of
+            // anchor area, and adjusting to inset arrow.
+            showArrow(R.id.arrow_up, mAnchor.centerX());
+            l.y = mAnchor.bottom - mShadowVert;
+            l.windowAnimations = R.style.QuickContactBelowAnimation;
+
+        }
+
+        l.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
+
+        mRequestedY = l.y;
+        mWindowManager.addView(mDecor, l);
+        mShowing = true;
+        mQuerying = false;
+        mDismissed = false;
+
+        mTrack.startAnimation(mTrackAnim);
+
+        if (TRACE_LAUNCH) {
+            android.os.Debug.stopMethodTracing();
+            Log.d(TAG, "Window recycled " + mWindowRecycled + " times, chiclets "
+                    + mActionRecycled + " times");
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onGlobalLayout() {
+        layoutInScreen();
+    }
+
+    /**
+     * Adjust vertical {@link WindowManager.LayoutParams} to fit window as best
+     * as possible, shifting up to display content as needed.
+     */
+    private void layoutInScreen() {
+        if (!mShowing) return;
+
+        final WindowManager.LayoutParams l = mWindow.getAttributes();
+        final int originalY = l.y;
+
+        final int blockHeight = mDecor.getHeight();
+
+        l.y = mRequestedY;
+        if (mRequestedY + blockHeight > mScreenHeight) {
+            // Shift up from bottom when overflowing
+            l.y = mScreenHeight - blockHeight;
+        }
+
+        if (originalY != l.y) {
+            // Only update when value is changed
+            mWindow.setAttributes(l);
+        }
+    }
+
+    /**
+     * Dismiss this dialog if showing.
+     */
+    public synchronized void dismiss() {
+        // Notify any listeners that we've been dismissed
+        if (mDismissListener != null) {
+            mDismissListener.onDismiss(this);
+        }
+
+        dismissInternal();
+    }
+
+    private void dismissInternal() {
+        // Remove any attached window decor for recycling
+        boolean hadDecor = mDecor != null;
+        if (hadDecor) {
+            mWindowManager.removeView(mDecor);
+            mWindowRecycled++;
+            mDecor.getViewTreeObserver().removeGlobalOnLayoutListener(this);
+            mDecor = null;
+            mWindow.closeAllPanels();
+        }
+        mShowing = false;
+        mDismissed = true;
+
+        // Cancel any pending queries
+        mHandler.cancelOperation(TOKEN_DATA);
+        mQuerying = false;
+
+        // Completely hide header and reset track
+        mHeader.setVisibility(View.GONE);
+        resetTrack();
+    }
+
+    /**
+     * Reset track to initial state, recycling any chiclets.
+     */
+    private void resetTrack() {
+        // Release reference to last chiclet
+        mLastAction = null;
+
+        // Clear track actions and scroll to hard left
+        mResolveCache.clear();
+        mActions.clear();
+
+        // Recycle any chiclets in use
+        while (mTrack.getChildCount() > 2) {
+            this.releaseView(mTrack.getChildAt(1));
+            mTrack.removeViewAt(1);
+        }
+
+        mTrackScroll.fullScroll(View.FOCUS_LEFT);
+        mWasDownArrow = false;
+
+        // Clear any primary requests
+        mMakePrimary = false;
+        mSetPrimaryCheckBox.setChecked(false);
+
+        setResolveVisible(false, null);
+    }
+
+    /**
+     * Consider showing this window, which will only call through to
+     * {@link #showInternal()} when all data items are present.
+     */
+    private void considerShowing() {
+        if (!mShowing && !mDismissed) {
+            if (mMode == QuickContact.MODE_MEDIUM && !mHasValidSocial) {
+                // Missing valid social, swap medium for small header
+                mHeader.setVisibility(View.GONE);
+                mHeader = getHeaderView(QuickContact.MODE_SMALL);
+            }
+
+            // All queries have returned, pull curtain
+            showInternal();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public synchronized void onQueryComplete(int token, Object cookie, Cursor cursor) {
+        // Bail early when query is stale
+        if (cookie != mLookupUri) return;
+
+        if (cursor == null) {
+            // Problem while running query, so bail without showing
+            Log.w(TAG, "Missing cursor for token=" + token);
+            this.dismiss();
+            return;
+        }
+
+        handleData(cursor);
+
+        if (!cursor.isClosed()) {
+            cursor.close();
+        }
+
+        considerShowing();
+    }
+
+    /** Assign this string to the view, if found in {@link #mHeader}. */
+    private void setHeaderText(int id, int resId) {
+        setHeaderText(id, mContext.getResources().getText(resId));
+    }
+
+    /** Assign this string to the view, if found in {@link #mHeader}. */
+    private void setHeaderText(int id, CharSequence value) {
+        final View view = mHeader.findViewById(id);
+        if (view instanceof TextView) {
+            ((TextView)view).setText(value);
+            view.setVisibility(TextUtils.isEmpty(value) ? View.GONE : View.VISIBLE);
+        }
+    }
+
+    /** Assign this image to the view, if found in {@link #mHeader}. */
+    private void setHeaderImage(int id, Drawable drawable) {
+        final View view = mHeader.findViewById(id);
+        if (view instanceof ImageView) {
+            ((ImageView)view).setImageDrawable(drawable);
+            view.setVisibility(drawable == null ? View.GONE : View.VISIBLE);
+        }
+    }
+
+    /**
+     * Find the QuickContact-specific presence icon for showing in chiclets.
+     */
+    private Drawable getTrackPresenceIcon(int status) {
+        int resId;
+        switch (status) {
+            case StatusUpdates.AVAILABLE:
+                resId = R.drawable.quickcontact_slider_presence_active;
+                break;
+            case StatusUpdates.IDLE:
+            case StatusUpdates.AWAY:
+                resId = R.drawable.quickcontact_slider_presence_away;
+                break;
+            case StatusUpdates.DO_NOT_DISTURB:
+                resId = R.drawable.quickcontact_slider_presence_busy;
+                break;
+            case StatusUpdates.INVISIBLE:
+                resId = R.drawable.quickcontact_slider_presence_inactive;
+                break;
+            case StatusUpdates.OFFLINE:
+            default:
+                resId = R.drawable.quickcontact_slider_presence_inactive;
+        }
+        return mContext.getResources().getDrawable(resId);
+    }
+
+    /** Read {@link String} from the given {@link Cursor}. */
+    private static String getAsString(Cursor cursor, String columnName) {
+        final int index = cursor.getColumnIndex(columnName);
+        return cursor.getString(index);
+    }
+
+    /** Read {@link Integer} from the given {@link Cursor}. */
+    private static int getAsInt(Cursor cursor, String columnName) {
+        final int index = cursor.getColumnIndex(columnName);
+        return cursor.getInt(index);
+    }
+
+    /**
+     * Abstract definition of an action that could be performed, along with
+     * string description and icon.
+     */
+    private interface Action extends Collapser.Collapsible<Action> {
+        public CharSequence getHeader();
+        public CharSequence getBody();
+
+        public String getMimeType();
+        public Drawable getFallbackIcon();
+
+        /**
+         * Build an {@link Intent} that will perform this action.
+         */
+        public Intent getIntent();
+
+        /**
+         * Checks if the contact data for this action is primary.
+         */
+        public Boolean isPrimary();
+
+        /**
+         * Returns a lookup (@link Uri) for the contact data item.
+         */
+        public Uri getDataUri();
+    }
+
+    /**
+     * Description of a specific {@link Data#_ID} item, with style information
+     * defined by a {@link DataKind}.
+     */
+    private static class DataAction implements Action {
+        private final Context mContext;
+        private final DataKind mKind;
+        private final String mMimeType;
+
+        private CharSequence mHeader;
+        private CharSequence mBody;
+        private Intent mIntent;
+
+        private boolean mAlternate;
+        private Uri mDataUri;
+        private boolean mIsPrimary;
+
+        /**
+         * Create an action from common {@link Data} elements.
+         */
+        public DataAction(Context context, String mimeType, DataKind kind,
+                long dataId, Cursor cursor) {
+            mContext = context;
+            mKind = kind;
+            mMimeType = mimeType;
+
+            // Inflate strings from cursor
+            mAlternate = Constants.MIME_SMS_ADDRESS.equals(mimeType);
+            if (mAlternate && mKind.actionAltHeader != null) {
+                mHeader = mKind.actionAltHeader.inflateUsing(context, cursor);
+            } else if (mKind.actionHeader != null) {
+                mHeader = mKind.actionHeader.inflateUsing(context, cursor);
+            }
+
+            if (getAsInt(cursor, Data.IS_SUPER_PRIMARY) != 0) {
+                mIsPrimary = true;
+            }
+
+            if (mKind.actionBody != null) {
+                mBody = mKind.actionBody.inflateUsing(context, cursor);
+            }
+
+            mDataUri = ContentUris.withAppendedId(Data.CONTENT_URI, dataId);
+
+            // Handle well-known MIME-types with special care
+            if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                if (PhoneCapabilityTester.isPhone(mContext)) {
+                    final String number = getAsString(cursor, Phone.NUMBER);
+                    if (!TextUtils.isEmpty(number)) {
+                        final Uri callUri = Uri.fromParts(Constants.SCHEME_TEL, number, null);
+                        mIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, callUri);
+                    }
+                }
+            } else if (SipAddress.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                final String address = getAsString(cursor, SipAddress.SIP_ADDRESS);
+                if (!TextUtils.isEmpty(address)) {
+                    final Uri callUri = Uri.fromParts(Constants.SCHEME_SIP, address, null);
+                    mIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, callUri);
+                    // Note that this item will get a SIP-specific variant
+                    // of the "call phone" icon, rather than the standard
+                    // app icon for the Phone app (which we show for
+                    // regular phone numbers.)  That's because the phone
+                    // app explicitly specifies an android:icon attribute
+                    // for the SIP-related intent-filters in its manifest.
+                }
+            } else if (Constants.MIME_SMS_ADDRESS.equals(mimeType)) {
+                if (PhoneCapabilityTester.isSmsIntentRegistered(mContext)) {
+                    final String number = getAsString(cursor, Phone.NUMBER);
+                    if (!TextUtils.isEmpty(number)) {
+                        final Uri smsUri = Uri.fromParts(Constants.SCHEME_SMSTO, number, null);
+                        mIntent = new Intent(Intent.ACTION_SENDTO, smsUri);
+                    }
+                }
+            } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                final String address = getAsString(cursor, Email.DATA);
+                if (!TextUtils.isEmpty(address)) {
+                    final Uri mailUri = Uri.fromParts(Constants.SCHEME_MAILTO, address, null);
+                    mIntent = new Intent(Intent.ACTION_SENDTO, mailUri);
+                }
+
+            } else if (Website.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                final String url = getAsString(cursor, Website.URL);
+                if (!TextUtils.isEmpty(url)) {
+                    mIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+                }
+
+            } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                final boolean isEmail = Email.CONTENT_ITEM_TYPE.equals(
+                        getAsString(cursor, Data.MIMETYPE));
+                if (isEmail || isProtocolValid(cursor)) {
+                    final int protocol = isEmail ? Im.PROTOCOL_GOOGLE_TALK :
+                            getAsInt(cursor, Im.PROTOCOL);
+
+                    if (isEmail) {
+                        // Use Google Talk string when using Email, and clear data
+                        // Uri so we don't try saving Email as primary.
+                        mHeader = context.getText(R.string.chat_gtalk);
+                        mDataUri = null;
+                    }
+
+                    String host = getAsString(cursor, Im.CUSTOM_PROTOCOL);
+                    String data = getAsString(cursor, isEmail ? Email.DATA : Im.DATA);
+                    if (protocol != Im.PROTOCOL_CUSTOM) {
+                        // Try bringing in a well-known host for specific protocols
+                        host = ContactsUtils.lookupProviderNameFromId(protocol);
+                    }
+
+                    if (!TextUtils.isEmpty(host) && !TextUtils.isEmpty(data)) {
+                        final String authority = host.toLowerCase();
+                        final Uri imUri = new Uri.Builder().scheme(Constants.SCHEME_IMTO).authority(
+                                authority).appendPath(data).build();
+                        mIntent = new Intent(Intent.ACTION_SENDTO, imUri);
+                    }
+                }
+            }
+
+            if (mIntent == null) {
+                // Otherwise fall back to default VIEW action
+                mIntent = new Intent(Intent.ACTION_VIEW, mDataUri);
+            }
+
+            // Always launch as new task, since we're like a launcher
+            mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+        }
+
+        private boolean isProtocolValid(Cursor cursor) {
+            final int columnIndex = cursor.getColumnIndex(Im.PROTOCOL);
+            if (cursor.isNull(columnIndex)) {
+                return false;
+            }
+            try {
+                Integer.valueOf(cursor.getString(columnIndex));
+            } catch (NumberFormatException e) {
+                return false;
+            }
+            return true;
+        }
+
+        /** {@inheritDoc} */
+        public CharSequence getHeader() {
+            return mHeader;
+        }
+
+        /** {@inheritDoc} */
+        public CharSequence getBody() {
+            return mBody;
+        }
+
+        /** {@inheritDoc} */
+        public String getMimeType() {
+            return mMimeType;
+        }
+
+        /** {@inheritDoc} */
+        public Uri getDataUri() {
+            return mDataUri;
+        }
+
+        /** {@inheritDoc} */
+        public Boolean isPrimary() {
+            return mIsPrimary;
+        }
+
+        /** {@inheritDoc} */
+        public Drawable getFallbackIcon() {
+            // Bail early if no valid resources
+            final String resPackageName = mKind.resPackageName;
+            if (resPackageName == null) return null;
+
+            final PackageManager pm = mContext.getPackageManager();
+            if (mAlternate && mKind.iconAltRes != -1) {
+                return pm.getDrawable(resPackageName, mKind.iconAltRes, null);
+            } else if (mKind.iconRes != -1) {
+                return pm.getDrawable(resPackageName, mKind.iconRes, null);
+            } else {
+                return null;
+            }
+        }
+
+        /** {@inheritDoc} */
+        public Intent getIntent() {
+            return mIntent;
+        }
+
+        /** {@inheritDoc} */
+        public boolean collapseWith(Action other) {
+            if (!shouldCollapseWith(other)) {
+                return false;
+            }
+            return true;
+        }
+
+        /** {@inheritDoc} */
+        public boolean shouldCollapseWith(Action t) {
+            if (t == null) {
+                return false;
+            }
+            if (!(t instanceof DataAction)) {
+                Log.e(TAG, "t must be DataAction");
+                return false;
+            }
+            DataAction other = (DataAction)t;
+            if (!ContactsUtils.areObjectsEqual(mKind, other.mKind)) {
+                return false;
+            }
+            if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, other.mMimeType,
+                    other.mBody)) {
+                return false;
+            }
+            if (!TextUtils.equals(mMimeType, other.mMimeType)
+                    || !ContactsUtils.areIntentActionEqual(mIntent, other.mIntent)
+                    ) {
+                return false;
+            }
+            return true;
+        }
+    }
+
+    /**
+     * Specific action that launches the profile card.
+     */
+    private static class ProfileAction implements Action {
+        private final Context mContext;
+        private final Uri mLookupUri;
+
+        public ProfileAction(Context context, Uri lookupUri) {
+            mContext = context;
+            mLookupUri = lookupUri;
+        }
+
+        /** {@inheritDoc} */
+        public CharSequence getHeader() {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        public CharSequence getBody() {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        public String getMimeType() {
+            return Contacts.CONTENT_ITEM_TYPE;
+        }
+
+        /** {@inheritDoc} */
+        public Drawable getFallbackIcon() {
+            return mContext.getResources().getDrawable(R.drawable.ic_contacts_details);
+        }
+
+        /** {@inheritDoc} */
+        public Intent getIntent() {
+            final Intent intent = new Intent(Intent.ACTION_VIEW, mLookupUri);
+            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
+            return intent;
+        }
+
+        /** {@inheritDoc} */
+        public Boolean isPrimary() {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        public Uri getDataUri() {
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        public boolean collapseWith(Action t) {
+            return false; // Never dup.
+        }
+
+        /** {@inheritDoc} */
+        public boolean shouldCollapseWith(Action t) {
+            return false; // Never dup.
+        }
+    }
+
+    /**
+     * Internally hold a cache of scaled icons based on {@link PackageManager}
+     * queries, keyed internally on MIME-type.
+     */
+    private static class ResolveCache {
+        private PackageManager mPackageManager;
+
+        /**
+         * Cached entry holding the best {@link ResolveInfo} for a specific
+         * MIME-type, along with a {@link SoftReference} to its icon.
+         */
+        private static class Entry {
+            public ResolveInfo bestResolve;
+            public SoftReference<Drawable> icon;
+        }
+
+        private HashMap<String, Entry> mCache = new HashMap<String, Entry>();
+
+        public ResolveCache(Context context) {
+            mPackageManager = context.getPackageManager();
+        }
+
+        /**
+         * Get the {@link Entry} best associated with the given {@link Action},
+         * or create and populate a new one if it doesn't exist.
+         */
+        protected Entry getEntry(Action action) {
+            final String mimeType = action.getMimeType();
+            Entry entry = mCache.get(mimeType);
+            if (entry != null) return entry;
+            entry = new Entry();
+
+            final Intent intent = action.getIntent();
+            if (intent != null) {
+                final List<ResolveInfo> matches = mPackageManager.queryIntentActivities(intent,
+                        PackageManager.MATCH_DEFAULT_ONLY);
+
+                // Pick first match, otherwise best found
+                ResolveInfo bestResolve = null;
+                final int size = matches.size();
+                if (size == 1) {
+                    bestResolve = matches.get(0);
+                } else if (size > 1) {
+                    bestResolve = getBestResolve(intent, matches);
+                }
+
+                if (bestResolve != null) {
+                    final Drawable icon = bestResolve.loadIcon(mPackageManager);
+
+                    entry.bestResolve = bestResolve;
+                    entry.icon = new SoftReference<Drawable>(icon);
+                }
+            }
+
+            mCache.put(mimeType, entry);
+            return entry;
+        }
+
+        /**
+         * Best {@link ResolveInfo} when multiple found. Ties are broken by
+         * selecting first from the {QuickContactWindow#sPreferResolve} list of
+         * preferred packages, second by apps that live on the system partition,
+         * otherwise the app from the top of the list. This is
+         * <strong>only</strong> used for selecting a default icon for
+         * displaying in the track, and does not shortcut the system
+         * {@link Intent} disambiguation dialog.
+         */
+        protected ResolveInfo getBestResolve(Intent intent, List<ResolveInfo> matches) {
+            // Try finding preferred activity, otherwise detect disambig
+            final ResolveInfo foundResolve = mPackageManager.resolveActivity(intent,
+                    PackageManager.MATCH_DEFAULT_ONLY);
+            final boolean foundDisambig = (foundResolve.match &
+                    IntentFilter.MATCH_CATEGORY_MASK) == 0;
+
+            if (!foundDisambig) {
+                // Found concrete match, so return directly
+                return foundResolve;
+            }
+
+            // Accept any package from prefer list, otherwise first system app
+            ResolveInfo firstSystem = null;
+            for (ResolveInfo info : matches) {
+                final boolean isSystem = (info.activityInfo.applicationInfo.flags
+                        & ApplicationInfo.FLAG_SYSTEM) != 0;
+                final boolean isPrefer = QuickContactWindow.sPreferResolve
+                        .contains(info.activityInfo.applicationInfo.packageName);
+
+
+
+                if (isPrefer) return info;
+                if (isSystem && firstSystem == null) firstSystem = info;
+            }
+
+            // Return first system found, otherwise first from list
+            return firstSystem != null ? firstSystem : matches.get(0);
+        }
+
+        /**
+         * Check {@link PackageManager} to see if any apps offer to handle the
+         * given {@link Action}.
+         */
+        public boolean hasResolve(Action action) {
+            return getEntry(action).bestResolve != null;
+        }
+
+        /**
+         * Find the best description for the given {@link Action}, usually used
+         * for accessibility purposes.
+         */
+        public CharSequence getDescription(Action action) {
+            final CharSequence actionHeader = action.getHeader();
+            final ResolveInfo info = getEntry(action).bestResolve;
+            if (!TextUtils.isEmpty(actionHeader)) {
+                return actionHeader;
+            } else if (info != null) {
+                return info.loadLabel(mPackageManager);
+            } else {
+                return null;
+            }
+        }
+
+        /**
+         * Return the best icon for the given {@link Action}, which is usually
+         * based on the {@link ResolveInfo} found through a
+         * {@link PackageManager} query.
+         */
+        public Drawable getIcon(Action action) {
+            final SoftReference<Drawable> iconRef = getEntry(action).icon;
+            return (iconRef == null) ? null : iconRef.get();
+        }
+
+        public void clear() {
+            mCache.clear();
+        }
+    }
+
+    /**
+     * Provide a strongly-typed {@link LinkedList} that holds a list of
+     * {@link Action} objects.
+     */
+    private class ActionList extends ArrayList<Action> {
+    }
+
+    /**
+     * Provide a simple way of collecting one or more {@link Action} objects
+     * under a MIME-type key.
+     */
+    private class ActionMap extends HashMap<String, ActionList> {
+        private void collect(String mimeType, Action info) {
+            // Create list for this MIME-type when needed
+            ActionList collectList = get(mimeType);
+            if (collectList == null) {
+                collectList = new ActionList();
+                put(mimeType, collectList);
+            }
+            collectList.add(info);
+        }
+    }
+
+    /**
+     * Check if the given MIME-type appears in the list of excluded MIME-types
+     * that the most-recent caller requested.
+     */
+    private boolean isMimeExcluded(String mimeType) {
+        if (mExcludeMimes == null) return false;
+        for (String excludedMime : mExcludeMimes) {
+            if (TextUtils.equals(excludedMime, mimeType)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Handle the result from the {@link #TOKEN_DATA} query.
+     */
+    private void handleData(Cursor cursor) {
+        if (cursor == null) return;
+
+        if (!isMimeExcluded(Contacts.CONTENT_ITEM_TYPE)) {
+            // Add the profile shortcut action
+            final Action action = new ProfileAction(mContext, mLookupUri);
+            mActions.collect(Contacts.CONTENT_ITEM_TYPE, action);
+        }
+
+        final DataStatus status = new DataStatus();
+        final AccountTypes sources = AccountTypes.getInstance(mContext);
+        final ImageView photoView = (ImageView)mHeader.findViewById(R.id.photo);
+
+        Bitmap photoBitmap = null;
+        while (cursor.moveToNext()) {
+            final long dataId = cursor.getLong(DataQuery._ID);
+            final String accountType = cursor.getString(DataQuery.ACCOUNT_TYPE);
+            final String mimeType = cursor.getString(DataQuery.MIMETYPE);
+
+            // Handle any social status updates from this row
+            status.possibleUpdate(cursor);
+
+            // Skip this data item if MIME-type excluded
+            if (isMimeExcluded(mimeType)) continue;
+
+            // Handle photos included as data row
+            if (Photo.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                final int colPhoto = cursor.getColumnIndex(Photo.PHOTO);
+                final byte[] photoBlob = cursor.getBlob(colPhoto);
+                if (photoBlob != null) {
+                    photoBitmap = BitmapFactory.decodeByteArray(photoBlob, 0, photoBlob.length);
+                }
+                continue;
+            }
+
+            final DataKind kind = sources.getKindOrFallback(accountType, mimeType, mContext,
+                    BaseAccountType.LEVEL_MIMETYPES);
+
+            if (kind != null) {
+                // Build an action for this data entry, find a mapping to a UI
+                // element, build its summary from the cursor, and collect it
+                // along with all others of this MIME-type.
+                final Action action = new DataAction(mContext, mimeType, kind, dataId, cursor);
+                considerAdd(action, mimeType);
+            }
+
+            // If phone number, also insert as text message action
+            if (Phone.CONTENT_ITEM_TYPE.equals(mimeType) && kind != null) {
+                final Action action = new DataAction(mContext, Constants.MIME_SMS_ADDRESS,
+                        kind, dataId, cursor);
+                considerAdd(action, Constants.MIME_SMS_ADDRESS);
+            }
+
+            // Handle Email rows with presence data as Im entry
+            final boolean hasPresence = !cursor.isNull(DataQuery.PRESENCE);
+            if (hasPresence && Email.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                final DataKind imKind = sources.getKindOrFallback(accountType,
+                        Im.CONTENT_ITEM_TYPE, mContext, BaseAccountType.LEVEL_MIMETYPES);
+                if (imKind != null) {
+                    final Action action = new DataAction(mContext, Im.CONTENT_ITEM_TYPE, imKind,
+                            dataId, cursor);
+                    considerAdd(action, Im.CONTENT_ITEM_TYPE);
+                }
+            }
+        }
+
+        if (cursor.moveToLast()) {
+            // Read contact information from last data row
+            final String name = cursor.getString(DataQuery.DISPLAY_NAME);
+            final int presence = cursor.getInt(DataQuery.CONTACT_PRESENCE);
+            final Drawable statusIcon = ContactPresenceIconUtil.getPresenceIcon(mContext, presence);
+
+            setHeaderText(R.id.name, name);
+            setHeaderImage(R.id.presence, statusIcon);
+        }
+
+        if (photoView != null) {
+            // Place photo when discovered in data, otherwise hide
+            photoView.setVisibility(photoBitmap != null ? View.VISIBLE : View.GONE);
+            photoView.setImageBitmap(photoBitmap);
+        }
+
+        mHasValidSocial = status.isValid();
+        if (mHasValidSocial && mMode != QuickContact.MODE_SMALL) {
+            // Update status when valid was found
+            setHeaderText(R.id.status, status.getStatus());
+            setHeaderText(R.id.timestamp, status.getTimestampLabel(mContext));
+        }
+
+        // Turn our list of actions into UI elements
+
+        // Index where we start adding child views.
+        int index = mTrack.getChildCount() - 1;
+
+        // All the mime-types to add.
+        final Set<String> containedTypes = new HashSet<String>(mActions.keySet());
+
+        boolean hasData = false;
+
+        // First, add PRECEDING_MIMETYPES, which are most common.
+        for (String mimeType : PRECEDING_MIMETYPES) {
+            if (containedTypes.contains(mimeType)) {
+                hasData = true;
+                mTrack.addView(inflateAction(mimeType), index++);
+                containedTypes.remove(mimeType);
+            }
+        }
+
+        // Keep the current index to append non PRECEDING/FOLLOWING items.
+        final int indexAfterPreceding = index;
+
+        // Then, add FOLLOWING_MIMETYPES, which are least common.
+        for (String mimeType : FOLLOWING_MIMETYPES) {
+            if (containedTypes.contains(mimeType)) {
+                hasData = true;
+                mTrack.addView(inflateAction(mimeType), index++);
+                containedTypes.remove(mimeType);
+            }
+        }
+
+        // Go back to just after PRECEDING_MIMETYPES, and append the rest.
+        index = indexAfterPreceding;
+        final String[] remainingTypes = containedTypes.toArray(new String[containedTypes.size()]);
+        if (remainingTypes.length > 0) hasData = true;
+        Arrays.sort(remainingTypes);
+        for (String mimeType : remainingTypes) {
+            mTrack.addView(inflateAction(mimeType), index++);
+        }
+
+        // When there is no data to display, add a TextView to show the user there's no data
+        if (!hasData) {
+            View view = mInflater.inflate(R.layout.quickcontact_item_nodata, mTrack, false);
+            mTrack.addView(view, index++);
+        }
+    }
+
+    /**
+     * Consider adding the given {@link Action}, which will only happen if
+     * {@link PackageManager} finds an application to handle
+     * {@link Action#getIntent()}.
+     */
+    private void considerAdd(Action action, String mimeType) {
+        if (mResolveCache.hasResolve(action)) {
+            mActions.collect(mimeType, action);
+        }
+    }
+
+    /**
+     * Obtain a new {@link CheckableImageView} for a new chiclet, either by
+     * recycling one from {@link #mActionPool}, or by inflating a new one. When
+     * finished, use {@link #releaseView(View)} to return back into the pool for
+     * later recycling.
+     */
+    private synchronized View obtainView() {
+        View view = mActionPool.poll();
+        if (view == null || QuickContactActivity.FORCE_CREATE) {
+            view = mInflater.inflate(R.layout.quickcontact_item, mTrack, false);
+        }
+        return view;
+    }
+
+    /**
+     * Return the given {@link CheckableImageView} into our internal pool for
+     * possible recycling during another pass.
+     */
+    private synchronized void releaseView(View view) {
+        // Only add CheckableImageViews
+        if (!(view instanceof CheckableImageView)) {
+            return;
+        }
+        mActionPool.offer(view);
+        mActionRecycled++;
+    }
+
+    /**
+     * Inflate the in-track view for the action of the given MIME-type, collapsing duplicate values.
+     * Will use the icon provided by the {@link DataKind}.
+     */
+    private View inflateAction(String mimeType) {
+        final CheckableImageView view = (CheckableImageView)obtainView();
+        boolean isActionSet = false;
+
+        // Add direct intent if single child, otherwise flag for multiple
+        ActionList children = mActions.get(mimeType);
+        if (children.size() > 1) {
+            Collapser.collapseList(children);
+        }
+        Action firstInfo = children.get(0);
+        if (children.size() == 1) {
+            view.setTag(firstInfo);
+        } else {
+            for (Action action : children) {
+                if (action.isPrimary()) {
+                    view.setTag(action);
+                    isActionSet = true;
+                    break;
+                }
+            }
+            if (!isActionSet) {
+                view.setTag(children);
+            }
+        }
+
+        // Set icon and listen for clicks
+        final CharSequence descrip = mResolveCache.getDescription(firstInfo);
+        final Drawable icon = mResolveCache.getIcon(firstInfo);
+        view.setChecked(false);
+        view.setContentDescription(descrip);
+        view.setImageDrawable(icon);
+        view.setOnClickListener(this);
+        return view;
+    }
+
+    /** {@inheritDoc} */
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        // Pass list item clicks along so that Intents are handled uniformly
+        onClick(view);
+    }
+
+    /**
+     * Flag indicating if {@link #mArrowDown} was visible during the last call
+     * to {@link #setResolveVisible(boolean, CheckableImageView)}. Used to
+     * decide during a later call if the arrow should be restored.
+     */
+    private boolean mWasDownArrow = false;
+
+    /**
+     * Helper for showing and hiding {@link #mFooterDisambig}, which will
+     * correctly manage {@link #mArrowDown} as needed.
+     */
+    private void setResolveVisible(boolean visible, CheckableImageView actionView) {
+        // Show or hide the resolve list if needed
+        boolean visibleNow = mFooterDisambig.getVisibility() == View.VISIBLE;
+
+        if (mLastAction != null) mLastAction.setChecked(false);
+        if (actionView != null) actionView.setChecked(true);
+        mLastAction = actionView;
+
+        // Bail early if already in desired state
+        if (visible == visibleNow) return;
+
+        mFooter.setVisibility(visible ? View.GONE : View.VISIBLE);
+        mFooterDisambig.setVisibility(visible ? View.VISIBLE : View.GONE);
+
+        if (visible) {
+            // If showing list, then hide and save state of down arrow
+            mWasDownArrow = mWasDownArrow || (mArrowDown.getVisibility() == View.VISIBLE);
+            mArrowDown.setVisibility(View.INVISIBLE);
+        } else {
+            // If hiding list, restore any down arrow state
+            mArrowDown.setVisibility(mWasDownArrow ? View.VISIBLE : View.INVISIBLE);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onClick(View view) {
+        final boolean isActionView = (view instanceof CheckableImageView);
+        final CheckableImageView actionView = isActionView ? (CheckableImageView)view : null;
+        final Object tag = view.getTag();
+        if (tag instanceof Action) {
+            // Incoming tag is concrete intent, so try launching
+            final Action action = (Action)tag;
+            final boolean makePrimary = mMakePrimary;
+
+            try {
+                mContext.startActivity(action.getIntent());
+            } catch (ActivityNotFoundException e) {
+                Toast.makeText(mContext, R.string.quickcontact_missing_app, Toast.LENGTH_SHORT)
+                        .show();
+            }
+
+            // Hide the resolution list, if present
+            setResolveVisible(false, null);
+            this.dismiss();
+
+            if (makePrimary) {
+                ContentValues values = new ContentValues(1);
+                values.put(Data.IS_SUPER_PRIMARY, 1);
+                final Uri dataUri = action.getDataUri();
+                if (dataUri != null) {
+                    mContext.getContentResolver().update(dataUri, values, null, null);
+                }
+            }
+        } else if (tag instanceof ActionList) {
+            // Incoming tag is a MIME-type, so show resolution list
+            final ActionList children = (ActionList)tag;
+
+            // Show resolution list and set adapter
+            setResolveVisible(true, actionView);
+
+            mResolveList.setOnItemClickListener(this);
+            mResolveList.setAdapter(new BaseAdapter() {
+                public int getCount() {
+                    return children.size();
+                }
+
+                public Object getItem(int position) {
+                    return children.get(position);
+                }
+
+                public long getItemId(int position) {
+                    return position;
+                }
+
+                public View getView(int position, View convertView, ViewGroup parent) {
+                    if (convertView == null) {
+                        convertView = mInflater.inflate(
+                                R.layout.quickcontact_resolve_item, parent, false);
+                    }
+
+                    // Set action title based on summary value
+                    final Action action = (Action)getItem(position);
+
+                    TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
+                    TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
+
+                    text1.setText(action.getHeader());
+                    text2.setText(action.getBody());
+
+                    convertView.setTag(action);
+                    return convertView;
+                }
+            });
+
+            // Make sure we resize to make room for ListView
+            mDecor.forceLayout();
+            mDecor.invalidate();
+
+        }
+    }
+
+    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+        mMakePrimary = isChecked;
+    }
+
+    private void onBackPressed() {
+        // Back key will first dismiss any expanded resolve list, otherwise
+        // it will close the entire dialog.
+        if (mFooterDisambig.getVisibility() == View.VISIBLE) {
+            setResolveVisible(false, null);
+            mDecor.forceLayout();
+            mDecor.invalidate();
+        } else {
+            dismiss();
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        if (mWindow.superDispatchKeyEvent(event)) {
+            return true;
+        }
+        return event.dispatch(this, mDecor != null
+                ? mDecor.getKeyDispatcherState() : null, this);
+    }
+
+    /** {@inheritDoc} */
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK) {
+            event.startTracking();
+            return true;
+        }
+
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean onKeyUp(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking()
+                && !event.isCanceled()) {
+            onBackPressed();
+            return true;
+        }
+
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean onKeyLongPress(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
+        // TODO: make this window accessible
+        return false;
+    }
+
+    /**
+     * Detect if the given {@link MotionEvent} is outside the boundaries of this
+     * window, which usually means we should dismiss.
+     */
+    protected void detectEventOutside(MotionEvent event) {
+        if (event.getAction() == MotionEvent.ACTION_DOWN && mDecor != null) {
+            // Only try detecting outside events on down-press
+            mDecor.getHitRect(mRect);
+            mRect.top = mRect.top + mShadowTouch;
+            mRect.bottom = mRect.bottom - mShadowTouch;
+            final int x = (int)event.getX();
+            final int y = (int)event.getY();
+            if (!mRect.contains(x, y)) {
+                event.setAction(MotionEvent.ACTION_OUTSIDE);
+            }
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean dispatchTouchEvent(MotionEvent event) {
+        detectEventOutside(event);
+        if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
+            dismiss();
+            return true;
+        } else {
+            return mWindow.superDispatchTouchEvent(event);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public boolean dispatchTrackballEvent(MotionEvent event) {
+        return mWindow.superDispatchTrackballEvent(event);
+    }
+
+    /** {@inheritDoc} */
+    public void onContentChanged() {
+    }
+
+    /** {@inheritDoc} */
+    public boolean onCreatePanelMenu(int featureId, Menu menu) {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public View onCreatePanelView(int featureId) {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    public boolean onMenuItemSelected(int featureId, MenuItem item) {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean onMenuOpened(int featureId, Menu menu) {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public void onPanelClosed(int featureId, Menu menu) {
+    }
+
+    /** {@inheritDoc} */
+    public boolean onPreparePanel(int featureId, View view, Menu menu) {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public boolean onSearchRequested() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams attrs) {
+        if (mDecor != null) {
+            mWindowManager.updateViewLayout(mDecor, attrs);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onWindowFocusChanged(boolean hasFocus) {
+    }
+
+    /** {@inheritDoc} */
+    public void onAttachedToWindow() {
+        // No actions
+    }
+
+    /** {@inheritDoc} */
+    public void onDetachedFromWindow() {
+        // No actions
+    }
+
+    /** {@inheritDoc} */
+    public ActionMode onStartActionMode(ActionMode.Callback callback) {
+        return null;
+    }
+
+    private interface DataQuery {
+        final String[] PROJECTION = new String[] {
+                Data._ID,
+
+                RawContacts.ACCOUNT_TYPE,
+                Contacts.STARRED,
+                Contacts.DISPLAY_NAME,
+                Contacts.CONTACT_PRESENCE,
+
+                Data.STATUS,
+                Data.STATUS_RES_PACKAGE,
+                Data.STATUS_ICON,
+                Data.STATUS_LABEL,
+                Data.STATUS_TIMESTAMP,
+                Data.PRESENCE,
+
+                Data.RES_PACKAGE,
+                Data.MIMETYPE,
+                Data.IS_PRIMARY,
+                Data.IS_SUPER_PRIMARY,
+                Data.RAW_CONTACT_ID,
+
+                Data.DATA1, Data.DATA2, Data.DATA3, Data.DATA4, Data.DATA5,
+                Data.DATA6, Data.DATA7, Data.DATA8, Data.DATA9, Data.DATA10, Data.DATA11,
+                Data.DATA12, Data.DATA13, Data.DATA14, Data.DATA15,
+        };
+
+        final int _ID = 0;
+
+        final int ACCOUNT_TYPE = 1;
+        final int STARRED = 2;
+        final int DISPLAY_NAME = 3;
+        final int CONTACT_PRESENCE = 4;
+
+        final int STATUS = 5;
+        final int STATUS_RES_PACKAGE = 6;
+        final int STATUS_ICON = 7;
+        final int STATUS_LABEL = 8;
+        final int STATUS_TIMESTAMP = 9;
+        final int PRESENCE = 10;
+
+        final int RES_PACKAGE = 11;
+        final int MIMETYPE = 12;
+        final int IS_PRIMARY = 13;
+        final int IS_SUPER_PRIMARY = 14;
+    }
+}
diff --git a/src/com/android/contacts/socialwidget/SocialWidgetConfigureActivity.java b/src/com/android/contacts/socialwidget/SocialWidgetConfigureActivity.java
new file mode 100644
index 0000000..f5033fe
--- /dev/null
+++ b/src/com/android/contacts/socialwidget/SocialWidgetConfigureActivity.java
@@ -0,0 +1,61 @@
+/*
+ * 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.socialwidget;
+
+import android.app.Activity;
+import android.appwidget.AppWidgetManager;
+import android.content.Intent;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+
+public class SocialWidgetConfigureActivity extends Activity {
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // If the user presses back, we want to cancel
+        setResult(RESULT_CANCELED);
+
+        // Forward the Intent to the picker
+        final Intent pickerIntent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
+        startActivityForResult(pickerIntent, 0);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        // We came back from the Picker. If the user actually selected a contact,
+        // return it now
+        if (resultCode == Activity.RESULT_OK) {
+            final Bundle extras = getIntent().getExtras();
+            if (extras == null) throw new IllegalStateException("Intent extras are null");
+            final int widgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,
+                    AppWidgetManager.INVALID_APPWIDGET_ID);
+
+            // Save the setting
+            final SocialWidgetConfigureActivity context = SocialWidgetConfigureActivity.this;
+            SocialWidgetSettings.setContactUri(context, widgetId, data.getData());
+
+            // Update the widget
+            SocialWidgetProvider.startLoading(context, widgetId);
+
+            // Return OK so that the system won't remove the widget
+            final Intent resultValue = new Intent();
+            resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId);
+            setResult(RESULT_OK, resultValue);
+        }
+        finish();
+    }
+}
diff --git a/src/com/android/contacts/socialwidget/SocialWidgetProvider.java b/src/com/android/contacts/socialwidget/SocialWidgetProvider.java
new file mode 100644
index 0000000..32bbffb
--- /dev/null
+++ b/src/com/android/contacts/socialwidget/SocialWidgetProvider.java
@@ -0,0 +1,146 @@
+/*
+ * 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.socialwidget;
+
+import com.android.contacts.R;
+import com.android.contacts.util.ContactBadgeUtil;
+import com.android.contacts.views.ContactLoader;
+
+import android.app.PendingIntent;
+import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProvider;
+import android.content.Context;
+import android.content.Intent;
+import android.content.Loader;
+import android.graphics.Bitmap;
+import android.net.Uri;
+import android.provider.ContactsContract.QuickContact;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.View;
+import android.widget.RemoteViews;
+
+public class SocialWidgetProvider extends AppWidgetProvider {
+    private static final String TAG = "SocialWidgetProvider";
+
+    @Override
+    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
+        for (int appWidgetId : appWidgetIds) {
+            startLoading(context, appWidgetId);
+        }
+    }
+
+    public static void startLoading(final Context context, final int widgetId) {
+        // Show that we are loading
+        final AppWidgetManager widgetManager = AppWidgetManager.getInstance(context);
+        final RemoteViews loadingViews =
+            new RemoteViews(context.getPackageName(), R.layout.social_widget);
+        loadingViews.setTextViewText(R.id.name, "Loading...");
+        widgetManager.updateAppWidget(widgetId, loadingViews);
+
+        // Load
+        final Uri contactUri = SocialWidgetSettings.getContactUri(context, widgetId);
+        if (contactUri == null) {
+            // Not yet set-up (this can happen while the Configuration activity is visible)
+            return;
+        }
+        final ContactLoader contactLoader = new ContactLoader(context, contactUri);
+        contactLoader.registerListener(0,
+                new ContactLoader.OnLoadCompleteListener<ContactLoader.Result>() {
+                    @Override
+                    public void onLoadComplete(Loader<ContactLoader.Result> loader,
+                            ContactLoader.Result contactData) {
+                        if (contactData == ContactLoader.Result.ERROR ||
+                                contactData == ContactLoader.Result.NOT_FOUND) {
+                            return;
+                        }
+                        Log.d(TAG, "Loaded " + contactData.getLookupKey());
+                        final RemoteViews views = new RemoteViews(context.getPackageName(),
+                                R.layout.social_widget);
+
+                        setDisplayName(views, contactData.getDisplayName(),
+                                contactData.getPhoneticName());
+                        final Bitmap bitmap = ContactBadgeUtil.getPhoto(contactData);
+                        setPhoto(views, bitmap == null
+                                ? ContactBadgeUtil.loadPlaceholderPhoto(context) : bitmap);
+                        setSocialSnippet(views, contactData.getSocialSnippet());
+                        setStatusAttribution(views, ContactBadgeUtil.getSocialDate(
+                                contactData, context));
+
+                        // OnClick launch QuickContact
+                        final Intent intent = new Intent(QuickContact.ACTION_QUICK_CONTACT);
+                        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                                | Intent.FLAG_ACTIVITY_CLEAR_TOP
+                                | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
+
+                        intent.setData(contactData.getLookupUri());
+                        intent.putExtra(QuickContact.EXTRA_MODE, QuickContact.MODE_SMALL);
+
+                        final PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
+                                intent, 0);
+                        views.setOnClickPendingIntent(R.id.image, pendingIntent);
+
+                        // Configure Ui
+                        widgetManager.updateAppWidget(widgetId, views);
+                    }
+
+                    private void setPhoto(RemoteViews views, Bitmap photo) {
+                        views.setImageViewBitmap(R.id.image, photo);
+                    }
+
+                    /**
+                     * Set the display name and phonetic name to show in the header.
+                     */
+                    private void setDisplayName(RemoteViews views, CharSequence displayName,
+                            CharSequence phoneticName) {
+                        views.setTextViewText(R.id.name, displayName);
+                        if (TextUtils.isEmpty(phoneticName)) {
+                            views.setViewVisibility(R.id.phonetic_name, View.GONE);
+                        } else {
+                            views.setTextViewText(R.id.phonetic_name, phoneticName);
+                            views.setViewVisibility(R.id.phonetic_name, View.VISIBLE);
+                        }
+                    }
+
+                    /**
+                     * Set the social snippet text to display in the header.
+                     */
+                    private void setSocialSnippet(RemoteViews views, CharSequence snippet) {
+                        if (TextUtils.isEmpty(snippet)) {
+                            views.setViewVisibility(R.id.status, View.GONE);
+                        } else {
+                            views.setTextViewText(R.id.status, snippet);
+                            views.setViewVisibility(R.id.status, View.VISIBLE);
+                        }
+                    }
+
+                    /**
+                     * Set the status attribution text to display in the header.
+                     */
+                    private void setStatusAttribution(RemoteViews views,
+                            CharSequence attribution) {
+                        if (attribution == null) {
+                            views.setViewVisibility(R.id.status_date, View.GONE);
+                        } else {
+                            views.setTextViewText(R.id.status_date, attribution);
+                            views.setViewVisibility(R.id.status_date, View.VISIBLE);
+                        }
+                    }
+                });
+        contactLoader.startLoading();
+    }
+}
diff --git a/src/com/android/contacts/socialwidget/SocialWidgetSettings.java b/src/com/android/contacts/socialwidget/SocialWidgetSettings.java
new file mode 100644
index 0000000..4377991
--- /dev/null
+++ b/src/com/android/contacts/socialwidget/SocialWidgetSettings.java
@@ -0,0 +1,59 @@
+/*
+ * 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.socialwidget;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
+import android.net.Uri;
+import android.util.Log;
+
+public class SocialWidgetSettings {
+    private static final String TAG = "SocialWidgetSettings";
+
+    private static final String PREFS_NAME = "WidgetSettings";
+    private static final String CONTACT_URI = "CONTACT_URI_%";
+
+    private static String getSettingsString(int widgetId) {
+        return CONTACT_URI.replace("%", Integer.toString(widgetId));
+    }
+
+    // TODO: Think about how to remove not-used Ids...we need a way to detect removed
+    // widgets
+
+    public static Uri getContactUri(Context context, int widgetId) {
+        final SharedPreferences settings =
+                context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+        final String resultString = settings.getString(getSettingsString(widgetId), null);
+        final Uri result = resultString == null ? null : Uri.parse(resultString);
+        Log.d(TAG, "getContactUri(" + widgetId + ") --> " + result);
+        return result;
+    }
+
+    public static void setContactUri(Context context, int widgetId, Uri contactLookupUri) {
+        Log.d(TAG, "setContactUri(" + widgetId + ", " + contactLookupUri + ")");
+        final SharedPreferences settings =
+                context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+        final Editor editor = settings.edit();
+        if (contactLookupUri == null) {
+            editor.remove(getSettingsString(widgetId));
+        } else {
+            editor.putString(getSettingsString(widgetId), contactLookupUri.toString());
+        }
+        editor.commit();
+    }
+}
diff --git a/src/com/android/contacts/ui/ContactsPreferences.java b/src/com/android/contacts/ui/ContactsPreferences.java
deleted file mode 100644
index 14c6e05..0000000
--- a/src/com/android/contacts/ui/ContactsPreferences.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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.ui;
-
-import com.android.contacts.R;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.ContentObserver;
-import android.os.Handler;
-import android.provider.ContactsContract;
-import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
-
-/**
- * Manages user preferences for contacts.
- */
-public final class ContactsPreferences extends ContentObserver {
-    private Context mContext;
-    private int mSortOrder = -1;
-    private int mDisplayOrder = -1;
-    private ChangeListener mListener = null;
-    private Handler mHandler;
-
-    public ContactsPreferences(Context context) {
-        super(null);
-        mContext = context;
-        mHandler = new Handler();
-    }
-
-    public boolean isSortOrderUserChangeable() {
-        return mContext.getResources().getBoolean(R.bool.config_sort_order_user_changeable);
-    }
-
-    private int getDefaultSortOrder() {
-        if (mContext.getResources().getBoolean(R.bool.config_default_sort_order_primary)) {
-            return ContactsContract.Preferences.SORT_ORDER_PRIMARY;
-        } else {
-            return ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE;
-        }
-    }
-
-    public int getSortOrder() {
-        if (!isSortOrderUserChangeable()) {
-            return getDefaultSortOrder();
-        }
-
-        if (mSortOrder == -1) {
-            try {
-                mSortOrder = Settings.System.getInt(mContext.getContentResolver(),
-                        ContactsContract.Preferences.SORT_ORDER);
-            } catch (SettingNotFoundException e) {
-                mSortOrder = getDefaultSortOrder();
-            }
-        }
-        return mSortOrder;
-    }
-
-    public void setSortOrder(int sortOrder) {
-        mSortOrder = sortOrder;
-        Settings.System.putInt(mContext.getContentResolver(),
-                ContactsContract.Preferences.SORT_ORDER, sortOrder);
-    }
-
-    public boolean isDisplayOrderUserChangeable() {
-        return mContext.getResources().getBoolean(R.bool.config_display_order_user_changeable);
-    }
-
-    private int getDefaultDisplayOrder() {
-        if (mContext.getResources().getBoolean(R.bool.config_default_display_order_primary)) {
-            return ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY;
-        } else {
-            return ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE;
-        }
-    }
-
-    public int getDisplayOrder() {
-        if (!isDisplayOrderUserChangeable()) {
-            return getDefaultDisplayOrder();
-        }
-
-        if (mDisplayOrder == -1) {
-            try {
-                mDisplayOrder = Settings.System.getInt(mContext.getContentResolver(),
-                        ContactsContract.Preferences.DISPLAY_ORDER);
-            } catch (SettingNotFoundException e) {
-                mDisplayOrder = getDefaultDisplayOrder();
-            }
-        }
-        return mDisplayOrder;
-    }
-
-    public void setDisplayOrder(int displayOrder) {
-        mDisplayOrder = displayOrder;
-        Settings.System.putInt(mContext.getContentResolver(),
-                ContactsContract.Preferences.DISPLAY_ORDER, displayOrder);
-    }
-
-    public void registerChangeListener(ChangeListener listener) {
-        if (mListener != null) unregisterChangeListener();
-
-        // We didn't watch before, so ensure that we actually forget our cache here
-        mSortOrder = -1;
-        mDisplayOrder = -1;
-
-        mListener = listener;
-        final ContentResolver contentResolver = mContext.getContentResolver();
-        contentResolver.registerContentObserver(
-                Settings.System.getUriFor(
-                        ContactsContract.Preferences.SORT_ORDER), false, this);
-        contentResolver.registerContentObserver(
-                Settings.System.getUriFor(
-                        ContactsContract.Preferences.DISPLAY_ORDER), false, this);
-    }
-
-    public void unregisterChangeListener() {
-        if (mListener != null) {
-            mContext.getContentResolver().unregisterContentObserver(this);
-            mListener = null;
-        }
-    }
-
-    @Override
-    public void onChange(boolean selfChange) {
-        // This notification is not sent on the Ui thread. Use the previously created Handler
-        // to switch to the Ui thread
-        mHandler.post(new Runnable() {
-            @Override
-            public void run() {
-                mSortOrder = -1;
-                mDisplayOrder = -1;
-                if (mListener != null) mListener.onChange();
-            }
-        });
-    }
-
-    public interface ChangeListener {
-        void onChange();
-    }
-}
diff --git a/src/com/android/contacts/ui/ContactsPreferencesActivity.java b/src/com/android/contacts/ui/ContactsPreferencesActivity.java
deleted file mode 100644
index 6bc9be8..0000000
--- a/src/com/android/contacts/ui/ContactsPreferencesActivity.java
+++ /dev/null
@@ -1,1075 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui;
-
-import com.android.contacts.ContactsSearchManager;
-import com.android.contacts.R;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.GoogleSource;
-import com.android.contacts.model.Sources;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.util.EmptyService;
-import com.android.contacts.util.WeakAsyncTask;
-import com.google.android.collect.Lists;
-
-import android.accounts.Account;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ExpandableListActivity;
-import android.app.ProgressDialog;
-import android.content.ContentProviderOperation;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.EntityIterator;
-import android.content.Intent;
-import android.content.OperationApplicationException;
-import android.content.SharedPreferences;
-import android.content.ContentProviderOperation.Builder;
-import android.content.SharedPreferences.Editor;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.RemoteException;
-import android.preference.PreferenceManager;
-import android.provider.ContactsContract;
-import android.provider.ContactsContract.Groups;
-import android.provider.ContactsContract.Settings;
-import android.util.Log;
-import android.view.ContextMenu;
-import android.view.LayoutInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.MenuItem.OnMenuItemClickListener;
-import android.widget.AdapterView;
-import android.widget.BaseExpandableListAdapter;
-import android.widget.CheckBox;
-import android.widget.ExpandableListAdapter;
-import android.widget.ExpandableListView;
-import android.widget.ListView;
-import android.widget.TextView;
-import android.widget.ExpandableListView.ExpandableListContextMenuInfo;
-
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-
-/**
- * Shows a list of all available {@link Groups} available, letting the user
- * select which ones they want to be visible.
- */
-public final class ContactsPreferencesActivity extends ExpandableListActivity implements
-        AdapterView.OnItemClickListener, View.OnClickListener {
-    private static final String TAG = "DisplayGroupsActivity";
-
-    public interface Prefs {
-        public static final String DISPLAY_ONLY_PHONES = "only_phones";
-        public static final boolean DISPLAY_ONLY_PHONES_DEFAULT = false;
-
-    }
-
-    private static final int DIALOG_SORT_ORDER = 1;
-    private static final int DIALOG_DISPLAY_ORDER = 2;
-
-    private ExpandableListView mList;
-    private DisplayAdapter mAdapter;
-
-    private SharedPreferences mPrefs;
-    private ContactsPreferences mContactsPrefs;
-
-    private CheckBox mDisplayPhones;
-
-    private View mHeaderPhones;
-    private View mHeaderSeparator;
-
-    private View mSortOrderView;
-    private TextView mSortOrderTextView;
-    private int mSortOrder;
-
-    private View mDisplayOrderView;
-    private TextView mDisplayOrderTextView;
-    private int mDisplayOrder;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        setContentView(R.layout.contacts_preferences);
-
-        mList = getExpandableListView();
-        mList.setHeaderDividersEnabled(true);
-        mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
-        mContactsPrefs = new ContactsPreferences(this);
-        mAdapter = new DisplayAdapter(this);
-
-        final LayoutInflater inflater = getLayoutInflater();
-
-        createWithPhonesOnlyPreferenceView(inflater);
-        createSortOrderPreferenceView(inflater);
-        createDisplayOrderPreferenceView(inflater);
-        createDisplayGroupHeader(inflater);
-
-        findViewById(R.id.btn_done).setOnClickListener(this);
-        findViewById(R.id.btn_discard).setOnClickListener(this);
-
-        // Catch clicks on the header views
-        mList.setOnItemClickListener(this);
-        mList.setOnCreateContextMenuListener(this);
-
-        mSortOrder = mContactsPrefs.getSortOrder();
-        mDisplayOrder = mContactsPrefs.getDisplayOrder();
-    }
-
-    private void createWithPhonesOnlyPreferenceView(LayoutInflater inflater) {
-        // Add the "Only contacts with phones" header modifier.
-        mHeaderPhones = inflater.inflate(R.layout.display_options_phones_only, mList, false);
-        mHeaderPhones.setId(R.id.header_phones);
-        mDisplayPhones = (CheckBox) mHeaderPhones.findViewById(android.R.id.checkbox);
-        mDisplayPhones.setChecked(mPrefs.getBoolean(Prefs.DISPLAY_ONLY_PHONES,
-                Prefs.DISPLAY_ONLY_PHONES_DEFAULT));
-        {
-            final TextView text1 = (TextView)mHeaderPhones.findViewById(android.R.id.text1);
-            final TextView text2 = (TextView)mHeaderPhones.findViewById(android.R.id.text2);
-            text1.setText(R.string.showFilterPhones);
-            text2.setText(R.string.showFilterPhonesDescrip);
-        }
-    }
-
-    private void createSortOrderPreferenceView(LayoutInflater inflater) {
-        mSortOrderView = inflater.inflate(R.layout.preference_with_more_button, mList, false);
-
-        View preferenceLayout = mSortOrderView.findViewById(R.id.preference);
-
-        TextView label = (TextView)preferenceLayout.findViewById(R.id.label);
-        label.setText(getString(R.string.display_options_sort_list_by));
-
-        mSortOrderTextView = (TextView)preferenceLayout.findViewById(R.id.data);
-    }
-
-    private void createDisplayOrderPreferenceView(LayoutInflater inflater) {
-        mDisplayOrderView = inflater.inflate(R.layout.preference_with_more_button, mList, false);
-        View preferenceLayout = mDisplayOrderView.findViewById(R.id.preference);
-
-        TextView label = (TextView)preferenceLayout.findViewById(R.id.label);
-        label.setText(getString(R.string.display_options_view_names_as));
-
-        mDisplayOrderTextView = (TextView)preferenceLayout.findViewById(R.id.data);
-    }
-
-    private void createDisplayGroupHeader(LayoutInflater inflater) {
-        // Add the separator before showing the detailed group list.
-        mHeaderSeparator = inflater.inflate(R.layout.list_separator, mList, false);
-        {
-            final TextView text1 = (TextView)mHeaderSeparator;
-            text1.setText(R.string.headerContactGroups);
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        mList.removeHeaderView(mHeaderPhones);
-        mList.removeHeaderView(mSortOrderView);
-        mList.removeHeaderView(mDisplayOrderView);
-        mList.removeHeaderView(mHeaderSeparator);
-
-        // List adapter needs to be reset, because header views cannot be added
-        // to a list with an existing adapter.
-        setListAdapter(null);
-
-        mList.addHeaderView(mHeaderPhones, null, true);
-        if (mContactsPrefs.isSortOrderUserChangeable()) {
-            mList.addHeaderView(mSortOrderView, null, true);
-        }
-
-        if (mContactsPrefs.isSortOrderUserChangeable()) {
-            mList.addHeaderView(mDisplayOrderView, null, true);
-        }
-
-        mList.addHeaderView(mHeaderSeparator, null, false);
-
-        setListAdapter(mAdapter);
-
-        bindView();
-
-        // Start background query to find account details
-        new QueryGroupsTask(this).execute();
-    }
-
-    private void bindView() {
-        mSortOrderTextView.setText(
-                mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY
-                        ? getString(R.string.display_options_sort_by_given_name)
-                        : getString(R.string.display_options_sort_by_family_name));
-
-        mDisplayOrderTextView.setText(
-                mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY
-                        ? getString(R.string.display_options_view_given_name_first)
-                        : getString(R.string.display_options_view_family_name_first));
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int id, Bundle args) {
-        switch (id) {
-            case DIALOG_SORT_ORDER:
-                return createSortOrderDialog();
-            case DIALOG_DISPLAY_ORDER:
-                return createDisplayOrderDialog();
-        }
-
-        return null;
-    }
-
-    private Dialog createSortOrderDialog() {
-        String[] items = new String[] {
-                getString(R.string.display_options_sort_by_given_name),
-                getString(R.string.display_options_sort_by_family_name),
-        };
-
-        return new AlertDialog.Builder(this)
-            .setTitle(R.string.display_options_sort_list_by)
-            .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialog, int whichButton) {
-                        setSortOrder(dialog);
-                        dialog.dismiss();
-                    }
-                })
-            .setNegativeButton(android.R.string.cancel, null)
-            .create();
-    }
-
-    private Dialog createDisplayOrderDialog() {
-        String[] items = new String[] {
-                getString(R.string.display_options_view_given_name_first),
-                getString(R.string.display_options_view_family_name_first),
-        };
-
-        return new AlertDialog.Builder(this)
-            .setTitle(R.string.display_options_view_names_as)
-            .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
-                    public void onClick(DialogInterface dialog, int whichButton) {
-                        setDisplayOrder(dialog);
-                        dialog.dismiss();
-                    }
-                })
-            .setNegativeButton(android.R.string.cancel, null)
-            .create();
-    }
-
-    @Override
-    protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
-        switch (id) {
-            case DIALOG_SORT_ORDER:
-                setCheckedItem(dialog,
-                        mSortOrder == ContactsContract.Preferences.SORT_ORDER_PRIMARY ? 0 : 1);
-                break;
-            case DIALOG_DISPLAY_ORDER:
-                setCheckedItem(dialog,
-                        mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY
-                                ? 0 : 1);
-                break;
-        }
-    }
-
-    private void setCheckedItem(Dialog dialog, int position) {
-        ListView listView = ((AlertDialog)dialog).getListView();
-        listView.setItemChecked(position, true);
-        listView.setSelection(position);
-    }
-
-    protected void setSortOrder(DialogInterface dialog) {
-        ListView listView = ((AlertDialog)dialog).getListView();
-        int checked = listView.getCheckedItemPosition();
-        mSortOrder = checked == 0
-                ? ContactsContract.Preferences.SORT_ORDER_PRIMARY
-                : ContactsContract.Preferences.SORT_ORDER_ALTERNATIVE;
-
-        bindView();
-    }
-
-    protected void setDisplayOrder(DialogInterface dialog) {
-        ListView listView = ((AlertDialog)dialog).getListView();
-        int checked = listView.getCheckedItemPosition();
-        mDisplayOrder = checked == 0
-                ? ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY
-                : ContactsContract.Preferences.DISPLAY_ORDER_ALTERNATIVE;
-
-        bindView();
-    }
-
-    /**
-     * Background operation to build set of {@link AccountDisplay} for each
-     * {@link Sources#getAccounts(boolean)} that provides groups.
-     */
-    private static class QueryGroupsTask extends
-            WeakAsyncTask<Void, Void, AccountSet, ContactsPreferencesActivity> {
-        public QueryGroupsTask(ContactsPreferencesActivity target) {
-            super(target);
-        }
-
-        @Override
-        protected AccountSet doInBackground(ContactsPreferencesActivity target,
-                Void... params) {
-            final Context context = target;
-            final Sources sources = Sources.getInstance(context);
-            final ContentResolver resolver = context.getContentResolver();
-
-            // Inflate groups entry for each account
-            final AccountSet accounts = new AccountSet();
-            for (Account account : sources.getAccounts(false)) {
-                accounts.add(new AccountDisplay(resolver, account.name, account.type));
-            }
-
-            return accounts;
-        }
-
-        @Override
-        protected void onPostExecute(ContactsPreferencesActivity target, AccountSet result) {
-            target.mAdapter.setAccounts(result);
-        }
-    }
-
-    private static final int DEFAULT_SHOULD_SYNC = 1;
-    private static final int DEFAULT_VISIBLE = 0;
-
-    /**
-     * Entry holding any changes to {@link Groups} or {@link Settings} rows,
-     * such as {@link Groups#SHOULD_SYNC} or {@link Groups#GROUP_VISIBLE}.
-     */
-    protected static class GroupDelta extends ValuesDelta {
-        private boolean mUngrouped = false;
-        private boolean mAccountHasGroups;
-
-        private GroupDelta() {
-            super();
-        }
-
-        /**
-         * Build {@link GroupDelta} from the {@link Settings} row for the given
-         * {@link Settings#ACCOUNT_NAME} and {@link Settings#ACCOUNT_TYPE}.
-         */
-        public static GroupDelta fromSettings(ContentResolver resolver, String accountName,
-                String accountType, boolean accountHasGroups) {
-            final Uri settingsUri = Settings.CONTENT_URI.buildUpon()
-                    .appendQueryParameter(Settings.ACCOUNT_NAME, accountName)
-                    .appendQueryParameter(Settings.ACCOUNT_TYPE, accountType).build();
-            final Cursor cursor = resolver.query(settingsUri, new String[] {
-                    Settings.SHOULD_SYNC, Settings.UNGROUPED_VISIBLE
-            }, null, null, null);
-
-            try {
-                final ContentValues values = new ContentValues();
-                values.put(Settings.ACCOUNT_NAME, accountName);
-                values.put(Settings.ACCOUNT_TYPE, accountType);
-
-                if (cursor != null && cursor.moveToFirst()) {
-                    // Read existing values when present
-                    values.put(Settings.SHOULD_SYNC, cursor.getInt(0));
-                    values.put(Settings.UNGROUPED_VISIBLE, cursor.getInt(1));
-                    return fromBefore(values).setUngrouped(accountHasGroups);
-                } else {
-                    // Nothing found, so treat as create
-                    values.put(Settings.SHOULD_SYNC, DEFAULT_SHOULD_SYNC);
-                    values.put(Settings.UNGROUPED_VISIBLE, DEFAULT_VISIBLE);
-                    return fromAfter(values).setUngrouped(accountHasGroups);
-                }
-            } finally {
-                if (cursor != null) cursor.close();
-            }
-        }
-
-        public static GroupDelta fromBefore(ContentValues before) {
-            final GroupDelta entry = new GroupDelta();
-            entry.mBefore = before;
-            entry.mAfter = new ContentValues();
-            return entry;
-        }
-
-        public static GroupDelta fromAfter(ContentValues after) {
-            final GroupDelta entry = new GroupDelta();
-            entry.mBefore = null;
-            entry.mAfter = after;
-            return entry;
-        }
-
-        protected GroupDelta setUngrouped(boolean accountHasGroups) {
-            mUngrouped = true;
-            mAccountHasGroups = accountHasGroups;
-            return this;
-        }
-
-        @Override
-        public boolean beforeExists() {
-            return mBefore != null;
-        }
-
-        public boolean getShouldSync() {
-            return getAsInteger(mUngrouped ? Settings.SHOULD_SYNC : Groups.SHOULD_SYNC,
-                    DEFAULT_SHOULD_SYNC) != 0;
-        }
-
-        public boolean getVisible() {
-            return getAsInteger(mUngrouped ? Settings.UNGROUPED_VISIBLE : Groups.GROUP_VISIBLE,
-                    DEFAULT_VISIBLE) != 0;
-        }
-
-        public void putShouldSync(boolean shouldSync) {
-            put(mUngrouped ? Settings.SHOULD_SYNC : Groups.SHOULD_SYNC, shouldSync ? 1 : 0);
-        }
-
-        public void putVisible(boolean visible) {
-            put(mUngrouped ? Settings.UNGROUPED_VISIBLE : Groups.GROUP_VISIBLE, visible ? 1 : 0);
-        }
-
-        public CharSequence getTitle(Context context) {
-            if (mUngrouped) {
-                if (mAccountHasGroups) {
-                    return context.getText(R.string.display_ungrouped);
-                } else {
-                    return context.getText(R.string.display_all_contacts);
-                }
-            } else {
-                final Integer titleRes = getAsInteger(Groups.TITLE_RES);
-                if (titleRes != null) {
-                    final String packageName = getAsString(Groups.RES_PACKAGE);
-                    return context.getPackageManager().getText(packageName, titleRes, null);
-                } else {
-                    return getAsString(Groups.TITLE);
-                }
-            }
-        }
-
-        /**
-         * Build a possible {@link ContentProviderOperation} to persist any
-         * changes to the {@link Groups} or {@link Settings} row described by
-         * this {@link GroupDelta}.
-         */
-        public ContentProviderOperation buildDiff() {
-            if (isNoop()) {
-                return null;
-            } else if (isUpdate()) {
-                // When has changes and "before" exists, then "update"
-                final Builder builder = ContentProviderOperation
-                        .newUpdate(mUngrouped ? Settings.CONTENT_URI : addCallerIsSyncAdapterParameter(Groups.CONTENT_URI));
-                if (mUngrouped) {
-                    builder.withSelection(Settings.ACCOUNT_NAME + "=? AND " + Settings.ACCOUNT_TYPE
-                            + "=?", new String[] {
-                            this.getAsString(Settings.ACCOUNT_NAME),
-                            this.getAsString(Settings.ACCOUNT_TYPE)
-                    });
-                } else {
-                    builder.withSelection(Groups._ID + "=" + this.getId(), null);
-                }
-                builder.withValues(mAfter);
-                return builder.build();
-            } else if (isInsert() && mUngrouped) {
-                // Only allow inserts for Settings
-                mAfter.remove(mIdColumn);
-                final Builder builder = ContentProviderOperation.newInsert(Settings.CONTENT_URI);
-                builder.withValues(mAfter);
-                return builder.build();
-            } else {
-                throw new IllegalStateException("Unexpected delete or insert");
-            }
-        }
-    }
-
-    private static Uri addCallerIsSyncAdapterParameter(Uri uri) {
-        return uri.buildUpon()
-	        .appendQueryParameter(ContactsContract.CALLER_IS_SYNCADAPTER, "true")
-	        .build();
-    }
-
-    /**
-     * {@link Comparator} to sort by {@link Groups#_ID}.
-     */
-    private static Comparator<GroupDelta> sIdComparator = new Comparator<GroupDelta>() {
-        public int compare(GroupDelta object1, GroupDelta object2) {
-            final Long id1 = object1.getId();
-            final Long id2 = object2.getId();
-            if (id1 == null && id2 == null) {
-                return 0;
-            } else if (id1 == null) {
-                return -1;
-            } else if (id2 == null) {
-                return 1;
-            } else if (id1 < id2) {
-                return -1;
-            } else if (id1 > id2) {
-                return 1;
-            } else {
-                return 0;
-            }
-        }
-    };
-
-    /**
-     * Set of all {@link AccountDisplay} entries, one for each source.
-     */
-    protected static class AccountSet extends ArrayList<AccountDisplay> {
-        public ArrayList<ContentProviderOperation> buildDiff() {
-            final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
-            for (AccountDisplay account : this) {
-                account.buildDiff(diff);
-            }
-            return diff;
-        }
-    }
-
-    /**
-     * {@link GroupDelta} details for a single {@link Account}, usually shown as
-     * children under a single expandable group.
-     */
-    protected static class AccountDisplay {
-        public String mName;
-        public String mType;
-
-        public GroupDelta mUngrouped;
-        public ArrayList<GroupDelta> mSyncedGroups = Lists.newArrayList();
-        public ArrayList<GroupDelta> mUnsyncedGroups = Lists.newArrayList();
-
-        /**
-         * Build an {@link AccountDisplay} covering all {@link Groups} under the
-         * given {@link Account}.
-         */
-        public AccountDisplay(ContentResolver resolver, String accountName, String accountType) {
-            mName = accountName;
-            mType = accountType;
-
-            final Uri groupsUri = Groups.CONTENT_URI.buildUpon()
-                    .appendQueryParameter(Groups.ACCOUNT_NAME, accountName)
-                    .appendQueryParameter(Groups.ACCOUNT_TYPE, accountType).build();
-            EntityIterator iterator = ContactsContract.Groups.newEntityIterator(resolver.query(
-                    groupsUri, null, null, null, null));
-            try {
-                boolean hasGroups = false;
-
-                // Create entries for each known group
-                while (iterator.hasNext()) {
-                    final ContentValues values = iterator.next().getEntityValues();
-                    final GroupDelta group = GroupDelta.fromBefore(values);
-                    addGroup(group);
-                    hasGroups = true;
-                }
-                // Create single entry handling ungrouped status
-                mUngrouped = GroupDelta.fromSettings(resolver, accountName, accountType, hasGroups);
-                addGroup(mUngrouped);
-            } finally {
-                iterator.close();
-            }
-        }
-
-        /**
-         * Add the given {@link GroupDelta} internally, filing based on its
-         * {@link GroupDelta#getShouldSync()} status.
-         */
-        private void addGroup(GroupDelta group) {
-            if (group.getShouldSync()) {
-                mSyncedGroups.add(group);
-            } else {
-                mUnsyncedGroups.add(group);
-            }
-        }
-
-        /**
-         * Set the {@link GroupDelta#putShouldSync(boolean)} value for all
-         * children {@link GroupDelta} rows.
-         */
-        public void setShouldSync(boolean shouldSync) {
-            final Iterator<GroupDelta> oppositeChildren = shouldSync ?
-                    mUnsyncedGroups.iterator() : mSyncedGroups.iterator();
-            while (oppositeChildren.hasNext()) {
-                final GroupDelta child = oppositeChildren.next();
-                setShouldSync(child, shouldSync, false);
-                oppositeChildren.remove();
-            }
-        }
-
-        public void setShouldSync(GroupDelta child, boolean shouldSync) {
-            setShouldSync(child, shouldSync, true);
-        }
-
-        /**
-         * Set {@link GroupDelta#putShouldSync(boolean)}, and file internally
-         * based on updated state.
-         */
-        public void setShouldSync(GroupDelta child, boolean shouldSync, boolean attemptRemove) {
-            child.putShouldSync(shouldSync);
-            if (shouldSync) {
-                if (attemptRemove) {
-                    mUnsyncedGroups.remove(child);
-                }
-                mSyncedGroups.add(child);
-                Collections.sort(mSyncedGroups, sIdComparator);
-            } else {
-                if (attemptRemove) {
-                    mSyncedGroups.remove(child);
-                }
-                mUnsyncedGroups.add(child);
-            }
-        }
-
-        /**
-         * Build set of {@link ContentProviderOperation} to persist any user
-         * changes to {@link GroupDelta} rows under this {@link Account}.
-         */
-        public void buildDiff(ArrayList<ContentProviderOperation> diff) {
-            for (GroupDelta group : mSyncedGroups) {
-                final ContentProviderOperation oper = group.buildDiff();
-                if (oper != null) diff.add(oper);
-            }
-            for (GroupDelta group : mUnsyncedGroups) {
-                final ContentProviderOperation oper = group.buildDiff();
-                if (oper != null) diff.add(oper);
-            }
-        }
-    }
-
-    /**
-     * {@link ExpandableListAdapter} that shows {@link GroupDelta} settings,
-     * grouped by {@link Account} source. Shows footer row when any groups are
-     * unsynced, as determined through {@link AccountDisplay#mUnsyncedGroups}.
-     */
-    protected static class DisplayAdapter extends BaseExpandableListAdapter {
-        private Context mContext;
-        private LayoutInflater mInflater;
-        private Sources mSources;
-        private AccountSet mAccounts;
-
-        private boolean mChildWithPhones = false;
-
-        public DisplayAdapter(Context context) {
-            mContext = context;
-            mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            mSources = Sources.getInstance(context);
-        }
-
-        public void setAccounts(AccountSet accounts) {
-            mAccounts = accounts;
-            notifyDataSetChanged();
-        }
-
-        /**
-         * In group descriptions, show the number of contacts with phone
-         * numbers, in addition to the total contacts.
-         */
-        public void setChildDescripWithPhones(boolean withPhones) {
-            mChildWithPhones = withPhones;
-        }
-
-        /** {@inheritDoc} */
-        public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
-                View convertView, ViewGroup parent) {
-            if (convertView == null) {
-                convertView = mInflater.inflate(R.layout.display_child, parent, false);
-            }
-
-            final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
-            final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
-            final CheckBox checkbox = (CheckBox)convertView.findViewById(android.R.id.checkbox);
-
-            final AccountDisplay account = mAccounts.get(groupPosition);
-            final GroupDelta child = (GroupDelta)this.getChild(groupPosition, childPosition);
-            if (child != null) {
-                // Handle normal group, with title and checkbox
-                final boolean groupVisible = child.getVisible();
-                checkbox.setVisibility(View.VISIBLE);
-                checkbox.setChecked(groupVisible);
-
-                final CharSequence groupTitle = child.getTitle(mContext);
-                text1.setText(groupTitle);
-
-//              final int count = cursor.getInt(GroupsQuery.SUMMARY_COUNT);
-//              final int withPhones = cursor.getInt(GroupsQuery.SUMMARY_WITH_PHONES);
-
-//              final CharSequence descrip = mContext.getResources().getQuantityString(
-//                      mChildWithPhones ? R.plurals.groupDescripPhones : R.plurals.groupDescrip,
-//                      count, count, withPhones);
-
-//              text2.setText(descrip);
-                text2.setVisibility(View.GONE);
-            } else {
-                // When unknown child, this is "more" footer view
-                checkbox.setVisibility(View.GONE);
-                text1.setText(R.string.display_more_groups);
-                text2.setVisibility(View.GONE);
-            }
-
-            return convertView;
-        }
-
-        /** {@inheritDoc} */
-        public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
-                ViewGroup parent) {
-            if (convertView == null) {
-                convertView = mInflater.inflate(R.layout.display_group, parent, false);
-            }
-
-            final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
-            final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
-
-            final AccountDisplay account = (AccountDisplay)this.getGroup(groupPosition);
-
-            final ContactsSource source = mSources.getInflatedSource(account.mType,
-                    ContactsSource.LEVEL_SUMMARY);
-
-            text1.setText(account.mName);
-            text2.setText(source.getDisplayLabel(mContext));
-            text2.setVisibility(account.mName == null ? View.GONE : View.VISIBLE);
-
-            return convertView;
-        }
-
-        /** {@inheritDoc} */
-        public Object getChild(int groupPosition, int childPosition) {
-            final AccountDisplay account = mAccounts.get(groupPosition);
-            final boolean validChild = childPosition >= 0
-                    && childPosition < account.mSyncedGroups.size();
-            if (validChild) {
-                return account.mSyncedGroups.get(childPosition);
-            } else {
-                return null;
-            }
-        }
-
-        /** {@inheritDoc} */
-        public long getChildId(int groupPosition, int childPosition) {
-            final GroupDelta child = (GroupDelta)getChild(groupPosition, childPosition);
-            if (child != null) {
-                final Long childId = child.getId();
-                return childId != null ? childId : Long.MIN_VALUE;
-            } else {
-                return Long.MIN_VALUE;
-            }
-        }
-
-        /** {@inheritDoc} */
-        public int getChildrenCount(int groupPosition) {
-            // Count is any synced groups, plus possible footer
-            final AccountDisplay account = mAccounts.get(groupPosition);
-            final boolean anyHidden = account.mUnsyncedGroups.size() > 0;
-            return account.mSyncedGroups.size() + (anyHidden ? 1 : 0);
-        }
-
-        /** {@inheritDoc} */
-        public Object getGroup(int groupPosition) {
-            return mAccounts.get(groupPosition);
-        }
-
-        /** {@inheritDoc} */
-        public int getGroupCount() {
-            if (mAccounts == null) {
-                return 0;
-            }
-            return mAccounts.size();
-        }
-
-        /** {@inheritDoc} */
-        public long getGroupId(int groupPosition) {
-            return groupPosition;
-        }
-
-        /** {@inheritDoc} */
-        public boolean hasStableIds() {
-            return true;
-        }
-
-        /** {@inheritDoc} */
-        public boolean isChildSelectable(int groupPosition, int childPosition) {
-            return true;
-        }
-    }
-
-    /**
-     * Handle any clicks on header views added to our {@link #mAdapter}, which
-     * are usually the global modifier checkboxes.
-     */
-    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-        Log.d(TAG, "OnItemClick, position=" + position + ", id=" + id);
-        if (view == mHeaderPhones) {
-            mDisplayPhones.toggle();
-            return;
-        }
-        if (view == mDisplayOrderView) {
-            Log.d(TAG, "Showing Display Order dialog");
-            showDialog(DIALOG_DISPLAY_ORDER);
-            return;
-        }
-        if (view == mSortOrderView) {
-            Log.d(TAG, "Showing Sort Order dialog");
-            showDialog(DIALOG_SORT_ORDER);
-            return;
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View view) {
-        switch (view.getId()) {
-            case R.id.btn_done: {
-                this.doSaveAction();
-                break;
-            }
-            case R.id.btn_discard: {
-                this.finish();
-                break;
-            }
-        }
-    }
-
-    /**
-     * Assign a specific value to {@link Prefs#DISPLAY_ONLY_PHONES}, refreshing
-     * the visible list as needed.
-     */
-    protected void setDisplayOnlyPhones(boolean displayOnlyPhones) {
-        mDisplayPhones.setChecked(displayOnlyPhones);
-
-        Editor editor = mPrefs.edit();
-        editor.putBoolean(Prefs.DISPLAY_ONLY_PHONES, displayOnlyPhones);
-        editor.apply();
-
-        mAdapter.setChildDescripWithPhones(displayOnlyPhones);
-        mAdapter.notifyDataSetChanged();
-    }
-
-    /**
-     * Handle any clicks on {@link ExpandableListAdapter} children, which
-     * usually mean toggling its visible state.
-     */
-    @Override
-    public boolean onChildClick(ExpandableListView parent, View view, int groupPosition,
-            int childPosition, long id) {
-        final CheckBox checkbox = (CheckBox)view.findViewById(android.R.id.checkbox);
-
-        final AccountDisplay account = (AccountDisplay)mAdapter.getGroup(groupPosition);
-        final GroupDelta child = (GroupDelta)mAdapter.getChild(groupPosition, childPosition);
-        if (child != null) {
-            checkbox.toggle();
-            child.putVisible(checkbox.isChecked());
-        } else {
-            // Open context menu for bringing back unsynced
-            this.openContextMenu(view);
-        }
-        return true;
-    }
-
-    // TODO: move these definitions to framework constants when we begin
-    // defining this mode through <sync-adapter> tags
-    private static final int SYNC_MODE_UNSUPPORTED = 0;
-    private static final int SYNC_MODE_UNGROUPED = 1;
-    private static final int SYNC_MODE_EVERYTHING = 2;
-
-    protected int getSyncMode(AccountDisplay account) {
-        // TODO: read sync mode through <sync-adapter> definition
-        if (GoogleSource.ACCOUNT_TYPE.equals(account.mType)) {
-            return SYNC_MODE_EVERYTHING;
-        } else {
-            return SYNC_MODE_UNSUPPORTED;
-        }
-    }
-
-    @Override
-    public void onCreateContextMenu(ContextMenu menu, View view,
-            ContextMenu.ContextMenuInfo menuInfo) {
-        super.onCreateContextMenu(menu, view, menuInfo);
-
-        // Bail if not working with expandable long-press, or if not child
-        if (!(menuInfo instanceof ExpandableListContextMenuInfo)) return;
-
-        final ExpandableListContextMenuInfo info = (ExpandableListContextMenuInfo) menuInfo;
-        final int groupPosition = ExpandableListView.getPackedPositionGroup(info.packedPosition);
-        final int childPosition = ExpandableListView.getPackedPositionChild(info.packedPosition);
-
-        // Skip long-press on expandable parents
-        if (childPosition == -1) return;
-
-        final AccountDisplay account = (AccountDisplay)mAdapter.getGroup(groupPosition);
-        final GroupDelta child = (GroupDelta)mAdapter.getChild(groupPosition, childPosition);
-
-        // Ignore when selective syncing unsupported
-        final int syncMode = getSyncMode(account);
-        if (syncMode == SYNC_MODE_UNSUPPORTED) return;
-
-        if (child != null) {
-            showRemoveSync(menu, account, child, syncMode);
-        } else {
-            showAddSync(menu, account, syncMode);
-        }
-    }
-
-    protected void showRemoveSync(ContextMenu menu, final AccountDisplay account,
-            final GroupDelta child, final int syncMode) {
-        final CharSequence title = child.getTitle(this);
-
-        menu.setHeaderTitle(title);
-        menu.add(R.string.menu_sync_remove).setOnMenuItemClickListener(
-                new OnMenuItemClickListener() {
-                    public boolean onMenuItemClick(MenuItem item) {
-                        handleRemoveSync(account, child, syncMode, title);
-                        return true;
-                    }
-                });
-    }
-
-    protected void handleRemoveSync(final AccountDisplay account, final GroupDelta child,
-            final int syncMode, CharSequence title) {
-        final boolean shouldSyncUngrouped = account.mUngrouped.getShouldSync();
-        if (syncMode == SYNC_MODE_EVERYTHING && shouldSyncUngrouped
-                && !child.equals(account.mUngrouped)) {
-            // Warn before removing this group when it would cause ungrouped to stop syncing
-            final AlertDialog.Builder builder = new AlertDialog.Builder(this);
-            final CharSequence removeMessage = this.getString(
-                    R.string.display_warn_remove_ungrouped, title);
-            builder.setTitle(R.string.menu_sync_remove);
-            builder.setMessage(removeMessage);
-            builder.setNegativeButton(android.R.string.cancel, null);
-            builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
-                public void onClick(DialogInterface dialog, int which) {
-                    // Mark both this group and ungrouped to stop syncing
-                    account.setShouldSync(account.mUngrouped, false);
-                    account.setShouldSync(child, false);
-                    mAdapter.notifyDataSetChanged();
-                }
-            });
-            builder.show();
-        } else {
-            // Mark this group to not sync
-            account.setShouldSync(child, false);
-            mAdapter.notifyDataSetChanged();
-        }
-    }
-
-    protected void showAddSync(ContextMenu menu, final AccountDisplay account, final int syncMode) {
-        menu.setHeaderTitle(R.string.dialog_sync_add);
-
-        // Create item for each available, unsynced group
-        for (final GroupDelta child : account.mUnsyncedGroups) {
-            if (!child.getShouldSync()) {
-                final CharSequence title = child.getTitle(this);
-                menu.add(title).setOnMenuItemClickListener(new OnMenuItemClickListener() {
-                    public boolean onMenuItemClick(MenuItem item) {
-                        // Adding specific group for syncing
-                        if (child.mUngrouped && syncMode == SYNC_MODE_EVERYTHING) {
-                            account.setShouldSync(true);
-                        } else {
-                            account.setShouldSync(child, true);
-                        }
-                        mAdapter.notifyDataSetChanged();
-                        return true;
-                    }
-                });
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void onBackPressed() {
-        doSaveAction();
-    }
-
-    private void doSaveAction() {
-        mContactsPrefs.setSortOrder(mSortOrder);
-        mContactsPrefs.setDisplayOrder(mDisplayOrder);
-
-        if (mAdapter == null || mAdapter.mAccounts == null) {
-            return;
-        }
-        setDisplayOnlyPhones(mDisplayPhones.isChecked());
-        new UpdateTask(this).execute(mAdapter.mAccounts);
-    }
-
-    /**
-     * Background task that persists changes to {@link Groups#GROUP_VISIBLE},
-     * showing spinner dialog to user while updating.
-     */
-    public static class UpdateTask extends
-            WeakAsyncTask<AccountSet, Void, Void, Activity> {
-        private WeakReference<ProgressDialog> mProgress;
-
-        public UpdateTask(Activity target) {
-            super(target);
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        protected void onPreExecute(Activity target) {
-            final Context context = target;
-
-            mProgress = new WeakReference<ProgressDialog>(ProgressDialog.show(context, null,
-                    context.getText(R.string.savingDisplayGroups)));
-
-            // Before starting this task, start an empty service to protect our
-            // process from being reclaimed by the system.
-            context.startService(new Intent(context, EmptyService.class));
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        protected Void doInBackground(Activity target, AccountSet... params) {
-            final Context context = target;
-            final ContentValues values = new ContentValues();
-            final ContentResolver resolver = context.getContentResolver();
-
-            try {
-                // Build changes and persist in transaction
-                final AccountSet set = params[0];
-                final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-                resolver.applyBatch(ContactsContract.AUTHORITY, diff);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Problem saving display groups", e);
-            } catch (OperationApplicationException e) {
-                Log.e(TAG, "Problem saving display groups", e);
-            }
-
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        protected void onPostExecute(Activity target, Void result) {
-            final Context context = target;
-
-            final ProgressDialog dialog = mProgress.get();
-            if (dialog != null) {
-                try {
-                    dialog.dismiss();
-                } catch (Exception e) {
-                    Log.e(TAG, "Error dismissing progress dialog", e);
-                }
-            }
-
-            target.finish();
-
-            // Stop the service that was protecting us
-            context.stopService(new Intent(context, EmptyService.class));
-        }
-    }
-
-    @Override
-    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
-            boolean globalSearch) {
-        if (globalSearch) {
-            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-        } else {
-            ContactsSearchManager.startSearch(this, initialQuery);
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/EditContactActivity.java b/src/com/android/contacts/ui/EditContactActivity.java
deleted file mode 100644
index e37aade..0000000
--- a/src/com/android/contacts/ui/EditContactActivity.java
+++ /dev/null
@@ -1,1434 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui;
-
-import com.android.contacts.ContactsListActivity;
-import com.android.contacts.ContactsSearchManager;
-import com.android.contacts.ContactsUtils;
-import com.android.contacts.R;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.Editor;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.EntitySet;
-import com.android.contacts.model.GoogleSource;
-import com.android.contacts.model.Sources;
-import com.android.contacts.model.ContactsSource.EditType;
-import com.android.contacts.model.Editor.EditorListener;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.widget.BaseContactEditorView;
-import com.android.contacts.ui.widget.PhotoEditorView;
-import com.android.contacts.util.EmptyService;
-import com.android.contacts.util.WeakAsyncTask;
-import com.google.android.collect.Lists;
-
-import android.accounts.Account;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.ProgressDialog;
-import android.content.ActivityNotFoundException;
-import android.content.ContentProviderOperation;
-import android.content.ContentProviderResult;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Entity;
-import android.content.Intent;
-import android.content.OperationApplicationException;
-import android.content.ContentProviderOperation.Builder;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.media.MediaScannerConnection;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Environment;
-import android.os.RemoteException;
-import android.provider.ContactsContract;
-import android.provider.MediaStore;
-import android.provider.ContactsContract.AggregationExceptions;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.Contacts.Data;
-import android.util.Log;
-import android.view.ContextThemeWrapper;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.LinearLayout;
-import android.widget.ListAdapter;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.io.File;
-import java.lang.ref.WeakReference;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-
-/**
- * Activity for editing or inserting a contact.
- */
-public final class EditContactActivity extends Activity
-        implements View.OnClickListener, Comparator<EntityDelta> {
-
-    private static final String TAG = "EditContactActivity";
-
-    /** The launch code when picking a photo and the raw data is returned */
-    private static final int PHOTO_PICKED_WITH_DATA = 3021;
-
-    /** The launch code when a contact to join with is returned */
-    private static final int REQUEST_JOIN_CONTACT = 3022;
-
-    /** The launch code when taking a picture */
-    private static final int CAMERA_WITH_DATA = 3023;
-
-    private static final String KEY_EDIT_STATE = "state";
-    private static final String KEY_RAW_CONTACT_ID_REQUESTING_PHOTO = "photorequester";
-    private static final String KEY_VIEW_ID_GENERATOR = "viewidgenerator";
-    private static final String KEY_CURRENT_PHOTO_FILE = "currentphotofile";
-    private static final String KEY_QUERY_SELECTION = "queryselection";
-    private static final String KEY_CONTACT_ID_FOR_JOIN = "contactidforjoin";
-
-    /** The result code when view activity should close after edit returns */
-    public static final int RESULT_CLOSE_VIEW_ACTIVITY = 777;
-
-    public static final int SAVE_MODE_DEFAULT = 0;
-    public static final int SAVE_MODE_SPLIT = 1;
-    public static final int SAVE_MODE_JOIN = 2;
-
-    private long mRawContactIdRequestingPhoto = -1;
-
-    private static final int DIALOG_CONFIRM_DELETE = 1;
-    private static final int DIALOG_CONFIRM_READONLY_DELETE = 2;
-    private static final int DIALOG_CONFIRM_MULTIPLE_DELETE = 3;
-    private static final int DIALOG_CONFIRM_READONLY_HIDE = 4;
-
-    private static final int ICON_SIZE = 96;
-
-    private static final File PHOTO_DIR = new File(
-            Environment.getExternalStorageDirectory() + "/DCIM/Camera");
-
-    private File mCurrentPhotoFile;
-
-    String mQuerySelection;
-
-    private long mContactIdForJoin;
-
-    private static final int STATUS_LOADING = 0;
-    private static final int STATUS_EDITING = 1;
-    private static final int STATUS_SAVING = 2;
-
-    private int mStatus;
-    private boolean mActivityActive;  // true after onCreate/onResume, false at onPause
-
-    EntitySet mState;
-
-    /** The linear layout holding the ContactEditorViews */
-    LinearLayout mContent;
-
-    private ArrayList<Dialog> mManagedDialogs = Lists.newArrayList();
-
-    private ViewIdGenerator mViewIdGenerator;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        final Intent intent = getIntent();
-        final String action = intent.getAction();
-
-        setContentView(R.layout.act_edit);
-
-        // Build editor and listen for photo requests
-        mContent = (LinearLayout) findViewById(R.id.editors);
-
-        findViewById(R.id.btn_done).setOnClickListener(this);
-        findViewById(R.id.btn_discard).setOnClickListener(this);
-
-        // Handle initial actions only when existing state missing
-        final boolean hasIncomingState = icicle != null && icicle.containsKey(KEY_EDIT_STATE);
-
-        mActivityActive = true;
-
-        if (Intent.ACTION_EDIT.equals(action) && !hasIncomingState) {
-            setTitle(R.string.editContact_title_edit);
-            mStatus = STATUS_LOADING;
-
-            // Read initial state from database
-            new QueryEntitiesTask(this).execute(intent);
-        } else if (Intent.ACTION_INSERT.equals(action) && !hasIncomingState) {
-            setTitle(R.string.editContact_title_insert);
-            mStatus = STATUS_EDITING;
-            // Trigger dialog to pick account type
-            doAddAction();
-        }
-
-        if (icicle == null) {
-            // If icicle is non-null, onRestoreInstanceState() will restore the generator.
-            mViewIdGenerator = new ViewIdGenerator();
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        mActivityActive = true;
-    }
-
-    @Override
-    protected void onPause() {
-        super.onResume();
-        mActivityActive = false;
-    }
-
-    private static class QueryEntitiesTask extends
-            WeakAsyncTask<Intent, Void, EntitySet, EditContactActivity> {
-
-        private String mSelection;
-
-        public QueryEntitiesTask(EditContactActivity target) {
-            super(target);
-        }
-
-        @Override
-        protected EntitySet doInBackground(EditContactActivity target, Intent... params) {
-            final Intent intent = params[0];
-
-            final ContentResolver resolver = target.getContentResolver();
-
-            // Handle both legacy and new authorities
-            final Uri data = intent.getData();
-            final String authority = data.getAuthority();
-            final String mimeType = intent.resolveType(resolver);
-
-            mSelection = "0";
-            if (ContactsContract.AUTHORITY.equals(authority)) {
-                if (Contacts.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                    // Handle selected aggregate
-                    final long contactId = ContentUris.parseId(data);
-                    mSelection = RawContacts.CONTACT_ID + "=" + contactId;
-                } else if (RawContacts.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                    final long rawContactId = ContentUris.parseId(data);
-                    final long contactId = ContactsUtils.queryForContactId(resolver, rawContactId);
-                    mSelection = RawContacts.CONTACT_ID + "=" + contactId;
-                }
-            } else if (android.provider.Contacts.AUTHORITY.equals(authority)) {
-                final long rawContactId = ContentUris.parseId(data);
-                mSelection = Data.RAW_CONTACT_ID + "=" + rawContactId;
-            }
-
-            return EntitySet.fromQuery(target.getContentResolver(), mSelection, null, null);
-        }
-
-        @Override
-        protected void onPostExecute(EditContactActivity target, EntitySet entitySet) {
-            target.mQuerySelection = mSelection;
-
-            // Load edit details in background
-            final Context context = target;
-            final Sources sources = Sources.getInstance(context);
-
-            // Handle any incoming values that should be inserted
-            final Bundle extras = target.getIntent().getExtras();
-            final boolean hasExtras = extras != null && extras.size() > 0;
-            final boolean hasState = entitySet.size() > 0;
-            if (hasExtras && hasState) {
-                // Find source defining the first RawContact found
-                final EntityDelta state = entitySet.get(0);
-                final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
-                final ContactsSource source = sources.getInflatedSource(accountType,
-                        ContactsSource.LEVEL_CONSTRAINTS);
-                EntityModifier.parseExtras(context, source, state, extras);
-            }
-
-            target.mState = entitySet;
-
-            // Bind UI to new background state
-            target.bindEditors();
-        }
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        if (hasValidState()) {
-            // Store entities with modifications
-            outState.putParcelable(KEY_EDIT_STATE, mState);
-        }
-
-        outState.putLong(KEY_RAW_CONTACT_ID_REQUESTING_PHOTO, mRawContactIdRequestingPhoto);
-        outState.putParcelable(KEY_VIEW_ID_GENERATOR, mViewIdGenerator);
-        if (mCurrentPhotoFile != null) {
-            outState.putString(KEY_CURRENT_PHOTO_FILE, mCurrentPhotoFile.toString());
-        }
-        outState.putString(KEY_QUERY_SELECTION, mQuerySelection);
-        outState.putLong(KEY_CONTACT_ID_FOR_JOIN, mContactIdForJoin);
-        super.onSaveInstanceState(outState);
-    }
-
-    @Override
-    protected void onRestoreInstanceState(Bundle savedInstanceState) {
-        // Read modifications from instance
-        mState = savedInstanceState.<EntitySet> getParcelable(KEY_EDIT_STATE);
-        mRawContactIdRequestingPhoto = savedInstanceState.getLong(
-                KEY_RAW_CONTACT_ID_REQUESTING_PHOTO);
-        mViewIdGenerator = savedInstanceState.getParcelable(KEY_VIEW_ID_GENERATOR);
-        String fileName = savedInstanceState.getString(KEY_CURRENT_PHOTO_FILE);
-        if (fileName != null) {
-            mCurrentPhotoFile = new File(fileName);
-        }
-        mQuerySelection = savedInstanceState.getString(KEY_QUERY_SELECTION);
-        mContactIdForJoin = savedInstanceState.getLong(KEY_CONTACT_ID_FOR_JOIN);
-
-        bindEditors();
-
-        super.onRestoreInstanceState(savedInstanceState);
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-
-        for (Dialog dialog : mManagedDialogs) {
-            dismissDialog(dialog);
-        }
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int id, Bundle bundle) {
-        switch (id) {
-            case DIALOG_CONFIRM_DELETE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.deleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok, new DeleteClickListener())
-                        .setCancelable(false)
-                        .create();
-            case DIALOG_CONFIRM_READONLY_DELETE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.readOnlyContactDeleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok, new DeleteClickListener())
-                        .setCancelable(false)
-                        .create();
-            case DIALOG_CONFIRM_MULTIPLE_DELETE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.multipleContactDeleteConfirmation)
-                        .setNegativeButton(android.R.string.cancel, null)
-                        .setPositiveButton(android.R.string.ok, new DeleteClickListener())
-                        .setCancelable(false)
-                        .create();
-            case DIALOG_CONFIRM_READONLY_HIDE:
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.deleteConfirmation_title)
-                        .setIcon(android.R.drawable.ic_dialog_alert)
-                        .setMessage(R.string.readOnlyContactWarning)
-                        .setPositiveButton(android.R.string.ok, new DeleteClickListener())
-                        .setCancelable(false)
-                        .create();
-        }
-        return null;
-    }
-
-    /**
-     * Start managing this {@link Dialog} along with the {@link Activity}.
-     */
-    private void startManagingDialog(Dialog dialog) {
-        synchronized (mManagedDialogs) {
-            mManagedDialogs.add(dialog);
-        }
-    }
-
-    /**
-     * Show this {@link Dialog} and manage with the {@link Activity}.
-     */
-    void showAndManageDialog(Dialog dialog) {
-        startManagingDialog(dialog);
-        dialog.show();
-    }
-
-    /**
-     * Dismiss the given {@link Dialog}.
-     */
-    static void dismissDialog(Dialog dialog) {
-        try {
-            // Only dismiss when valid reference and still showing
-            if (dialog != null && dialog.isShowing()) {
-                dialog.dismiss();
-            }
-        } catch (Exception e) {
-            Log.w(TAG, "Ignoring exception while dismissing dialog: " + e.toString());
-        }
-    }
-
-    /**
-     * Check if our internal {@link #mState} is valid, usually checked before
-     * performing user actions.
-     */
-    protected boolean hasValidState() {
-        return mStatus == STATUS_EDITING && mState != null && mState.size() > 0;
-    }
-
-    /**
-     * Rebuild the editors to match our underlying {@link #mState} object, usually
-     * called once we've parsed {@link Entity} data or have inserted a new
-     * {@link RawContacts}.
-     */
-    protected void bindEditors() {
-        if (mState == null) {
-            return;
-        }
-
-        final LayoutInflater inflater = (LayoutInflater) getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-        final Sources sources = Sources.getInstance(this);
-
-        // Sort the editors
-        Collections.sort(mState, this);
-
-        // Remove any existing editors and rebuild any visible
-        mContent.removeAllViews();
-        int size = mState.size();
-        for (int i = 0; i < size; i++) {
-            // TODO ensure proper ordering of entities in the list
-            EntityDelta entity = mState.get(i);
-            final ValuesDelta values = entity.getValues();
-            if (!values.isVisible()) continue;
-
-            final String accountType = values.getAsString(RawContacts.ACCOUNT_TYPE);
-            final ContactsSource source = sources.getInflatedSource(accountType,
-                    ContactsSource.LEVEL_CONSTRAINTS);
-            final long rawContactId = values.getAsLong(RawContacts._ID);
-
-            BaseContactEditorView editor;
-            if (!source.readOnly) {
-                editor = (BaseContactEditorView) inflater.inflate(R.layout.item_contact_editor,
-                        mContent, false);
-            } else {
-                editor = (BaseContactEditorView) inflater.inflate(
-                        R.layout.item_read_only_contact_editor, mContent, false);
-            }
-            PhotoEditorView photoEditor = editor.getPhotoEditor();
-            photoEditor.setEditorListener(new PhotoListener(rawContactId, source.readOnly,
-                    photoEditor));
-
-            mContent.addView(editor);
-            editor.setState(entity, source, mViewIdGenerator);
-        }
-
-        // Show editor now that we've loaded state
-        mContent.setVisibility(View.VISIBLE);
-        mStatus = STATUS_EDITING;
-    }
-
-    /**
-     * Class that listens to requests coming from photo editors
-     */
-    private class PhotoListener implements EditorListener, DialogInterface.OnClickListener {
-        private long mRawContactId;
-        private boolean mReadOnly;
-        private PhotoEditorView mEditor;
-
-        public PhotoListener(long rawContactId, boolean readOnly, PhotoEditorView editor) {
-            mRawContactId = rawContactId;
-            mReadOnly = readOnly;
-            mEditor = editor;
-        }
-
-        public void onDeleted(Editor editor) {
-            // Do nothing
-        }
-
-        public void onRequest(int request) {
-            if (!hasValidState()) return;
-
-            if (request == EditorListener.REQUEST_PICK_PHOTO) {
-                if (mEditor.hasSetPhoto()) {
-                    // There is an existing photo, offer to remove, replace, or promoto to primary
-                    createPhotoDialog().show();
-                } else if (!mReadOnly) {
-                    // No photo set and not read-only, try to set the photo
-                    doPickPhotoAction(mRawContactId);
-                }
-            }
-        }
-
-        /**
-         * Prepare dialog for picking a new {@link EditType} or entering a
-         * custom label. This dialog is limited to the valid types as determined
-         * by {@link EntityModifier}.
-         */
-        public Dialog createPhotoDialog() {
-            Context context = EditContactActivity.this;
-
-            // Wrap our context to inflate list items using correct theme
-            final Context dialogContext = new ContextThemeWrapper(context,
-                    android.R.style.Theme_Light);
-
-            String[] choices;
-            if (mReadOnly) {
-                choices = new String[1];
-                choices[0] = getString(R.string.use_photo_as_primary);
-            } else {
-                choices = new String[3];
-                choices[0] = getString(R.string.use_photo_as_primary);
-                choices[1] = getString(R.string.removePicture);
-                choices[2] = getString(R.string.changePicture);
-            }
-            final ListAdapter adapter = new ArrayAdapter<String>(dialogContext,
-                    android.R.layout.simple_list_item_1, choices);
-
-            final AlertDialog.Builder builder = new AlertDialog.Builder(dialogContext);
-            builder.setTitle(R.string.attachToContact);
-            builder.setSingleChoiceItems(adapter, -1, this);
-            return builder.create();
-        }
-
-        /**
-         * Called when something in the dialog is clicked
-         */
-        public void onClick(DialogInterface dialog, int which) {
-            dialog.dismiss();
-
-            switch (which) {
-                case 0:
-                    // Set the photo as super primary
-                    mEditor.setSuperPrimary(true);
-
-                    // And set all other photos as not super primary
-                    int count = mContent.getChildCount();
-                    for (int i = 0; i < count; i++) {
-                        View childView = mContent.getChildAt(i);
-                        if (childView instanceof BaseContactEditorView) {
-                            BaseContactEditorView editor = (BaseContactEditorView) childView;
-                            PhotoEditorView photoEditor = editor.getPhotoEditor();
-                            if (!photoEditor.equals(mEditor)) {
-                                photoEditor.setSuperPrimary(false);
-                            }
-                        }
-                    }
-                    break;
-
-                case 1:
-                    // Remove the photo
-                    mEditor.setPhotoBitmap(null);
-                    break;
-
-                case 2:
-                    // Pick a new photo for the contact
-                    doPickPhotoAction(mRawContactId);
-                    break;
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View view) {
-        switch (view.getId()) {
-            case R.id.btn_done:
-                doSaveAction(SAVE_MODE_DEFAULT);
-                break;
-            case R.id.btn_discard:
-                doRevertAction();
-                break;
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void onBackPressed() {
-        doSaveAction(SAVE_MODE_DEFAULT);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        // Ignore failed requests
-        if (resultCode != RESULT_OK) return;
-
-        switch (requestCode) {
-            case PHOTO_PICKED_WITH_DATA: {
-                BaseContactEditorView requestingEditor = null;
-                for (int i = 0; i < mContent.getChildCount(); i++) {
-                    View childView = mContent.getChildAt(i);
-                    if (childView instanceof BaseContactEditorView) {
-                        BaseContactEditorView editor = (BaseContactEditorView) childView;
-                        if (editor.getRawContactId() == mRawContactIdRequestingPhoto) {
-                            requestingEditor = editor;
-                            break;
-                        }
-                    }
-                }
-
-                if (requestingEditor != null) {
-                    final Bitmap photo = data.getParcelableExtra("data");
-                    requestingEditor.setPhotoBitmap(photo);
-                    mRawContactIdRequestingPhoto = -1;
-                } else {
-                    // The contact that requested the photo is no longer present.
-                    // TODO: Show error message
-                }
-
-                break;
-            }
-
-            case CAMERA_WITH_DATA: {
-                doCropPhoto(mCurrentPhotoFile);
-                break;
-            }
-
-            case REQUEST_JOIN_CONTACT: {
-                if (resultCode == RESULT_OK && data != null) {
-                    final long contactId = ContentUris.parseId(data.getData());
-                    joinAggregate(contactId);
-                }
-            }
-        }
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-
-        MenuInflater inflater = getMenuInflater();
-        inflater.inflate(R.menu.edit, menu);
-
-
-        return true;
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        menu.findItem(R.id.menu_split).setVisible(mState != null && mState.size() > 1);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.menu_done:
-                return doSaveAction(SAVE_MODE_DEFAULT);
-            case R.id.menu_discard:
-                return doRevertAction();
-            case R.id.menu_add:
-                return doAddAction();
-            case R.id.menu_delete:
-                return doDeleteAction();
-            case R.id.menu_split:
-                return doSplitContactAction();
-            case R.id.menu_join:
-                return doJoinContactAction();
-        }
-        return false;
-    }
-
-    /**
-     * Background task for persisting edited contact data, using the changes
-     * defined by a set of {@link EntityDelta}. This task starts
-     * {@link EmptyService} to make sure the background thread can finish
-     * persisting in cases where the system wants to reclaim our process.
-     */
-    public static class PersistTask extends
-            WeakAsyncTask<EntitySet, Void, Integer, EditContactActivity> {
-        private static final int PERSIST_TRIES = 3;
-
-        private static final int RESULT_UNCHANGED = 0;
-        private static final int RESULT_SUCCESS = 1;
-        private static final int RESULT_FAILURE = 2;
-
-        private WeakReference<ProgressDialog> mProgress;
-
-        private int mSaveMode;
-        private Uri mContactLookupUri = null;
-
-        public PersistTask(EditContactActivity target, int saveMode) {
-            super(target);
-            mSaveMode = saveMode;
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        protected void onPreExecute(EditContactActivity target) {
-            mProgress = new WeakReference<ProgressDialog>(ProgressDialog.show(target, null,
-                    target.getText(R.string.savingContact)));
-
-            // Before starting this task, start an empty service to protect our
-            // process from being reclaimed by the system.
-            final Context context = target;
-            context.startService(new Intent(context, EmptyService.class));
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        protected Integer doInBackground(EditContactActivity target, EntitySet... params) {
-            final Context context = target;
-            final ContentResolver resolver = context.getContentResolver();
-
-            EntitySet state = params[0];
-
-            // Trim any empty fields, and RawContacts, before persisting
-            final Sources sources = Sources.getInstance(context);
-            EntityModifier.trimEmpty(state, sources);
-
-            // Attempt to persist changes
-            int tries = 0;
-            Integer result = RESULT_FAILURE;
-            while (tries++ < PERSIST_TRIES) {
-                try {
-                    // Build operations and try applying
-                    final ArrayList<ContentProviderOperation> diff = state.buildDiff();
-                    ContentProviderResult[] results = null;
-                    if (!diff.isEmpty()) {
-                         results = resolver.applyBatch(ContactsContract.AUTHORITY, diff);
-                    }
-
-                    final long rawContactId = getRawContactId(state, diff, results);
-                    if (rawContactId != -1) {
-                        final Uri rawContactUri = ContentUris.withAppendedId(
-                                RawContacts.CONTENT_URI, rawContactId);
-
-                        // convert the raw contact URI to a contact URI
-                        mContactLookupUri = RawContacts.getContactLookupUri(resolver,
-                                rawContactUri);
-                    }
-                    result = (diff.size() > 0) ? RESULT_SUCCESS : RESULT_UNCHANGED;
-                    break;
-
-                } catch (RemoteException e) {
-                    // Something went wrong, bail without success
-                    Log.e(TAG, "Problem persisting user edits", e);
-                    break;
-
-                } catch (OperationApplicationException e) {
-                    // Version consistency failed, re-parent change and try again
-                    Log.w(TAG, "Version consistency failed, re-parenting: " + e.toString());
-                    final EntitySet newState = EntitySet.fromQuery(resolver,
-                            target.mQuerySelection, null, null);
-                    state = EntitySet.mergeAfter(newState, state);
-                }
-            }
-
-            return result;
-        }
-
-        private long getRawContactId(EntitySet state,
-                final ArrayList<ContentProviderOperation> diff,
-                final ContentProviderResult[] results) {
-            long rawContactId = state.findRawContactId();
-            if (rawContactId != -1) {
-                return rawContactId;
-            }
-
-            // we gotta do some searching for the id
-            final int diffSize = diff.size();
-            for (int i = 0; i < diffSize; i++) {
-                ContentProviderOperation operation = diff.get(i);
-                if (operation.getType() == ContentProviderOperation.TYPE_INSERT
-                        && operation.getUri().getEncodedPath().contains(
-                                RawContacts.CONTENT_URI.getEncodedPath())) {
-                    return ContentUris.parseId(results[i].uri);
-                }
-            }
-            return -1;
-        }
-
-        /** {@inheritDoc} */
-        @Override
-        protected void onPostExecute(EditContactActivity target, Integer result) {
-            final Context context = target;
-            final ProgressDialog progress = mProgress.get();
-
-            if (result == RESULT_SUCCESS && mSaveMode != SAVE_MODE_JOIN) {
-                Toast.makeText(context, R.string.contactSavedToast, Toast.LENGTH_SHORT).show();
-            } else if (result == RESULT_FAILURE) {
-                Toast.makeText(context, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
-            }
-
-            dismissDialog(progress);
-
-            // Stop the service that was protecting us
-            context.stopService(new Intent(context, EmptyService.class));
-
-            target.onSaveCompleted(result != RESULT_FAILURE, mSaveMode, mContactLookupUri);
-        }
-    }
-
-    /**
-     * Saves or creates the contact based on the mode, and if successful
-     * finishes the activity.
-     */
-    boolean doSaveAction(int saveMode) {
-        if (!hasValidState()) {
-            return false;
-        }
-
-        mStatus = STATUS_SAVING;
-        final PersistTask task = new PersistTask(this, saveMode);
-        task.execute(mState);
-
-        return true;
-    }
-
-    private class DeleteClickListener implements DialogInterface.OnClickListener {
-
-        public void onClick(DialogInterface dialog, int which) {
-            Sources sources = Sources.getInstance(EditContactActivity.this);
-            // Mark all raw contacts for deletion
-            for (EntityDelta delta : mState) {
-                delta.markDeleted();
-            }
-            // Save the deletes
-            doSaveAction(SAVE_MODE_DEFAULT);
-            finish();
-        }
-    }
-
-    private void onSaveCompleted(boolean success, int saveMode, Uri contactLookupUri) {
-        switch (saveMode) {
-            case SAVE_MODE_DEFAULT:
-                if (success && contactLookupUri != null) {
-                    final Intent resultIntent = new Intent();
-
-                    final Uri requestData = getIntent().getData();
-                    final String requestAuthority = requestData == null ? null : requestData
-                            .getAuthority();
-
-                    if (android.provider.Contacts.AUTHORITY.equals(requestAuthority)) {
-                        // Build legacy Uri when requested by caller
-                        final long contactId = ContentUris.parseId(Contacts.lookupContact(
-                                getContentResolver(), contactLookupUri));
-                        final Uri legacyUri = ContentUris.withAppendedId(
-                                android.provider.Contacts.People.CONTENT_URI, contactId);
-                        resultIntent.setData(legacyUri);
-                    } else {
-                        // Otherwise pass back a lookup-style Uri
-                        resultIntent.setData(contactLookupUri);
-                    }
-
-                    setResult(RESULT_OK, resultIntent);
-                } else {
-                    setResult(RESULT_CANCELED, null);
-                }
-                finish();
-                break;
-
-            case SAVE_MODE_SPLIT:
-                if (success) {
-                    Intent intent = new Intent();
-                    intent.setData(contactLookupUri);
-                    setResult(RESULT_CLOSE_VIEW_ACTIVITY, intent);
-                }
-                finish();
-                break;
-
-            case SAVE_MODE_JOIN:
-                mStatus = STATUS_EDITING;
-                if (success) {
-                    showJoinAggregateActivity(contactLookupUri);
-                }
-                break;
-        }
-    }
-
-    /**
-     * Shows a list of aggregates that can be joined into the currently viewed aggregate.
-     *
-     * @param contactLookupUri the fresh URI for the currently edited contact (after saving it)
-     */
-    public void showJoinAggregateActivity(Uri contactLookupUri) {
-        if (contactLookupUri == null) {
-            return;
-        }
-
-        mContactIdForJoin = ContentUris.parseId(contactLookupUri);
-        Intent intent = new Intent(ContactsListActivity.JOIN_AGGREGATE);
-        intent.putExtra(ContactsListActivity.EXTRA_AGGREGATE_ID, mContactIdForJoin);
-        startActivityForResult(intent, REQUEST_JOIN_CONTACT);
-    }
-
-    private interface JoinContactQuery {
-        String[] PROJECTION = {
-                RawContacts._ID,
-                RawContacts.CONTACT_ID,
-                RawContacts.NAME_VERIFIED,
-        };
-
-        String SELECTION = RawContacts.CONTACT_ID + "=? OR " + RawContacts.CONTACT_ID + "=?";
-
-        int _ID = 0;
-        int CONTACT_ID = 1;
-        int NAME_VERIFIED = 2;
-    }
-
-    /**
-     * Performs aggregation with the contact selected by the user from suggestions or A-Z list.
-     */
-    private void joinAggregate(final long contactId) {
-        ContentResolver resolver = getContentResolver();
-
-        // Load raw contact IDs for all raw contacts involved - currently edited and selected
-        // in the join UIs
-        Cursor c = resolver.query(RawContacts.CONTENT_URI,
-                JoinContactQuery.PROJECTION,
-                JoinContactQuery.SELECTION,
-                new String[]{String.valueOf(contactId), String.valueOf(mContactIdForJoin)}, null);
-
-        long rawContactIds[];
-        long verifiedNameRawContactId = -1;
-        try {
-            rawContactIds = new long[c.getCount()];
-            for (int i = 0; i < rawContactIds.length; i++) {
-                c.moveToNext();
-                long rawContactId = c.getLong(JoinContactQuery._ID);
-                rawContactIds[i] = rawContactId;
-                if (c.getLong(JoinContactQuery.CONTACT_ID) == mContactIdForJoin) {
-                    if (verifiedNameRawContactId == -1
-                            || c.getInt(JoinContactQuery.NAME_VERIFIED) != 0) {
-                        verifiedNameRawContactId = rawContactId;
-                    }
-                }
-            }
-        } finally {
-            c.close();
-        }
-
-        // For each pair of raw contacts, insert an aggregation exception
-        ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
-        for (int i = 0; i < rawContactIds.length; i++) {
-            for (int j = 0; j < rawContactIds.length; j++) {
-                if (i != j) {
-                    buildJoinContactDiff(operations, rawContactIds[i], rawContactIds[j]);
-                }
-            }
-        }
-
-        // Mark the original contact as "name verified" to make sure that the contact
-        // display name does not change as a result of the join
-        Builder builder = ContentProviderOperation.newUpdate(
-                    ContentUris.withAppendedId(RawContacts.CONTENT_URI, verifiedNameRawContactId));
-        builder.withValue(RawContacts.NAME_VERIFIED, 1);
-        operations.add(builder.build());
-
-        // Apply all aggregation exceptions as one batch
-        try {
-            getContentResolver().applyBatch(ContactsContract.AUTHORITY, operations);
-
-            // We can use any of the constituent raw contacts to refresh the UI - why not the first
-            Intent intent = new Intent();
-            intent.setData(ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactIds[0]));
-
-            // Reload the new state from database
-            new QueryEntitiesTask(this).execute(intent);
-
-            Toast.makeText(this, R.string.contactsJoinedMessage, Toast.LENGTH_LONG).show();
-        } catch (RemoteException e) {
-            Log.e(TAG, "Failed to apply aggregation exception batch", e);
-            Toast.makeText(this, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
-        } catch (OperationApplicationException e) {
-            Log.e(TAG, "Failed to apply aggregation exception batch", e);
-            Toast.makeText(this, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
-        }
-    }
-
-    /**
-     * Construct a {@link AggregationExceptions#TYPE_KEEP_TOGETHER} ContentProviderOperation.
-     */
-    private void buildJoinContactDiff(ArrayList<ContentProviderOperation> operations,
-            long rawContactId1, long rawContactId2) {
-        Builder builder =
-                ContentProviderOperation.newUpdate(AggregationExceptions.CONTENT_URI);
-        builder.withValue(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_TOGETHER);
-        builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId1);
-        builder.withValue(AggregationExceptions.RAW_CONTACT_ID2, rawContactId2);
-        operations.add(builder.build());
-    }
-
-    /**
-     * Revert any changes the user has made, and finish the activity.
-     */
-    private boolean doRevertAction() {
-        finish();
-        return true;
-    }
-
-    /**
-     * Create a new {@link RawContacts} which will exist as another
-     * {@link EntityDelta} under the currently edited {@link Contacts}.
-     */
-    private boolean doAddAction() {
-        if (mStatus != STATUS_EDITING) {
-            return false;
-        }
-
-        // Adding is okay when missing state
-        new AddContactTask(this).execute();
-        return true;
-    }
-
-    /**
-     * Delete the entire contact currently being edited, which usually asks for
-     * user confirmation before continuing.
-     */
-    private boolean doDeleteAction() {
-        if (!hasValidState())
-            return false;
-        int readOnlySourcesCnt = 0;
-        int writableSourcesCnt = 0;
-        Sources sources = Sources.getInstance(EditContactActivity.this);
-        for (EntityDelta delta : mState) {
-            final String accountType = delta.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
-            final ContactsSource contactsSource = sources.getInflatedSource(accountType,
-                    ContactsSource.LEVEL_CONSTRAINTS);
-            if (contactsSource != null && contactsSource.readOnly) {
-                readOnlySourcesCnt += 1;
-            } else {
-                writableSourcesCnt += 1;
-            }
-        }
-
-        if (readOnlySourcesCnt > 0 && writableSourcesCnt > 0) {
-            showDialog(DIALOG_CONFIRM_READONLY_DELETE);
-        } else if (readOnlySourcesCnt > 0 && writableSourcesCnt == 0) {
-            showDialog(DIALOG_CONFIRM_READONLY_HIDE);
-        } else if (readOnlySourcesCnt == 0 && writableSourcesCnt > 1) {
-            showDialog(DIALOG_CONFIRM_MULTIPLE_DELETE);
-        } else {
-            showDialog(DIALOG_CONFIRM_DELETE);
-        }
-        return true;
-    }
-
-    /**
-     * Pick a specific photo to be added under the currently selected tab.
-     */
-    boolean doPickPhotoAction(long rawContactId) {
-        if (!hasValidState()) return false;
-
-        mRawContactIdRequestingPhoto = rawContactId;
-
-        showAndManageDialog(createPickPhotoDialog());
-
-        return true;
-    }
-
-    /**
-     * Creates a dialog offering two options: take a photo or pick a photo from the gallery.
-     */
-    private Dialog createPickPhotoDialog() {
-        Context context = EditContactActivity.this;
-
-        // Wrap our context to inflate list items using correct theme
-        final Context dialogContext = new ContextThemeWrapper(context,
-                android.R.style.Theme_Light);
-
-        String[] choices;
-        choices = new String[2];
-        choices[0] = getString(R.string.take_photo);
-        choices[1] = getString(R.string.pick_photo);
-        final ListAdapter adapter = new ArrayAdapter<String>(dialogContext,
-                android.R.layout.simple_list_item_1, choices);
-
-        final AlertDialog.Builder builder = new AlertDialog.Builder(dialogContext);
-        builder.setTitle(R.string.attachToContact);
-        builder.setSingleChoiceItems(adapter, -1, new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                dialog.dismiss();
-                switch(which) {
-                    case 0:
-                        doTakePhoto();
-                        break;
-                    case 1:
-                        doPickPhotoFromGallery();
-                        break;
-                }
-            }
-        });
-        return builder.create();
-    }
-
-    /**
-     * Create a file name for the icon photo using current time.
-     */
-    private String getPhotoFileName() {
-        Date date = new Date(System.currentTimeMillis());
-        SimpleDateFormat dateFormat = new SimpleDateFormat("'IMG'_yyyyMMdd_HHmmss");
-        return dateFormat.format(date) + ".jpg";
-    }
-
-    /**
-     * Launches Camera to take a picture and store it in a file.
-     */
-    protected void doTakePhoto() {
-        try {
-            // Launch camera to take photo for selected contact
-            PHOTO_DIR.mkdirs();
-            mCurrentPhotoFile = new File(PHOTO_DIR, getPhotoFileName());
-            final Intent intent = getTakePickIntent(mCurrentPhotoFile);
-            startActivityForResult(intent, CAMERA_WITH_DATA);
-        } catch (ActivityNotFoundException e) {
-            Toast.makeText(this, R.string.photoPickerNotFoundText, Toast.LENGTH_LONG).show();
-        }
-    }
-
-    /**
-     * Constructs an intent for capturing a photo and storing it in a temporary file.
-     */
-    public static Intent getTakePickIntent(File f) {
-        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE, null);
-        intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));
-        return intent;
-    }
-
-    /**
-     * Sends a newly acquired photo to Gallery for cropping
-     */
-    protected void doCropPhoto(File f) {
-        try {
-
-            // Add the image to the media store
-            MediaScannerConnection.scanFile(
-                    this,
-                    new String[] { f.getAbsolutePath() },
-                    new String[] { null },
-                    null);
-
-            // Launch gallery to crop the photo
-            final Intent intent = getCropImageIntent(Uri.fromFile(f));
-            startActivityForResult(intent, PHOTO_PICKED_WITH_DATA);
-        } catch (Exception e) {
-            Log.e(TAG, "Cannot crop image", e);
-            Toast.makeText(this, R.string.photoPickerNotFoundText, Toast.LENGTH_LONG).show();
-        }
-    }
-
-    /**
-     * Constructs an intent for image cropping.
-     */
-    public static Intent getCropImageIntent(Uri photoUri) {
-        Intent intent = new Intent("com.android.camera.action.CROP");
-        intent.setDataAndType(photoUri, "image/*");
-        intent.putExtra("crop", "true");
-        intent.putExtra("aspectX", 1);
-        intent.putExtra("aspectY", 1);
-        intent.putExtra("outputX", ICON_SIZE);
-        intent.putExtra("outputY", ICON_SIZE);
-        intent.putExtra("return-data", true);
-        return intent;
-    }
-
-    /**
-     * Launches Gallery to pick a photo.
-     */
-    protected void doPickPhotoFromGallery() {
-        try {
-            // Launch picker to choose photo for selected contact
-            final Intent intent = getPhotoPickIntent();
-            startActivityForResult(intent, PHOTO_PICKED_WITH_DATA);
-        } catch (ActivityNotFoundException e) {
-            Toast.makeText(this, R.string.photoPickerNotFoundText, Toast.LENGTH_LONG).show();
-        }
-    }
-
-    /**
-     * Constructs an intent for picking a photo from Gallery, cropping it and returning the bitmap.
-     */
-    public static Intent getPhotoPickIntent() {
-        Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
-        intent.setType("image/*");
-        intent.putExtra("crop", "true");
-        intent.putExtra("aspectX", 1);
-        intent.putExtra("aspectY", 1);
-        intent.putExtra("outputX", ICON_SIZE);
-        intent.putExtra("outputY", ICON_SIZE);
-        intent.putExtra("return-data", true);
-        return intent;
-    }
-
-    /** {@inheritDoc} */
-    public void onDeleted(Editor editor) {
-        // Ignore any editor deletes
-    }
-
-    private boolean doSplitContactAction() {
-        if (!hasValidState()) return false;
-
-        showAndManageDialog(createSplitDialog());
-        return true;
-    }
-
-    private Dialog createSplitDialog() {
-        final AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setTitle(R.string.splitConfirmation_title);
-        builder.setIcon(android.R.drawable.ic_dialog_alert);
-        builder.setMessage(R.string.splitConfirmation);
-        builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                // Split the contacts
-                mState.splitRawContacts();
-                doSaveAction(SAVE_MODE_SPLIT);
-            }
-        });
-        builder.setNegativeButton(android.R.string.cancel, null);
-        builder.setCancelable(false);
-        return builder.create();
-    }
-
-    private boolean doJoinContactAction() {
-        return doSaveAction(SAVE_MODE_JOIN);
-    }
-
-    /**
-     * Build dialog that handles adding a new {@link RawContacts} after the user
-     * picks a specific {@link ContactsSource}.
-     */
-    private static class AddContactTask extends
-            WeakAsyncTask<Void, Void, ArrayList<Account>, EditContactActivity> {
-
-        public AddContactTask(EditContactActivity target) {
-            super(target);
-        }
-
-        @Override
-        protected ArrayList<Account> doInBackground(final EditContactActivity target,
-                Void... params) {
-            return Sources.getInstance(target).getAccounts(true);
-        }
-
-        @Override
-        protected void onPostExecute(final EditContactActivity target, ArrayList<Account> accounts) {
-            if (!target.mActivityActive) {
-                // A monkey or very fast user.
-                return;
-            }
-            target.selectAccountAndCreateContact(accounts);
-        }
-    }
-
-    public void selectAccountAndCreateContact(ArrayList<Account> accounts) {
-        // No Accounts available.  Create a phone-local contact.
-        if (accounts.isEmpty()) {
-            createContact(null);
-            return;  // Don't show a dialog.
-        }
-
-        // In the common case of a single account being writable, auto-select
-        // it without showing a dialog.
-        if (accounts.size() == 1) {
-            createContact(accounts.get(0));
-            return;  // Don't show a dialog.
-        }
-
-        // Wrap our context to inflate list items using correct theme
-        final Context dialogContext = new ContextThemeWrapper(this, android.R.style.Theme_Light);
-        final LayoutInflater dialogInflater =
-            (LayoutInflater)dialogContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-
-        final Sources sources = Sources.getInstance(this);
-
-        final ArrayAdapter<Account> accountAdapter = new ArrayAdapter<Account>(this,
-                android.R.layout.simple_list_item_2, accounts) {
-            @Override
-            public View getView(int position, View convertView, ViewGroup parent) {
-                if (convertView == null) {
-                    convertView = dialogInflater.inflate(android.R.layout.simple_list_item_2,
-                            parent, false);
-                }
-
-                // TODO: show icon along with title
-                final TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
-                final TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
-
-                final Account account = this.getItem(position);
-                final ContactsSource source = sources.getInflatedSource(account.type,
-                        ContactsSource.LEVEL_SUMMARY);
-
-                text1.setText(account.name);
-                text2.setText(source.getDisplayLabel(EditContactActivity.this));
-
-                return convertView;
-            }
-        };
-
-        final DialogInterface.OnClickListener clickListener =
-                new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                dialog.dismiss();
-
-                // Create new contact based on selected source
-                final Account account = accountAdapter.getItem(which);
-                createContact(account);
-            }
-        };
-
-        final DialogInterface.OnCancelListener cancelListener =
-                new DialogInterface.OnCancelListener() {
-            public void onCancel(DialogInterface dialog) {
-                // If nothing remains, close activity
-                if (!hasValidState()) {
-                    finish();
-                }
-            }
-        };
-
-        final AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setTitle(R.string.dialog_new_contact_account);
-        builder.setSingleChoiceItems(accountAdapter, 0, clickListener);
-        builder.setOnCancelListener(cancelListener);
-        showAndManageDialog(builder.create());
-    }
-
-    /**
-     * @param account may be null to signal a device-local contact should
-     *     be created.
-     */
-    private void createContact(Account account) {
-        final Sources sources = Sources.getInstance(this);
-        final ContentValues values = new ContentValues();
-        if (account != null) {
-            values.put(RawContacts.ACCOUNT_NAME, account.name);
-            values.put(RawContacts.ACCOUNT_TYPE, account.type);
-        } else {
-            values.putNull(RawContacts.ACCOUNT_NAME);
-            values.putNull(RawContacts.ACCOUNT_TYPE);
-        }
-
-        // Parse any values from incoming intent
-        EntityDelta insert = new EntityDelta(ValuesDelta.fromAfter(values));
-        final ContactsSource source = sources.getInflatedSource(
-            account != null ? account.type : null,
-            ContactsSource.LEVEL_CONSTRAINTS);
-        final Bundle extras = getIntent().getExtras();
-        EntityModifier.parseExtras(this, source, insert, extras);
-
-        // Ensure we have some default fields
-        EntityModifier.ensureKindExists(insert, source, Phone.CONTENT_ITEM_TYPE);
-        EntityModifier.ensureKindExists(insert, source, Email.CONTENT_ITEM_TYPE);
-
-        // Create "My Contacts" membership for Google contacts
-        // TODO: move this off into "templates" for each given source
-        if (GoogleSource.ACCOUNT_TYPE.equals(source.accountType)) {
-            GoogleSource.attemptMyContactsMembership(insert, this);
-        }
-
-        if (mState == null) {
-            // Create state if none exists yet
-            mState = EntitySet.fromSingle(insert);
-        } else {
-            // Add contact onto end of existing state
-            mState.add(insert);
-        }
-
-        bindEditors();
-    }
-
-    /**
-     * Compare EntityDeltas for sorting the stack of editors.
-     */
-    public int compare(EntityDelta one, EntityDelta two) {
-        // Check direct equality
-        if (one.equals(two)) {
-            return 0;
-        }
-
-        final Sources sources = Sources.getInstance(this);
-        String accountType = one.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
-        final ContactsSource oneSource = sources.getInflatedSource(accountType,
-                ContactsSource.LEVEL_SUMMARY);
-        accountType = two.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
-        final ContactsSource twoSource = sources.getInflatedSource(accountType,
-                ContactsSource.LEVEL_SUMMARY);
-
-        // Check read-only
-        if (oneSource.readOnly && !twoSource.readOnly) {
-            return 1;
-        } else if (twoSource.readOnly && !oneSource.readOnly) {
-            return -1;
-        }
-
-        // Check account type
-        boolean skipAccountTypeCheck = false;
-        boolean oneIsGoogle = oneSource instanceof GoogleSource;
-        boolean twoIsGoogle = twoSource instanceof GoogleSource;
-        if (oneIsGoogle && !twoIsGoogle) {
-            return -1;
-        } else if (twoIsGoogle && !oneIsGoogle) {
-            return 1;
-        } else if (oneIsGoogle && twoIsGoogle){
-            skipAccountTypeCheck = true;
-        }
-
-        int value;
-        if (!skipAccountTypeCheck) {
-            if (oneSource.accountType == null) {
-                return 1;
-            }
-            value = oneSource.accountType.compareTo(twoSource.accountType);
-            if (value != 0) {
-                return value;
-            }
-        }
-
-        // Check account name
-        ValuesDelta oneValues = one.getValues();
-        String oneAccount = oneValues.getAsString(RawContacts.ACCOUNT_NAME);
-        if (oneAccount == null) oneAccount = "";
-        ValuesDelta twoValues = two.getValues();
-        String twoAccount = twoValues.getAsString(RawContacts.ACCOUNT_NAME);
-        if (twoAccount == null) twoAccount = "";
-        value = oneAccount.compareTo(twoAccount);
-        if (value != 0) {
-            return value;
-        }
-
-        // Both are in the same account, fall back to contact ID
-        Long oneId = oneValues.getAsLong(RawContacts._ID);
-        Long twoId = twoValues.getAsLong(RawContacts._ID);
-        if (oneId == null) {
-            return -1;
-        } else if (twoId == null) {
-            return 1;
-        }
-
-        return (int)(oneId - twoId);
-    }
-
-    @Override
-    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
-            boolean globalSearch) {
-        if (globalSearch) {
-            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-        } else {
-            ContactsSearchManager.startSearch(this, initialQuery);
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/QuickContactActivity.java b/src/com/android/contacts/ui/QuickContactActivity.java
deleted file mode 100644
index ec8f44d..0000000
--- a/src/com/android/contacts/ui/QuickContactActivity.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui;
-
-import com.android.contacts.StickyTabs;
-
-import android.app.Activity;
-import android.content.ContentUris;
-import android.content.Intent;
-import android.graphics.Rect;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.ContactsContract.QuickContact;
-import android.provider.ContactsContract.RawContacts;
-import android.util.Log;
-
-/**
- * Stub translucent activity that just shows {@link QuickContactWindow} floating
- * above the caller. This temporary hack should eventually be replaced with
- * direct framework support.
- */
-public final class QuickContactActivity extends Activity implements
-        QuickContactWindow.OnDismissListener {
-    private static final String TAG = "QuickContactActivity";
-
-    static final boolean LOGV = false;
-    static final boolean FORCE_CREATE = false;
-
-    private QuickContactWindow mQuickContact;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        if (LOGV) Log.d(TAG, "onCreate");
-
-        this.onNewIntent(getIntent());
-    }
-
-    @Override
-    public void onNewIntent(Intent intent) {
-        super.onNewIntent(intent);
-        if (LOGV) Log.d(TAG, "onNewIntent");
-
-        if (QuickContactWindow.TRACE_LAUNCH) {
-            android.os.Debug.startMethodTracing(QuickContactWindow.TRACE_TAG);
-        }
-
-        if (mQuickContact == null || FORCE_CREATE) {
-            if (LOGV) Log.d(TAG, "Preparing window");
-            mQuickContact = new QuickContactWindow(this, this);
-        }
-        mQuickContact.setLastSelectedContactsAppTab(StickyTabs.getTab(intent));
-
-        // Use our local window token for now
-        Uri lookupUri = intent.getData();
-        // Check to see whether it comes from the old version.
-        if (android.provider.Contacts.AUTHORITY.equals(lookupUri.getAuthority())) {
-            final long rawContactId = ContentUris.parseId(lookupUri);
-            lookupUri = RawContacts.getContactLookupUri(getContentResolver(),
-                    ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
-        }
-        final Bundle extras = intent.getExtras();
-
-        // Read requested parameters for displaying
-        final Rect target = intent.getSourceBounds();
-        final int mode = extras.getInt(QuickContact.EXTRA_MODE, QuickContact.MODE_MEDIUM);
-        final String[] excludeMimes = extras.getStringArray(QuickContact.EXTRA_EXCLUDE_MIMES);
-
-        mQuickContact.show(lookupUri, target, mode, excludeMimes);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void onBackPressed() {
-        if (LOGV) Log.w(TAG, "Unexpected back captured by stub activity");
-        finish();
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        if (LOGV) Log.d(TAG, "onPause");
-
-        // Dismiss any dialog when pausing
-        mQuickContact.dismiss();
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        if (LOGV) Log.d(TAG, "onDestroy");
-    }
-
-    /** {@inheritDoc} */
-    public void onDismiss(QuickContactWindow dialog) {
-        if (LOGV) Log.d(TAG, "onDismiss");
-
-        if (isTaskRoot() && !FORCE_CREATE) {
-            // Instead of stopping, simply push this to the back of the stack.
-            // This is only done when running at the top of the stack;
-            // otherwise, we have been launched by someone else so need to
-            // allow the user to go back to the caller.
-            moveTaskToBack(false);
-        } else {
-            finish();
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/QuickContactWindow.java b/src/com/android/contacts/ui/QuickContactWindow.java
deleted file mode 100644
index 889749e..0000000
--- a/src/com/android/contacts/ui/QuickContactWindow.java
+++ /dev/null
@@ -1,1719 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui;
-
-import com.android.contacts.Collapser;
-import com.android.contacts.ContactPresenceIconUtil;
-import com.android.contacts.ContactsUtils;
-import com.android.contacts.R;
-import com.android.contacts.StickyTabs;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.Sources;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.ui.widget.CheckableImageView;
-import com.android.contacts.util.Constants;
-import com.android.contacts.util.DataStatus;
-import com.android.contacts.util.NotifyingAsyncQueryHandler;
-import com.android.internal.policy.PolicyManager;
-import com.google.android.collect.Sets;
-
-import android.content.ActivityNotFoundException;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
-import android.content.res.Resources;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Rect;
-import android.graphics.drawable.Drawable;
-import android.net.Uri;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.QuickContact;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.StatusUpdates;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Im;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.provider.ContactsContract.CommonDataKinds.SipAddress;
-import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
-import android.provider.ContactsContract.CommonDataKinds.Website;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.ContextThemeWrapper;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.ViewStub;
-import android.view.Window;
-import android.view.WindowManager;
-import android.view.ViewTreeObserver.OnGlobalLayoutListener;
-import android.view.accessibility.AccessibilityEvent;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.view.animation.Interpolator;
-import android.widget.AbsListView;
-import android.widget.AdapterView;
-import android.widget.BaseAdapter;
-import android.widget.CheckBox;
-import android.widget.CompoundButton;
-import android.widget.HorizontalScrollView;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-/**
- * Window that shows QuickContact dialog for a specific {@link Contacts#_ID}.
- */
-public class QuickContactWindow implements Window.Callback,
-        NotifyingAsyncQueryHandler.AsyncQueryListener, View.OnClickListener,
-        AbsListView.OnItemClickListener, CompoundButton.OnCheckedChangeListener, KeyEvent.Callback,
-        OnGlobalLayoutListener {
-    private static final String TAG = "QuickContactWindow";
-
-    /**
-     * Interface used to allow the person showing a {@link QuickContactWindow} to
-     * know when the window has been dismissed.
-     */
-    public interface OnDismissListener {
-        public void onDismiss(QuickContactWindow dialog);
-    }
-
-    /**
-     * Custom layout the sole purpose of which is to intercept the BACK key and
-     * close QC even when the soft keyboard is open.
-     */
-    public static class RootLayout extends RelativeLayout {
-
-        QuickContactWindow mQuickContactWindow;
-
-        public RootLayout(Context context, AttributeSet attrs) {
-            super(context, attrs);
-        }
-
-        /**
-         * Intercepts the BACK key event and dismisses QuickContact window.
-         */
-        @Override
-        public boolean dispatchKeyEventPreIme(KeyEvent event) {
-            if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
-                mQuickContactWindow.onBackPressed();
-                return true;
-            } else {
-                return super.dispatchKeyEventPreIme(event);
-            }
-        }
-    }
-
-    private final Context mContext;
-    private final LayoutInflater mInflater;
-    private final WindowManager mWindowManager;
-    private Window mWindow;
-    private View mDecor;
-    private final Rect mRect = new Rect();
-
-    private boolean mDismissed = false;
-    private boolean mQuerying = false;
-    private boolean mShowing = false;
-
-    private NotifyingAsyncQueryHandler mHandler;
-    private OnDismissListener mDismissListener;
-    private ResolveCache mResolveCache;
-
-    /** Last selected tab of the Dialtacs-Activity. This is -1 if not called out of contacts app */
-    private int mLastSelectedContactsAppTab;
-
-    private Uri mLookupUri;
-    private Rect mAnchor;
-
-    private int mShadowHoriz;
-    private int mShadowVert;
-    private int mShadowTouch;
-
-    private int mScreenWidth;
-    private int mScreenHeight;
-    private int mRequestedY;
-
-    private boolean mHasValidSocial = false;
-    private boolean mMakePrimary = false;
-
-    private ImageView mArrowUp;
-    private ImageView mArrowDown;
-
-    private int mMode;
-    private RootLayout mRootView;
-    private View mHeader;
-    private HorizontalScrollView mTrackScroll;
-    private ViewGroup mTrack;
-    private Animation mTrackAnim;
-
-    private View mFooter;
-    private View mFooterDisambig;
-    private ListView mResolveList;
-    private CheckableImageView mLastAction;
-    private CheckBox mSetPrimaryCheckBox;
-
-    private int mWindowRecycled = 0;
-    private int mActionRecycled = 0;
-
-    /**
-     * Set of {@link Action} that are associated with the aggregate currently
-     * displayed by this dialog, represented as a map from {@link String}
-     * MIME-type to {@link ActionList}.
-     */
-    private ActionMap mActions = new ActionMap();
-
-    /**
-     * Pool of unused {@link CheckableImageView} that have previously been
-     * inflated, and are ready to be recycled through {@link #obtainView()}.
-     */
-    private LinkedList<View> mActionPool = new LinkedList<View>();
-
-    private String[] mExcludeMimes;
-
-    /**
-     * {@link #PRECEDING_MIMETYPES} and {@link #FOLLOWING_MIMETYPES} are used to sort MIME-types.
-     *
-     * <p>The MIME-types in {@link #PRECEDING_MIMETYPES} appear in the front of the dialog,
-     * in the order in the array.
-     *
-     * <p>The ones in {@link #FOLLOWING_MIMETYPES} appear in the end of the dialog, in alphabetical
-     * order.
-     *
-     * <p>The rest go between them, in the order in the array.
-     */
-    private static final String[] PRECEDING_MIMETYPES = new String[] {
-            Phone.CONTENT_ITEM_TYPE,
-            SipAddress.CONTENT_ITEM_TYPE,
-            Contacts.CONTENT_ITEM_TYPE,
-            Constants.MIME_SMS_ADDRESS,
-            Email.CONTENT_ITEM_TYPE,
-    };
-
-    /**
-     * See {@link #PRECEDING_MIMETYPES}.
-     */
-    private static final String[] FOLLOWING_MIMETYPES = new String[] {
-            StructuredPostal.CONTENT_ITEM_TYPE,
-            Website.CONTENT_ITEM_TYPE,
-    };
-
-    /**
-     * Specific list {@link ApplicationInfo#packageName} of apps that are
-     * prefered <strong>only</strong> for the purposes of default icons when
-     * multiple {@link ResolveInfo} are found to match. This only happens when
-     * the user has not selected a default app yet, and they will still be
-     * presented with the system disambiguation dialog.
-     */
-    private static final HashSet<String> sPreferResolve = Sets.newHashSet(
-            "com.android.email",
-            "com.android.calendar",
-            "com.android.contacts",
-            "com.android.mms",
-            "com.android.phone",
-            "com.android.browser");
-
-    private static final int TOKEN_DATA = 1;
-
-    static final boolean LOGD = false;
-
-    static final boolean TRACE_LAUNCH = false;
-    static final String TRACE_TAG = "quickcontact";
-
-    /**
-     * Prepare a dialog to show in the given {@link Context}.
-     */
-    public QuickContactWindow(Context context) {
-        mContext = new ContextThemeWrapper(context, R.style.QuickContact);
-        mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-        mWindowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
-
-        mWindow = PolicyManager.makeNewWindow(mContext);
-        mWindow.setCallback(this);
-        mWindow.setWindowManager(mWindowManager, null, null);
-        mWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED);
-
-        mWindow.setContentView(R.layout.quickcontact);
-
-        mRootView = (RootLayout)mWindow.findViewById(R.id.root);
-        mRootView.mQuickContactWindow = this;
-        mRootView.setFocusable(true);
-        mRootView.setFocusableInTouchMode(true);
-        mRootView.setDescendantFocusability(RootLayout.FOCUS_AFTER_DESCENDANTS);
-
-        mArrowUp = (ImageView)mWindow.findViewById(R.id.arrow_up);
-        mArrowDown = (ImageView)mWindow.findViewById(R.id.arrow_down);
-
-        mResolveCache = new ResolveCache(mContext);
-
-        final Resources res = mContext.getResources();
-        mShadowHoriz = res.getDimensionPixelSize(R.dimen.quickcontact_shadow_horiz);
-        mShadowVert = res.getDimensionPixelSize(R.dimen.quickcontact_shadow_vert);
-        mShadowTouch = res.getDimensionPixelSize(R.dimen.quickcontact_shadow_touch);
-
-        mScreenWidth = mWindowManager.getDefaultDisplay().getWidth();
-        mScreenHeight = mWindowManager.getDefaultDisplay().getHeight();
-
-        mTrack = (ViewGroup)mWindow.findViewById(R.id.quickcontact);
-        mTrackScroll = (HorizontalScrollView)mWindow.findViewById(R.id.scroll);
-
-        mFooter = mWindow.findViewById(R.id.footer);
-        mFooterDisambig = mWindow.findViewById(R.id.footer_disambig);
-        mResolveList = (ListView)mWindow.findViewById(android.R.id.list);
-        mSetPrimaryCheckBox = (CheckBox)mWindow.findViewById(android.R.id.checkbox);
-
-        mSetPrimaryCheckBox.setOnCheckedChangeListener(this);
-
-        // Prepare track entrance animation
-        mTrackAnim = AnimationUtils.loadAnimation(mContext, R.anim.quickcontact);
-        mTrackAnim.setInterpolator(new Interpolator() {
-            public float getInterpolation(float t) {
-                // Pushes past the target area, then snaps back into place.
-                // Equation for graphing: 1.2-((x*1.6)-1.1)^2
-                final float inner = (t * 1.55f) - 1.1f;
-                return 1.2f - inner * inner;
-            }
-        });
-
-        mHandler = new NotifyingAsyncQueryHandler(mContext, this);
-    }
-
-    /**
-     * Prepare a dialog to show in the given {@link Context}, and notify the
-     * given {@link OnDismissListener} each time this dialog is dismissed.
-     */
-    public QuickContactWindow(Context context, OnDismissListener dismissListener) {
-        this(context);
-        mDismissListener = dismissListener;
-    }
-
-    public void setLastSelectedContactsAppTab(int value) {
-        mLastSelectedContactsAppTab = value;
-    }
-
-    private View getHeaderView(int mode) {
-        View header = null;
-        switch (mode) {
-            case QuickContact.MODE_SMALL:
-                header = mWindow.findViewById(R.id.header_small);
-                break;
-            case QuickContact.MODE_MEDIUM:
-                header = mWindow.findViewById(R.id.header_medium);
-                break;
-            case QuickContact.MODE_LARGE:
-                header = mWindow.findViewById(R.id.header_large);
-                break;
-        }
-
-        if (header instanceof ViewStub) {
-            // Inflate actual header if we picked a stub
-            final ViewStub stub = (ViewStub)header;
-            header = stub.inflate();
-        } else if (header != null) {
-            header.setVisibility(View.VISIBLE);
-        }
-
-        return header;
-    }
-
-    /**
-     * Start showing a dialog for the given {@link Contacts#_ID} pointing
-     * towards the given location.
-     */
-    public synchronized void show(Uri lookupUri, Rect anchor, int mode, String[] excludeMimes) {
-        if (mQuerying || mShowing) {
-            Log.w(TAG, "dismissing before showing");
-            dismissInternal();
-        }
-
-        if (TRACE_LAUNCH && !android.os.Debug.isMethodTracingActive()) {
-            android.os.Debug.startMethodTracing(TRACE_TAG);
-        }
-
-        // Validate incoming parameters
-        final boolean validMode = (mode == QuickContact.MODE_SMALL
-                || mode == QuickContact.MODE_MEDIUM || mode == QuickContact.MODE_LARGE);
-        if (!validMode) {
-            throw new IllegalArgumentException("Invalid mode, expecting MODE_LARGE, "
-                    + "MODE_MEDIUM, or MODE_SMALL");
-        }
-
-        if (anchor == null) {
-            throw new IllegalArgumentException("Missing anchor rectangle");
-        }
-
-        // Prepare header view for requested mode
-        mLookupUri = lookupUri;
-        mAnchor = new Rect(anchor);
-        mMode = mode;
-        mExcludeMimes = excludeMimes;
-
-        mHeader = getHeaderView(mode);
-
-        setHeaderText(R.id.name, R.string.quickcontact_missing_name);
-
-        setHeaderText(R.id.status, null);
-        setHeaderText(R.id.timestamp, null);
-
-        setHeaderImage(R.id.presence, null);
-
-        resetTrack();
-
-        // We need to have a focused view inside the QuickContact window so
-        // that the BACK key event can be intercepted
-        mRootView.requestFocus();
-
-        mHasValidSocial = false;
-        mDismissed = false;
-        mQuerying = true;
-
-        // Start background query for data, but only select photo rows when they
-        // directly match the super-primary PHOTO_ID.
-        final Uri dataUri = getDataUri(lookupUri);
-        mHandler.cancelOperation(TOKEN_DATA);
-
-        // Only request photo data when required by mode
-        if (mMode == QuickContact.MODE_LARGE) {
-            // Select photos, but only super-primary
-            mHandler.startQuery(TOKEN_DATA, lookupUri, dataUri, DataQuery.PROJECTION, Data.MIMETYPE
-                    + "!=? OR (" + Data.MIMETYPE + "=? AND " + Data._ID + "=" + Contacts.PHOTO_ID
-                    + ")", new String[] { Photo.CONTENT_ITEM_TYPE, Photo.CONTENT_ITEM_TYPE }, null);
-        } else {
-            // Exclude all photos from cursor
-            mHandler.startQuery(TOKEN_DATA, lookupUri, dataUri, DataQuery.PROJECTION, Data.MIMETYPE
-                    + "!=?", new String[] { Photo.CONTENT_ITEM_TYPE }, null);
-        }
-    }
-
-    /**
-     * Build a {@link Uri} into the {@link Data} table for the requested
-     * {@link Contacts#CONTENT_LOOKUP_URI} style {@link Uri}.
-     */
-    private Uri getDataUri(Uri lookupUri) {
-        // TODO: Formalize method of extracting LOOKUP_KEY
-        final List<String> path = lookupUri.getPathSegments();
-        final boolean validLookup = path.size() >= 3 && "lookup".equals(path.get(1));
-        if (!validLookup) {
-            // We only accept valid lookup-style Uris
-            throw new IllegalArgumentException("Expecting lookup-style Uri");
-        } else if (path.size() == 3) {
-            // No direct _ID provided, so force a lookup
-            lookupUri = Contacts.lookupContact(mContext.getContentResolver(), lookupUri);
-        }
-
-        final long contactId = ContentUris.parseId(lookupUri);
-        return Uri.withAppendedPath(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId),
-                Contacts.Data.CONTENT_DIRECTORY);
-    }
-
-    /**
-     * Show the correct call-out arrow based on a {@link R.id} reference.
-     */
-    private void showArrow(int whichArrow, int requestedX) {
-        final View showArrow = (whichArrow == R.id.arrow_up) ? mArrowUp : mArrowDown;
-        final View hideArrow = (whichArrow == R.id.arrow_up) ? mArrowDown : mArrowUp;
-
-        final int arrowWidth = mArrowUp.getMeasuredWidth();
-
-        showArrow.setVisibility(View.VISIBLE);
-        ViewGroup.MarginLayoutParams param = (ViewGroup.MarginLayoutParams)showArrow.getLayoutParams();
-        param.leftMargin = requestedX - arrowWidth / 2;
-
-        hideArrow.setVisibility(View.INVISIBLE);
-    }
-
-    /**
-     * Actual internal method to show this dialog. Called only by
-     * {@link #considerShowing()} when all data requirements have been met.
-     */
-    private void showInternal() {
-        mDecor = mWindow.getDecorView();
-        mDecor.getViewTreeObserver().addOnGlobalLayoutListener(this);
-        WindowManager.LayoutParams l = mWindow.getAttributes();
-
-        l.width = mScreenWidth + mShadowHoriz + mShadowHoriz;
-        l.height = WindowManager.LayoutParams.WRAP_CONTENT;
-
-        // Force layout measuring pass so we have baseline numbers
-        mDecor.measure(l.width, l.height);
-        final int blockHeight = mDecor.getMeasuredHeight();
-
-        l.gravity = Gravity.TOP | Gravity.LEFT;
-        l.x = -mShadowHoriz;
-
-        if (mAnchor.top > blockHeight) {
-            // Show downwards callout when enough room, aligning bottom block
-            // edge with top of anchor area, and adjusting to inset arrow.
-            showArrow(R.id.arrow_down, mAnchor.centerX());
-            l.y = mAnchor.top - blockHeight + mShadowVert;
-            l.windowAnimations = R.style.QuickContactAboveAnimation;
-
-        } else {
-            // Otherwise show upwards callout, aligning block top with bottom of
-            // anchor area, and adjusting to inset arrow.
-            showArrow(R.id.arrow_up, mAnchor.centerX());
-            l.y = mAnchor.bottom - mShadowVert;
-            l.windowAnimations = R.style.QuickContactBelowAnimation;
-
-        }
-
-        l.flags = WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-                | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS;
-
-        mRequestedY = l.y;
-        mWindowManager.addView(mDecor, l);
-        mShowing = true;
-        mQuerying = false;
-        mDismissed = false;
-
-        mTrack.startAnimation(mTrackAnim);
-
-        if (TRACE_LAUNCH) {
-            android.os.Debug.stopMethodTracing();
-            Log.d(TAG, "Window recycled " + mWindowRecycled + " times, chiclets "
-                    + mActionRecycled + " times");
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onGlobalLayout() {
-        layoutInScreen();
-    }
-
-    /**
-     * Adjust vertical {@link WindowManager.LayoutParams} to fit window as best
-     * as possible, shifting up to display content as needed.
-     */
-    private void layoutInScreen() {
-        if (!mShowing) return;
-
-        final WindowManager.LayoutParams l = mWindow.getAttributes();
-        final int originalY = l.y;
-
-        final int blockHeight = mDecor.getHeight();
-
-        l.y = mRequestedY;
-        if (mRequestedY + blockHeight > mScreenHeight) {
-            // Shift up from bottom when overflowing
-            l.y = mScreenHeight - blockHeight;
-        }
-
-        if (originalY != l.y) {
-            // Only update when value is changed
-            mWindow.setAttributes(l);
-        }
-    }
-
-    /**
-     * Dismiss this dialog if showing.
-     */
-    public synchronized void dismiss() {
-        // Notify any listeners that we've been dismissed
-        if (mDismissListener != null) {
-            mDismissListener.onDismiss(this);
-        }
-
-        dismissInternal();
-    }
-
-    private void dismissInternal() {
-        // Remove any attached window decor for recycling
-        boolean hadDecor = mDecor != null;
-        if (hadDecor) {
-            mWindowManager.removeView(mDecor);
-            mWindowRecycled++;
-            mDecor.getViewTreeObserver().removeGlobalOnLayoutListener(this);
-            mDecor = null;
-            mWindow.closeAllPanels();
-        }
-        mShowing = false;
-        mDismissed = true;
-
-        // Cancel any pending queries
-        mHandler.cancelOperation(TOKEN_DATA);
-        mQuerying = false;
-
-        // Completely hide header and reset track
-        mHeader.setVisibility(View.GONE);
-        resetTrack();
-    }
-
-    /**
-     * Reset track to initial state, recycling any chiclets.
-     */
-    private void resetTrack() {
-        // Release reference to last chiclet
-        mLastAction = null;
-
-        // Clear track actions and scroll to hard left
-        mResolveCache.clear();
-        mActions.clear();
-
-        // Recycle any chiclets in use
-        while (mTrack.getChildCount() > 2) {
-            this.releaseView(mTrack.getChildAt(1));
-            mTrack.removeViewAt(1);
-        }
-
-        mTrackScroll.fullScroll(View.FOCUS_LEFT);
-        mWasDownArrow = false;
-
-        // Clear any primary requests
-        mMakePrimary = false;
-        mSetPrimaryCheckBox.setChecked(false);
-
-        setResolveVisible(false, null);
-    }
-
-    /**
-     * Consider showing this window, which will only call through to
-     * {@link #showInternal()} when all data items are present.
-     */
-    private void considerShowing() {
-        if (!mShowing && !mDismissed) {
-            if (mMode == QuickContact.MODE_MEDIUM && !mHasValidSocial) {
-                // Missing valid social, swap medium for small header
-                mHeader.setVisibility(View.GONE);
-                mHeader = getHeaderView(QuickContact.MODE_SMALL);
-            }
-
-            // All queries have returned, pull curtain
-            showInternal();
-        }
-    }
-
-    /** {@inheritDoc} */
-    public synchronized void onQueryComplete(int token, Object cookie, Cursor cursor) {
-        // Bail early when query is stale
-        if (cookie != mLookupUri) return;
-
-        if (cursor == null) {
-            // Problem while running query, so bail without showing
-            Log.w(TAG, "Missing cursor for token=" + token);
-            this.dismiss();
-            return;
-        }
-
-        handleData(cursor);
-
-        if (!cursor.isClosed()) {
-            cursor.close();
-        }
-
-        considerShowing();
-    }
-
-    /** Assign this string to the view, if found in {@link #mHeader}. */
-    private void setHeaderText(int id, int resId) {
-        setHeaderText(id, mContext.getResources().getText(resId));
-    }
-
-    /** Assign this string to the view, if found in {@link #mHeader}. */
-    private void setHeaderText(int id, CharSequence value) {
-        final View view = mHeader.findViewById(id);
-        if (view instanceof TextView) {
-            ((TextView)view).setText(value);
-            view.setVisibility(TextUtils.isEmpty(value) ? View.GONE : View.VISIBLE);
-        }
-    }
-
-    /** Assign this image to the view, if found in {@link #mHeader}. */
-    private void setHeaderImage(int id, Drawable drawable) {
-        final View view = mHeader.findViewById(id);
-        if (view instanceof ImageView) {
-            ((ImageView)view).setImageDrawable(drawable);
-            view.setVisibility(drawable == null ? View.GONE : View.VISIBLE);
-        }
-    }
-
-    /**
-     * Find the QuickContact-specific presence icon for showing in chiclets.
-     */
-    private Drawable getTrackPresenceIcon(int status) {
-        int resId;
-        switch (status) {
-            case StatusUpdates.AVAILABLE:
-                resId = R.drawable.quickcontact_slider_presence_active;
-                break;
-            case StatusUpdates.IDLE:
-            case StatusUpdates.AWAY:
-                resId = R.drawable.quickcontact_slider_presence_away;
-                break;
-            case StatusUpdates.DO_NOT_DISTURB:
-                resId = R.drawable.quickcontact_slider_presence_busy;
-                break;
-            case StatusUpdates.INVISIBLE:
-                resId = R.drawable.quickcontact_slider_presence_inactive;
-                break;
-            case StatusUpdates.OFFLINE:
-            default:
-                resId = R.drawable.quickcontact_slider_presence_inactive;
-        }
-        return mContext.getResources().getDrawable(resId);
-    }
-
-    /** Read {@link String} from the given {@link Cursor}. */
-    private static String getAsString(Cursor cursor, String columnName) {
-        final int index = cursor.getColumnIndex(columnName);
-        return cursor.getString(index);
-    }
-
-    /** Read {@link Integer} from the given {@link Cursor}. */
-    private static int getAsInt(Cursor cursor, String columnName) {
-        final int index = cursor.getColumnIndex(columnName);
-        return cursor.getInt(index);
-    }
-
-    /**
-     * Abstract definition of an action that could be performed, along with
-     * string description and icon.
-     */
-    private interface Action extends Collapser.Collapsible<Action> {
-        public CharSequence getHeader();
-        public CharSequence getBody();
-
-        public String getMimeType();
-        public Drawable getFallbackIcon();
-
-        /**
-         * Build an {@link Intent} that will perform this action.
-         */
-        public Intent getIntent();
-
-        /**
-         * Checks if the contact data for this action is primary.
-         */
-        public Boolean isPrimary();
-
-        /**
-         * Returns a lookup (@link Uri) for the contact data item.
-         */
-        public Uri getDataUri();
-    }
-
-    /**
-     * Description of a specific {@link Data#_ID} item, with style information
-     * defined by a {@link DataKind}.
-     */
-    private static class DataAction implements Action {
-        private final Context mContext;
-        private final DataKind mKind;
-        private final String mMimeType;
-
-        private CharSequence mHeader;
-        private CharSequence mBody;
-        private Intent mIntent;
-
-        private boolean mAlternate;
-        private Uri mDataUri;
-        private boolean mIsPrimary;
-
-        /**
-         * Create an action from common {@link Data} elements.
-         */
-        public DataAction(Context context, String mimeType, DataKind kind,
-                long dataId, Cursor cursor) {
-            mContext = context;
-            mKind = kind;
-            mMimeType = mimeType;
-
-            // Inflate strings from cursor
-            mAlternate = Constants.MIME_SMS_ADDRESS.equals(mimeType);
-            if (mAlternate && mKind.actionAltHeader != null) {
-                mHeader = mKind.actionAltHeader.inflateUsing(context, cursor);
-            } else if (mKind.actionHeader != null) {
-                mHeader = mKind.actionHeader.inflateUsing(context, cursor);
-            }
-
-            if (getAsInt(cursor, Data.IS_SUPER_PRIMARY) != 0) {
-                mIsPrimary = true;
-            }
-
-            if (mKind.actionBody != null) {
-                mBody = mKind.actionBody.inflateUsing(context, cursor);
-            }
-
-            mDataUri = ContentUris.withAppendedId(Data.CONTENT_URI, dataId);
-
-            // Handle well-known MIME-types with special care
-            if (Phone.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final String number = getAsString(cursor, Phone.NUMBER);
-                if (!TextUtils.isEmpty(number)) {
-                    final Uri callUri = Uri.fromParts(Constants.SCHEME_TEL, number, null);
-                    mIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, callUri);
-                }
-            } else if (SipAddress.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final String address = getAsString(cursor, SipAddress.SIP_ADDRESS);
-                if (!TextUtils.isEmpty(address)) {
-                    final Uri callUri = Uri.fromParts(Constants.SCHEME_SIP, address, null);
-                    mIntent = new Intent(Intent.ACTION_CALL_PRIVILEGED, callUri);
-                    // Note that this item will get a SIP-specific variant
-                    // of the "call phone" icon, rather than the standard
-                    // app icon for the Phone app (which we show for
-                    // regular phone numbers.)  That's because the phone
-                    // app explicitly specifies an android:icon attribute
-                    // for the SIP-related intent-filters in its manifest.
-                }
-            } else if (Constants.MIME_SMS_ADDRESS.equals(mimeType)) {
-                final String number = getAsString(cursor, Phone.NUMBER);
-                if (!TextUtils.isEmpty(number)) {
-                    final Uri smsUri = Uri.fromParts(Constants.SCHEME_SMSTO, number, null);
-                    mIntent = new Intent(Intent.ACTION_SENDTO, smsUri);
-                }
-
-            } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final String address = getAsString(cursor, Email.DATA);
-                if (!TextUtils.isEmpty(address)) {
-                    final Uri mailUri = Uri.fromParts(Constants.SCHEME_MAILTO, address, null);
-                    mIntent = new Intent(Intent.ACTION_SENDTO, mailUri);
-                }
-
-            } else if (Website.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final String url = getAsString(cursor, Website.URL);
-                if (!TextUtils.isEmpty(url)) {
-                    mIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
-                }
-
-            } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final boolean isEmail = Email.CONTENT_ITEM_TYPE.equals(
-                        getAsString(cursor, Data.MIMETYPE));
-                if (isEmail || isProtocolValid(cursor)) {
-                    final int protocol = isEmail ? Im.PROTOCOL_GOOGLE_TALK :
-                            getAsInt(cursor, Im.PROTOCOL);
-
-                    if (isEmail) {
-                        // Use Google Talk string when using Email, and clear data
-                        // Uri so we don't try saving Email as primary.
-                        mHeader = context.getText(R.string.chat_gtalk);
-                        mDataUri = null;
-                    }
-
-                    String host = getAsString(cursor, Im.CUSTOM_PROTOCOL);
-                    String data = getAsString(cursor, isEmail ? Email.DATA : Im.DATA);
-                    if (protocol != Im.PROTOCOL_CUSTOM) {
-                        // Try bringing in a well-known host for specific protocols
-                        host = ContactsUtils.lookupProviderNameFromId(protocol);
-                    }
-
-                    if (!TextUtils.isEmpty(host) && !TextUtils.isEmpty(data)) {
-                        final String authority = host.toLowerCase();
-                        final Uri imUri = new Uri.Builder().scheme(Constants.SCHEME_IMTO).authority(
-                                authority).appendPath(data).build();
-                        mIntent = new Intent(Intent.ACTION_SENDTO, imUri);
-                    }
-                }
-            }
-
-            if (mIntent == null) {
-                // Otherwise fall back to default VIEW action
-                mIntent = new Intent(Intent.ACTION_VIEW, mDataUri);
-            }
-
-            // Always launch as new task, since we're like a launcher
-            mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-        }
-
-        private boolean isProtocolValid(Cursor cursor) {
-            final int columnIndex = cursor.getColumnIndex(Im.PROTOCOL);
-            if (cursor.isNull(columnIndex)) {
-                return false;
-            }
-            try {
-                Integer.valueOf(cursor.getString(columnIndex));
-            } catch (NumberFormatException e) {
-                return false;
-            }
-            return true;
-        }
-
-        /** {@inheritDoc} */
-        public CharSequence getHeader() {
-            return mHeader;
-        }
-
-        /** {@inheritDoc} */
-        public CharSequence getBody() {
-            return mBody;
-        }
-
-        /** {@inheritDoc} */
-        public String getMimeType() {
-            return mMimeType;
-        }
-
-        /** {@inheritDoc} */
-        public Uri getDataUri() {
-            return mDataUri;
-        }
-
-        /** {@inheritDoc} */
-        public Boolean isPrimary() {
-            return mIsPrimary;
-        }
-
-        /** {@inheritDoc} */
-        public Drawable getFallbackIcon() {
-            // Bail early if no valid resources
-            final String resPackageName = mKind.resPackageName;
-            if (resPackageName == null) return null;
-
-            final PackageManager pm = mContext.getPackageManager();
-            if (mAlternate && mKind.iconAltRes != -1) {
-                return pm.getDrawable(resPackageName, mKind.iconAltRes, null);
-            } else if (mKind.iconRes != -1) {
-                return pm.getDrawable(resPackageName, mKind.iconRes, null);
-            } else {
-                return null;
-            }
-        }
-
-        /** {@inheritDoc} */
-        public Intent getIntent() {
-            return mIntent;
-        }
-
-        /** {@inheritDoc} */
-        public boolean collapseWith(Action other) {
-            if (!shouldCollapseWith(other)) {
-                return false;
-            }
-            return true;
-        }
-
-        /** {@inheritDoc} */
-        public boolean shouldCollapseWith(Action t) {
-            if (t == null) {
-                return false;
-            }
-            if (!(t instanceof DataAction)) {
-                Log.e(TAG, "t must be DataAction");
-                return false;
-            }
-            DataAction other = (DataAction)t;
-            if (!ContactsUtils.areObjectsEqual(mKind, other.mKind)) {
-                return false;
-            }
-            if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, other.mMimeType,
-                    other.mBody)) {
-                return false;
-            }
-            if (!TextUtils.equals(mMimeType, other.mMimeType)
-                    || !ContactsUtils.areIntentActionEqual(mIntent, other.mIntent)
-                    ) {
-                return false;
-            }
-            return true;
-        }
-    }
-
-    /**
-     * Specific action that launches the profile card.
-     */
-    private static class ProfileAction implements Action {
-        private final Context mContext;
-        private final Uri mLookupUri;
-
-        public ProfileAction(Context context, Uri lookupUri) {
-            mContext = context;
-            mLookupUri = lookupUri;
-        }
-
-        /** {@inheritDoc} */
-        public CharSequence getHeader() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        public CharSequence getBody() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        public String getMimeType() {
-            return Contacts.CONTENT_ITEM_TYPE;
-        }
-
-        /** {@inheritDoc} */
-        public Drawable getFallbackIcon() {
-            return mContext.getResources().getDrawable(R.drawable.ic_contacts_details);
-        }
-
-        /** {@inheritDoc} */
-        public Intent getIntent() {
-            final Intent intent = new Intent(Intent.ACTION_VIEW, mLookupUri);
-            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-            return intent;
-        }
-
-        /** {@inheritDoc} */
-        public Boolean isPrimary() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        public Uri getDataUri() {
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        public boolean collapseWith(Action t) {
-            return false; // Never dup.
-        }
-
-        /** {@inheritDoc} */
-        public boolean shouldCollapseWith(Action t) {
-            return false; // Never dup.
-        }
-    }
-
-    /**
-     * Internally hold a cache of scaled icons based on {@link PackageManager}
-     * queries, keyed internally on MIME-type.
-     */
-    private static class ResolveCache {
-        private PackageManager mPackageManager;
-
-        /**
-         * Cached entry holding the best {@link ResolveInfo} for a specific
-         * MIME-type, along with a {@link SoftReference} to its icon.
-         */
-        private static class Entry {
-            public ResolveInfo bestResolve;
-            public SoftReference<Drawable> icon;
-        }
-
-        private HashMap<String, Entry> mCache = new HashMap<String, Entry>();
-
-        public ResolveCache(Context context) {
-            mPackageManager = context.getPackageManager();
-        }
-
-        /**
-         * Get the {@link Entry} best associated with the given {@link Action},
-         * or create and populate a new one if it doesn't exist.
-         */
-        protected Entry getEntry(Action action) {
-            final String mimeType = action.getMimeType();
-            Entry entry = mCache.get(mimeType);
-            if (entry != null) return entry;
-            entry = new Entry();
-
-            final Intent intent = action.getIntent();
-            if (intent != null) {
-                final List<ResolveInfo> matches = mPackageManager.queryIntentActivities(intent,
-                        PackageManager.MATCH_DEFAULT_ONLY);
-
-                // Pick first match, otherwise best found
-                ResolveInfo bestResolve = null;
-                final int size = matches.size();
-                if (size == 1) {
-                    bestResolve = matches.get(0);
-                } else if (size > 1) {
-                    bestResolve = getBestResolve(intent, matches);
-                }
-
-                if (bestResolve != null) {
-                    final Drawable icon = bestResolve.loadIcon(mPackageManager);
-
-                    entry.bestResolve = bestResolve;
-                    entry.icon = new SoftReference<Drawable>(icon);
-                }
-            }
-
-            mCache.put(mimeType, entry);
-            return entry;
-        }
-
-        /**
-         * Best {@link ResolveInfo} when multiple found. Ties are broken by
-         * selecting first from the {QuickContactWindow#sPreferResolve} list of
-         * preferred packages, second by apps that live on the system partition,
-         * otherwise the app from the top of the list. This is
-         * <strong>only</strong> used for selecting a default icon for
-         * displaying in the track, and does not shortcut the system
-         * {@link Intent} disambiguation dialog.
-         */
-        protected ResolveInfo getBestResolve(Intent intent, List<ResolveInfo> matches) {
-            // Try finding preferred activity, otherwise detect disambig
-            final ResolveInfo foundResolve = mPackageManager.resolveActivity(intent,
-                    PackageManager.MATCH_DEFAULT_ONLY);
-            final boolean foundDisambig = (foundResolve.match &
-                    IntentFilter.MATCH_CATEGORY_MASK) == 0;
-
-            if (!foundDisambig) {
-                // Found concrete match, so return directly
-                return foundResolve;
-            }
-
-            // Accept any package from prefer list, otherwise first system app
-            ResolveInfo firstSystem = null;
-            for (ResolveInfo info : matches) {
-                final boolean isSystem = (info.activityInfo.applicationInfo.flags
-                        & ApplicationInfo.FLAG_SYSTEM) != 0;
-                final boolean isPrefer = QuickContactWindow.sPreferResolve
-                        .contains(info.activityInfo.applicationInfo.packageName);
-
-
-
-                if (isPrefer) return info;
-                if (isSystem && firstSystem != null) firstSystem = info;
-            }
-
-            // Return first system found, otherwise first from list
-            return firstSystem != null ? firstSystem : matches.get(0);
-        }
-
-        /**
-         * Check {@link PackageManager} to see if any apps offer to handle the
-         * given {@link Action}.
-         */
-        public boolean hasResolve(Action action) {
-            return getEntry(action).bestResolve != null;
-        }
-
-        /**
-         * Find the best description for the given {@link Action}, usually used
-         * for accessibility purposes.
-         */
-        public CharSequence getDescription(Action action) {
-            final CharSequence actionHeader = action.getHeader();
-            final ResolveInfo info = getEntry(action).bestResolve;
-            if (!TextUtils.isEmpty(actionHeader)) {
-                return actionHeader;
-            } else if (info != null) {
-                return info.loadLabel(mPackageManager);
-            } else {
-                return null;
-            }
-        }
-
-        /**
-         * Return the best icon for the given {@link Action}, which is usually
-         * based on the {@link ResolveInfo} found through a
-         * {@link PackageManager} query.
-         */
-        public Drawable getIcon(Action action) {
-            final SoftReference<Drawable> iconRef = getEntry(action).icon;
-            return (iconRef == null) ? null : iconRef.get();
-        }
-
-        public void clear() {
-            mCache.clear();
-        }
-    }
-
-    /**
-     * Provide a strongly-typed {@link LinkedList} that holds a list of
-     * {@link Action} objects.
-     */
-    private class ActionList extends ArrayList<Action> {
-    }
-
-    /**
-     * Provide a simple way of collecting one or more {@link Action} objects
-     * under a MIME-type key.
-     */
-    private class ActionMap extends HashMap<String, ActionList> {
-        private void collect(String mimeType, Action info) {
-            // Create list for this MIME-type when needed
-            ActionList collectList = get(mimeType);
-            if (collectList == null) {
-                collectList = new ActionList();
-                put(mimeType, collectList);
-            }
-            collectList.add(info);
-        }
-    }
-
-    /**
-     * Check if the given MIME-type appears in the list of excluded MIME-types
-     * that the most-recent caller requested.
-     */
-    private boolean isMimeExcluded(String mimeType) {
-        if (mExcludeMimes == null) return false;
-        for (String excludedMime : mExcludeMimes) {
-            if (TextUtils.equals(excludedMime, mimeType)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Handle the result from the {@link #TOKEN_DATA} query.
-     */
-    private void handleData(Cursor cursor) {
-        if (cursor == null) return;
-
-        if (!isMimeExcluded(Contacts.CONTENT_ITEM_TYPE)) {
-            // Add the profile shortcut action
-            final Action action = new ProfileAction(mContext, mLookupUri);
-            mActions.collect(Contacts.CONTENT_ITEM_TYPE, action);
-        }
-
-        final DataStatus status = new DataStatus();
-        final Sources sources = Sources.getInstance(mContext);
-        final ImageView photoView = (ImageView)mHeader.findViewById(R.id.photo);
-
-        Bitmap photoBitmap = null;
-        while (cursor.moveToNext()) {
-            final long dataId = cursor.getLong(DataQuery._ID);
-            final String accountType = cursor.getString(DataQuery.ACCOUNT_TYPE);
-            final String mimeType = cursor.getString(DataQuery.MIMETYPE);
-
-            // Handle any social status updates from this row
-            status.possibleUpdate(cursor);
-
-            // Skip this data item if MIME-type excluded
-            if (isMimeExcluded(mimeType)) continue;
-
-            // Handle photos included as data row
-            if (Photo.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final int colPhoto = cursor.getColumnIndex(Photo.PHOTO);
-                final byte[] photoBlob = cursor.getBlob(colPhoto);
-                if (photoBlob != null) {
-                    photoBitmap = BitmapFactory.decodeByteArray(photoBlob, 0, photoBlob.length);
-                }
-                continue;
-            }
-
-            final DataKind kind = sources.getKindOrFallback(accountType, mimeType, mContext,
-                    ContactsSource.LEVEL_MIMETYPES);
-
-            if (kind != null) {
-                // Build an action for this data entry, find a mapping to a UI
-                // element, build its summary from the cursor, and collect it
-                // along with all others of this MIME-type.
-                final Action action = new DataAction(mContext, mimeType, kind, dataId, cursor);
-                considerAdd(action, mimeType);
-            }
-
-            // If phone number, also insert as text message action
-            if (Phone.CONTENT_ITEM_TYPE.equals(mimeType) && kind != null) {
-                final Action action = new DataAction(mContext, Constants.MIME_SMS_ADDRESS,
-                        kind, dataId, cursor);
-                considerAdd(action, Constants.MIME_SMS_ADDRESS);
-            }
-
-            // Handle Email rows with presence data as Im entry
-            final boolean hasPresence = !cursor.isNull(DataQuery.PRESENCE);
-            if (hasPresence && Email.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                final DataKind imKind = sources.getKindOrFallback(accountType,
-                        Im.CONTENT_ITEM_TYPE, mContext, ContactsSource.LEVEL_MIMETYPES);
-                if (imKind != null) {
-                    final Action action = new DataAction(mContext, Im.CONTENT_ITEM_TYPE, imKind,
-                            dataId, cursor);
-                    considerAdd(action, Im.CONTENT_ITEM_TYPE);
-                }
-            }
-        }
-
-        if (cursor.moveToLast()) {
-            // Read contact information from last data row
-            final String name = cursor.getString(DataQuery.DISPLAY_NAME);
-            final int presence = cursor.getInt(DataQuery.CONTACT_PRESENCE);
-            final Drawable statusIcon = ContactPresenceIconUtil.getPresenceIcon(mContext, presence);
-
-            setHeaderText(R.id.name, name);
-            setHeaderImage(R.id.presence, statusIcon);
-        }
-
-        if (photoView != null) {
-            // Place photo when discovered in data, otherwise hide
-            photoView.setVisibility(photoBitmap != null ? View.VISIBLE : View.GONE);
-            photoView.setImageBitmap(photoBitmap);
-        }
-
-        mHasValidSocial = status.isValid();
-        if (mHasValidSocial && mMode != QuickContact.MODE_SMALL) {
-            // Update status when valid was found
-            setHeaderText(R.id.status, status.getStatus());
-            setHeaderText(R.id.timestamp, status.getTimestampLabel(mContext));
-        }
-
-        // Turn our list of actions into UI elements
-
-        // Index where we start adding child views.
-        int index = mTrack.getChildCount() - 1;
-
-        // All the mime-types to add.
-        final Set<String> containedTypes = new HashSet<String>(mActions.keySet());
-
-        boolean hasData = false;
-
-        // First, add PRECEDING_MIMETYPES, which are most common.
-        for (String mimeType : PRECEDING_MIMETYPES) {
-            if (containedTypes.contains(mimeType)) {
-                hasData = true;
-                mTrack.addView(inflateAction(mimeType), index++);
-                containedTypes.remove(mimeType);
-            }
-        }
-
-        // Keep the current index to append non PRECEDING/FOLLOWING items.
-        final int indexAfterPreceding = index;
-
-        // Then, add FOLLOWING_MIMETYPES, which are least common.
-        for (String mimeType : FOLLOWING_MIMETYPES) {
-            if (containedTypes.contains(mimeType)) {
-                hasData = true;
-                mTrack.addView(inflateAction(mimeType), index++);
-                containedTypes.remove(mimeType);
-            }
-        }
-
-        // Go back to just after PRECEDING_MIMETYPES, and append the rest.
-        index = indexAfterPreceding;
-        final String[] remainingTypes = containedTypes.toArray(new String[containedTypes.size()]);
-        if (remainingTypes.length > 0) hasData = true;
-        Arrays.sort(remainingTypes);
-        for (String mimeType : remainingTypes) {
-            mTrack.addView(inflateAction(mimeType), index++);
-        }
-
-        // When there is no data to display, add a TextView to show the user there's no data
-        if (!hasData) {
-            View view = mInflater.inflate(R.layout.quickcontact_item_nodata, mTrack, false);
-            mTrack.addView(view, index++);
-        }
-    }
-
-    /**
-     * Consider adding the given {@link Action}, which will only happen if
-     * {@link PackageManager} finds an application to handle
-     * {@link Action#getIntent()}.
-     */
-    private void considerAdd(Action action, String mimeType) {
-        if (mResolveCache.hasResolve(action)) {
-            mActions.collect(mimeType, action);
-        }
-    }
-
-    /**
-     * Obtain a new {@link CheckableImageView} for a new chiclet, either by
-     * recycling one from {@link #mActionPool}, or by inflating a new one. When
-     * finished, use {@link #releaseView(View)} to return back into the pool for
-     * later recycling.
-     */
-    private synchronized View obtainView() {
-        View view = mActionPool.poll();
-        if (view == null || QuickContactActivity.FORCE_CREATE) {
-            view = mInflater.inflate(R.layout.quickcontact_item, mTrack, false);
-        }
-        return view;
-    }
-
-    /**
-     * Return the given {@link CheckableImageView} into our internal pool for
-     * possible recycling during another pass.
-     */
-    private synchronized void releaseView(View view) {
-        // Only add CheckableImageViews
-        if (!(view instanceof CheckableImageView)) {
-            return;
-        }
-        mActionPool.offer(view);
-        mActionRecycled++;
-    }
-
-    /**
-     * Inflate the in-track view for the action of the given MIME-type, collapsing duplicate values.
-     * Will use the icon provided by the {@link DataKind}.
-     */
-    private View inflateAction(String mimeType) {
-        final CheckableImageView view = (CheckableImageView)obtainView();
-        boolean isActionSet = false;
-
-        // Add direct intent if single child, otherwise flag for multiple
-        ActionList children = mActions.get(mimeType);
-        if (children.size() > 1) {
-            Collapser.collapseList(children);
-        }
-        Action firstInfo = children.get(0);
-        if (children.size() == 1) {
-            view.setTag(firstInfo);
-        } else {
-            for (Action action : children) {
-                if (action.isPrimary()) {
-                    view.setTag(action);
-                    isActionSet = true;
-                    break;
-                }
-            }
-            if (!isActionSet) {
-                view.setTag(children);
-            }
-        }
-
-        // Set icon and listen for clicks
-        final CharSequence descrip = mResolveCache.getDescription(firstInfo);
-        final Drawable icon = mResolveCache.getIcon(firstInfo);
-        view.setChecked(false);
-        view.setContentDescription(descrip);
-        view.setImageDrawable(icon);
-        view.setOnClickListener(this);
-        return view;
-    }
-
-    /** {@inheritDoc} */
-    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-        // Pass list item clicks along so that Intents are handled uniformly
-        onClick(view);
-    }
-
-    /**
-     * Flag indicating if {@link #mArrowDown} was visible during the last call
-     * to {@link #setResolveVisible(boolean, CheckableImageView)}. Used to
-     * decide during a later call if the arrow should be restored.
-     */
-    private boolean mWasDownArrow = false;
-
-    /**
-     * Helper for showing and hiding {@link #mFooterDisambig}, which will
-     * correctly manage {@link #mArrowDown} as needed.
-     */
-    private void setResolveVisible(boolean visible, CheckableImageView actionView) {
-        // Show or hide the resolve list if needed
-        boolean visibleNow = mFooterDisambig.getVisibility() == View.VISIBLE;
-
-        if (mLastAction != null) mLastAction.setChecked(false);
-        if (actionView != null) actionView.setChecked(true);
-        mLastAction = actionView;
-
-        // Bail early if already in desired state
-        if (visible == visibleNow) return;
-
-        mFooter.setVisibility(visible ? View.GONE : View.VISIBLE);
-        mFooterDisambig.setVisibility(visible ? View.VISIBLE : View.GONE);
-
-        if (visible) {
-            // If showing list, then hide and save state of down arrow
-            mWasDownArrow = mWasDownArrow || (mArrowDown.getVisibility() == View.VISIBLE);
-            mArrowDown.setVisibility(View.INVISIBLE);
-        } else {
-            // If hiding list, restore any down arrow state
-            mArrowDown.setVisibility(mWasDownArrow ? View.VISIBLE : View.INVISIBLE);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View view) {
-        final boolean isActionView = (view instanceof CheckableImageView);
-        final CheckableImageView actionView = isActionView ? (CheckableImageView)view : null;
-        final Object tag = view.getTag();
-        if (tag instanceof Action) {
-            // Incoming tag is concrete intent, so try launching
-            final Action action = (Action)tag;
-            final boolean makePrimary = mMakePrimary;
-
-            if (Intent.ACTION_CALL_PRIVILEGED.equals(action.getIntent().getAction())) {
-                StickyTabs.saveTab(mContext, mLastSelectedContactsAppTab);
-            }
-
-            try {
-                mContext.startActivity(action.getIntent());
-            } catch (ActivityNotFoundException e) {
-                Toast.makeText(mContext, R.string.quickcontact_missing_app, Toast.LENGTH_SHORT)
-                        .show();
-            }
-
-            // Hide the resolution list, if present
-            setResolveVisible(false, null);
-            this.dismiss();
-
-            if (makePrimary) {
-                ContentValues values = new ContentValues(1);
-                values.put(Data.IS_SUPER_PRIMARY, 1);
-                final Uri dataUri = action.getDataUri();
-                if (dataUri != null) {
-                    mContext.getContentResolver().update(dataUri, values, null, null);
-                }
-            }
-        } else if (tag instanceof ActionList) {
-            // Incoming tag is a MIME-type, so show resolution list
-            final ActionList children = (ActionList)tag;
-
-            // Show resolution list and set adapter
-            setResolveVisible(true, actionView);
-
-            mResolveList.setOnItemClickListener(this);
-            mResolveList.setAdapter(new BaseAdapter() {
-                public int getCount() {
-                    return children.size();
-                }
-
-                public Object getItem(int position) {
-                    return children.get(position);
-                }
-
-                public long getItemId(int position) {
-                    return position;
-                }
-
-                public View getView(int position, View convertView, ViewGroup parent) {
-                    if (convertView == null) {
-                        convertView = mInflater.inflate(
-                                R.layout.quickcontact_resolve_item, parent, false);
-                    }
-
-                    // Set action title based on summary value
-                    final Action action = (Action)getItem(position);
-
-                    TextView text1 = (TextView)convertView.findViewById(android.R.id.text1);
-                    TextView text2 = (TextView)convertView.findViewById(android.R.id.text2);
-
-                    text1.setText(action.getHeader());
-                    text2.setText(action.getBody());
-
-                    convertView.setTag(action);
-                    return convertView;
-                }
-            });
-
-            // Make sure we resize to make room for ListView
-            mDecor.forceLayout();
-            mDecor.invalidate();
-
-        }
-    }
-
-    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-        mMakePrimary = isChecked;
-    }
-
-    private void onBackPressed() {
-        // Back key will first dismiss any expanded resolve list, otherwise
-        // it will close the entire dialog.
-        if (mFooterDisambig.getVisibility() == View.VISIBLE) {
-            setResolveVisible(false, null);
-            mDecor.forceLayout();
-            mDecor.invalidate();
-        } else {
-            dismiss();
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        if (mWindow.superDispatchKeyEvent(event)) {
-            return true;
-        }
-        return event.dispatch(this, mDecor != null
-                ? mDecor.getKeyDispatcherState() : null, this);
-    }
-
-    /** {@inheritDoc} */
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        if (keyCode == KeyEvent.KEYCODE_BACK) {
-            event.startTracking();
-            return true;
-        }
-
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean onKeyUp(int keyCode, KeyEvent event) {
-        if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking()
-                && !event.isCanceled()) {
-            onBackPressed();
-            return true;
-        }
-
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean onKeyLongPress(int keyCode, KeyEvent event) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean dispatchPopulateAccessibilityEvent(AccessibilityEvent event) {
-        // TODO: make this window accessible
-        return false;
-    }
-
-    /**
-     * Detect if the given {@link MotionEvent} is outside the boundaries of this
-     * window, which usually means we should dismiss.
-     */
-    protected void detectEventOutside(MotionEvent event) {
-        if (event.getAction() == MotionEvent.ACTION_DOWN && mDecor != null) {
-            // Only try detecting outside events on down-press
-            mDecor.getHitRect(mRect);
-            mRect.top = mRect.top + mShadowTouch;
-            mRect.bottom = mRect.bottom - mShadowTouch;
-            final int x = (int)event.getX();
-            final int y = (int)event.getY();
-            if (!mRect.contains(x, y)) {
-                event.setAction(MotionEvent.ACTION_OUTSIDE);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean dispatchTouchEvent(MotionEvent event) {
-        detectEventOutside(event);
-        if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
-            dismiss();
-            return true;
-        } else {
-            return mWindow.superDispatchTouchEvent(event);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public boolean dispatchTrackballEvent(MotionEvent event) {
-        return mWindow.superDispatchTrackballEvent(event);
-    }
-
-    /** {@inheritDoc} */
-    public void onContentChanged() {
-    }
-
-    /** {@inheritDoc} */
-    public boolean onCreatePanelMenu(int featureId, Menu menu) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public View onCreatePanelView(int featureId) {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    public boolean onMenuItemSelected(int featureId, MenuItem item) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean onMenuOpened(int featureId, Menu menu) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public void onPanelClosed(int featureId, Menu menu) {
-    }
-
-    /** {@inheritDoc} */
-    public boolean onPreparePanel(int featureId, View view, Menu menu) {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public boolean onSearchRequested() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    public void onWindowAttributesChanged(android.view.WindowManager.LayoutParams attrs) {
-        if (mDecor != null) {
-            mWindowManager.updateViewLayout(mDecor, attrs);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onWindowFocusChanged(boolean hasFocus) {
-    }
-
-    /** {@inheritDoc} */
-    public void onAttachedToWindow() {
-        // No actions
-    }
-
-    /** {@inheritDoc} */
-    public void onDetachedFromWindow() {
-        // No actions
-    }
-
-    private interface DataQuery {
-        final String[] PROJECTION = new String[] {
-                Data._ID,
-
-                RawContacts.ACCOUNT_TYPE,
-                Contacts.STARRED,
-                Contacts.DISPLAY_NAME,
-                Contacts.CONTACT_PRESENCE,
-
-                Data.STATUS,
-                Data.STATUS_RES_PACKAGE,
-                Data.STATUS_ICON,
-                Data.STATUS_LABEL,
-                Data.STATUS_TIMESTAMP,
-                Data.PRESENCE,
-
-                Data.RES_PACKAGE,
-                Data.MIMETYPE,
-                Data.IS_PRIMARY,
-                Data.IS_SUPER_PRIMARY,
-                Data.RAW_CONTACT_ID,
-
-                Data.DATA1, Data.DATA2, Data.DATA3, Data.DATA4, Data.DATA5,
-                Data.DATA6, Data.DATA7, Data.DATA8, Data.DATA9, Data.DATA10, Data.DATA11,
-                Data.DATA12, Data.DATA13, Data.DATA14, Data.DATA15,
-        };
-
-        final int _ID = 0;
-
-        final int ACCOUNT_TYPE = 1;
-        final int STARRED = 2;
-        final int DISPLAY_NAME = 3;
-        final int CONTACT_PRESENCE = 4;
-
-        final int STATUS = 5;
-        final int STATUS_RES_PACKAGE = 6;
-        final int STATUS_ICON = 7;
-        final int STATUS_LABEL = 8;
-        final int STATUS_TIMESTAMP = 9;
-        final int PRESENCE = 10;
-
-        final int RES_PACKAGE = 11;
-        final int MIMETYPE = 12;
-        final int IS_PRIMARY = 13;
-        final int IS_SUPER_PRIMARY = 14;
-    }
-}
diff --git a/src/com/android/contacts/ui/ShowOrCreateActivity.java b/src/com/android/contacts/ui/ShowOrCreateActivity.java
deleted file mode 100755
index e0781d2..0000000
--- a/src/com/android/contacts/ui/ShowOrCreateActivity.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui;
-
-import com.android.contacts.ContactsSearchManager;
-import com.android.contacts.ContactsListActivity;
-import com.android.contacts.R;
-import com.android.contacts.util.Constants;
-import com.android.contacts.util.NotifyingAsyncQueryHandler;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.ComponentName;
-import android.content.ContentUris;
-import android.content.DialogInterface;
-import android.content.EntityIterator;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Intents;
-import android.provider.ContactsContract.PhoneLookup;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.util.Log;
-
-/**
- * Handle several edge cases around showing or possibly creating contacts in
- * connected with a specific E-mail address or phone number. Will search based
- * on incoming {@link Intent#getData()} as described by
- * {@link Intents#SHOW_OR_CREATE_CONTACT}.
- * <ul>
- * <li>If no matching contacts found, will prompt user with dialog to add to a
- * contact, then will use {@link Intent#ACTION_INSERT_OR_EDIT} to let create new
- * contact or edit new data into an existing one.
- * <li>If one matching contact found, directly show {@link Intent#ACTION_VIEW}
- * that specific contact.
- * <li>If more than one matching found, show list of matching contacts using
- * {@link Intent#ACTION_SEARCH}.
- * </ul>
- */
-public final class ShowOrCreateActivity extends Activity implements
-        NotifyingAsyncQueryHandler.AsyncQueryListener {
-    static final String TAG = "ShowOrCreateActivity";
-    static final boolean LOGD = false;
-
-    static final String[] PHONES_PROJECTION = new String[] {
-        PhoneLookup._ID,
-    };
-
-    static final String[] CONTACTS_PROJECTION = new String[] {
-        RawContacts.CONTACT_ID,
-    };
-
-    static final int CONTACT_ID_INDEX = 0;
-
-    static final int CREATE_CONTACT_DIALOG = 1;
-
-    static final int QUERY_TOKEN = 42;
-
-    private NotifyingAsyncQueryHandler mQueryHandler;
-
-    private Bundle mCreateExtras;
-    private String mCreateDescrip;
-    private boolean mCreateForce;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        // Create handler if doesn't exist, otherwise cancel any running
-        if (mQueryHandler == null) {
-            mQueryHandler = new NotifyingAsyncQueryHandler(this, this);
-        } else {
-            mQueryHandler.cancelOperation(QUERY_TOKEN);
-        }
-
-        final Intent intent = getIntent();
-        final Uri data = intent.getData();
-
-        // Unpack scheme and target data from intent
-        String scheme = null;
-        String ssp = null;
-        if (data != null) {
-            scheme = data.getScheme();
-            ssp = data.getSchemeSpecificPart();
-        }
-
-        // Build set of extras for possible use when creating contact
-        mCreateExtras = new Bundle();
-        Bundle originalExtras = intent.getExtras();
-        if (originalExtras != null) {
-            mCreateExtras.putAll(originalExtras);
-        }
-
-        // Read possible extra with specific title
-        mCreateDescrip = intent.getStringExtra(Intents.EXTRA_CREATE_DESCRIPTION);
-        if (mCreateDescrip == null) {
-            mCreateDescrip = ssp;
-        }
-
-        // Allow caller to bypass dialog prompt
-        mCreateForce = intent.getBooleanExtra(Intents.EXTRA_FORCE_CREATE, false);
-
-        // Handle specific query request
-        if (Constants.SCHEME_MAILTO.equals(scheme)) {
-            mCreateExtras.putString(Intents.Insert.EMAIL, ssp);
-
-            Uri uri = Uri.withAppendedPath(Email.CONTENT_FILTER_URI, Uri.encode(ssp));
-            mQueryHandler.startQuery(QUERY_TOKEN, null, uri, CONTACTS_PROJECTION, null, null, null);
-
-        } else if (Constants.SCHEME_TEL.equals(scheme)) {
-            mCreateExtras.putString(Intents.Insert.PHONE, ssp);
-
-            Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, ssp);
-            mQueryHandler.startQuery(QUERY_TOKEN, null, uri, PHONES_PROJECTION, null, null, null);
-
-        } else {
-            Log.w(TAG, "Invalid intent:" + getIntent());
-            finish();
-        }
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        if (mQueryHandler != null) {
-            mQueryHandler.cancelOperation(QUERY_TOKEN);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onQueryComplete(int token, Object cookie, Cursor cursor) {
-        if (cursor == null) {
-            // Bail when problem running query in background
-            finish();
-            return;
-        }
-
-        // Count contacts found by query
-        int count = 0;
-        long contactId = -1;
-        try {
-            count = cursor.getCount();
-            if (count == 1 && cursor.moveToFirst()) {
-                // Try reading ID if only one contact returned
-                contactId = cursor.getLong(CONTACT_ID_INDEX);
-            }
-        } finally {
-            cursor.close();
-        }
-
-        if (count == 1 && contactId != -1) {
-            // If we only found one item, jump right to viewing it
-            final Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
-            final Intent viewIntent = new Intent(Intent.ACTION_VIEW, contactUri);
-            startActivity(viewIntent);
-            finish();
-
-        } else if (count > 1) {
-            // If more than one, show pick list
-            Intent listIntent = new Intent(Intent.ACTION_SEARCH);
-            listIntent.setComponent(new ComponentName(this, ContactsListActivity.class));
-            listIntent.putExtras(mCreateExtras);
-            startActivity(listIntent);
-            finish();
-
-        } else {
-            // No matching contacts found
-            if (mCreateForce) {
-                // Forced to create new contact
-                Intent createIntent = new Intent(Intent.ACTION_INSERT, RawContacts.CONTENT_URI);
-                createIntent.putExtras(mCreateExtras);
-                createIntent.setType(RawContacts.CONTENT_TYPE);
-
-                startActivity(createIntent);
-                finish();
-
-            } else {
-	        showDialog(CREATE_CONTACT_DIALOG);
-           }
-        }
-    }
-
-    @Override
-    protected Dialog onCreateDialog(int id) {
-        switch(id) {
-	    case CREATE_CONTACT_DIALOG:
-                // Prompt user to insert or edit contact
-                final Intent createIntent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
-                createIntent.putExtras(mCreateExtras);
-                createIntent.setType(RawContacts.CONTENT_ITEM_TYPE);
-
-                final CharSequence message = getResources().getString(
-                        R.string.add_contact_dlg_message_fmt, mCreateDescrip);
-
-                return new AlertDialog.Builder(this)
-                        .setTitle(R.string.add_contact_dlg_title)
-                        .setMessage(message)
-                        .setPositiveButton(android.R.string.ok,
-                                new IntentClickListener(this, createIntent))
-                        .setNegativeButton(android.R.string.cancel,
-                                new IntentClickListener(this, null))
-                        .create();
-        }
-	return super.onCreateDialog(id);
-    }
-
-    /**
-     * Listener for {@link DialogInterface} that launches a given {@link Intent}
-     * when clicked. When clicked, this also closes the parent using
-     * {@link Activity#finish()}.
-     */
-    private static class IntentClickListener implements DialogInterface.OnClickListener {
-        private Activity mParent;
-        private Intent mIntent;
-
-        /**
-         * @param parent {@link Activity} to use for launching target.
-         * @param intent Target {@link Intent} to launch when clicked.
-         */
-        public IntentClickListener(Activity parent, Intent intent) {
-            mParent = parent;
-            mIntent = intent;
-        }
-
-        public void onClick(DialogInterface dialog, int which) {
-            if (mIntent != null) {
-                mParent.startActivity(mIntent);
-            }
-            mParent.finish();
-        }
-    }
-
-    @Override
-    public void startSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData,
-            boolean globalSearch) {
-        if (globalSearch) {
-            super.startSearch(initialQuery, selectInitialQuery, appSearchData, globalSearch);
-        } else {
-            ContactsSearchManager.startSearch(this, initialQuery);
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/ViewIdGenerator.java b/src/com/android/contacts/ui/ViewIdGenerator.java
deleted file mode 100644
index f7281d4..0000000
--- a/src/com/android/contacts/ui/ViewIdGenerator.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui;
-
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.widget.GenericEditorView;
-import com.android.contacts.ui.widget.KindSectionView;
-
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * A class that provides unique view ids for {@link ContentEditorView}, {@link KindSectionView},
- * {@link GenericEditorView} and {@link EditView} on {@link EditContactActivity}.
- * It is used to assign a unique but consistent id to each view across {@link EditContactActivity}'s
- * lifecycle, so that we can re-construct view state (e.g. focused view) when the screen rotates.
- *
- * <p>This class is not thread safe.
- */
-public final class ViewIdGenerator implements Parcelable {
-    private static final int INVALID_VIEW_ID = 0;
-    private static final int INITIAL_VIEW_ID = 1;
-
-    public static final int NO_VIEW_INDEX = -1;
-
-    private int mNextId;
-
-    /**
-     * Used as a map from the "key" of the views to actual ids.  {@link #getId()} generates keys for
-     * the views.
-     */
-    private Bundle mIdMap = new Bundle();
-
-    private static final char KEY_SEPARATOR = '*';
-
-    private final static StringBuilder sWorkStringBuilder = new StringBuilder();
-
-    public ViewIdGenerator() {
-        mNextId = INITIAL_VIEW_ID;
-    }
-
-    /** {@inheritDoc} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /**
-     * Returns an id for a view associated with specified contact field.
-     *
-     * @param entity {@link EntityDelta} associated with the view
-     * @param kind {@link DataKind} associated with the view, or null if none exists.
-     * @param values {@link ValuesDelta} associated with the view, or null if none exists.
-     * @param viewIndex index of the view in the parent {@link Editor}, if it's a leave view.
-     *     Otherwise, pass {@link #NO_VIEW_INDEX}.
-     */
-    public int getId(EntityDelta entity, DataKind kind, ValuesDelta values,
-            int viewIndex) {
-        final String k = getMapKey(entity, kind, values, viewIndex);
-
-        int id = mIdMap.getInt(k, INVALID_VIEW_ID);
-        if (id == INVALID_VIEW_ID) {
-            // Make sure the new id won't conflict with auto-generated ids by masking with 0xffff.
-            id = (mNextId++) & 0xFFFF;
-            mIdMap.putInt(k, id);
-        }
-        return id;
-    }
-
-    private static String getMapKey(EntityDelta entity, DataKind kind, ValuesDelta values,
-            int viewIndex) {
-        sWorkStringBuilder.setLength(0);
-        if (entity != null) {
-            sWorkStringBuilder.append(entity.getValues().getId());
-
-            if (kind != null) {
-                sWorkStringBuilder.append(KEY_SEPARATOR);
-                sWorkStringBuilder.append(kind.mimeType);
-
-                if (values != null) {
-                    sWorkStringBuilder.append(KEY_SEPARATOR);
-                    sWorkStringBuilder.append(values.getId());
-
-                    if (viewIndex != NO_VIEW_INDEX) {
-                        sWorkStringBuilder.append(KEY_SEPARATOR);
-                        sWorkStringBuilder.append(viewIndex);
-                    }
-                }
-            }
-        }
-        return sWorkStringBuilder.toString();
-    }
-
-    /** {@Override} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mNextId);
-        dest.writeBundle(mIdMap);
-    }
-
-    private void readFromParcel(Parcel src) {
-        mNextId = src.readInt();
-        mIdMap = src.readBundle();
-    }
-
-    public static final Parcelable.Creator<ViewIdGenerator> CREATOR =
-            new Parcelable.Creator<ViewIdGenerator>() {
-        public ViewIdGenerator createFromParcel(Parcel in) {
-            final ViewIdGenerator vig = new ViewIdGenerator();
-            vig.readFromParcel(in);
-            return vig;
-        }
-
-        public ViewIdGenerator[] newArray(int size) {
-            return new ViewIdGenerator[size];
-        }
-    };
-}
diff --git a/src/com/android/contacts/ui/widget/BaseContactEditorView.java b/src/com/android/contacts/ui/widget/BaseContactEditorView.java
deleted file mode 100644
index c2f9136..0000000
--- a/src/com/android/contacts/ui/widget/BaseContactEditorView.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.ContactsSource.EditType;
-import com.android.contacts.model.Editor.EditorListener;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.content.Context;
-import android.content.Entity;
-import android.graphics.Bitmap;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.widget.LinearLayout;
-
-/**
- * Base view that provides common code for the editor interaction for a specific
- * RawContact represented through an {@link EntityDelta}. Callers can
- * reuse this view and quickly rebuild its contents through
- * {@link #setState(EntityDelta, ContactsSource)}.
- * <p>
- * Internal updates are performed against {@link ValuesDelta} so that the
- * source {@link Entity} can be swapped out. Any state-based changes, such as
- * adding {@link Data} rows or changing {@link EditType}, are performed through
- * {@link EntityModifier} to ensure that {@link ContactsSource} are enforced.
- */
-public abstract class BaseContactEditorView extends LinearLayout {
-    protected LayoutInflater mInflater;
-
-    protected PhotoEditorView mPhoto;
-    protected boolean mHasPhotoEditor = false;
-
-    public BaseContactEditorView(Context context) {
-        super(context);
-    }
-
-    public BaseContactEditorView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /**
-     * Assign the given {@link Bitmap} to the internal {@link PhotoEditorView}
-     * for the {@link EntityDelta} currently being edited.
-     */
-    public void setPhotoBitmap(Bitmap bitmap) {
-        mPhoto.setPhotoBitmap(bitmap);
-    }
-
-    /**
-     * Return true if the current {@link RawContacts} supports {@link Photo},
-     * which means that {@link PhotoEditorView} is enabled.
-     */
-    public boolean hasPhotoEditor() {
-        return mHasPhotoEditor;
-    }
-
-    /**
-     * Return true if internal {@link PhotoEditorView} has a {@link Photo} set.
-     */
-    public boolean hasSetPhoto() {
-        return mPhoto.hasSetPhoto();
-    }
-
-    public PhotoEditorView getPhotoEditor() {
-        return mPhoto;
-    }
-
-    /**
-     * @return the RawContact ID that this editor is editing.
-     */
-    public abstract long getRawContactId();
-
-    /**
-     * Set the internal state for this view, given a current
-     * {@link EntityDelta} state and the {@link ContactsSource} that
-     * apply to that state.
-     */
-    public abstract void setState(EntityDelta state, ContactsSource source, ViewIdGenerator vig);
-
-    /**
-     * Sets the {@link EditorListener} on the name field
-     */
-    public abstract void setNameEditorListener(EditorListener listener);
-}
diff --git a/src/com/android/contacts/ui/widget/CheckableImageView.java b/src/com/android/contacts/ui/widget/CheckableImageView.java
deleted file mode 100644
index ff5abc0..0000000
--- a/src/com/android/contacts/ui/widget/CheckableImageView.java
+++ /dev/null
@@ -1,63 +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.ui.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.Checkable;
-import android.widget.ImageView;
-
-/**
- * A special variation of ImageView that can be used as a checkable object.
- * This is used as the background view of quickcontact chiclet, which is in checked state
- * when disambig list is shown. Otherwise, it works identically to a ImageView.
- */
-public class CheckableImageView extends ImageView implements Checkable {
-    private boolean mChecked;
-
-    private static final int[] CHECKED_STATE_SET = {
-        android.R.attr.state_checked
-    };
-
-    public CheckableImageView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    public int[] onCreateDrawableState(int extraSpace) {
-        final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
-        if (isChecked()) {
-            mergeDrawableStates(drawableState, CHECKED_STATE_SET);
-        }
-        return drawableState;
-    }
-
-    public void toggle() {
-        setChecked(!mChecked);
-    }
-
-    public boolean isChecked() {
-        return mChecked;
-    }
-
-    public void setChecked(boolean checked) {
-        if (mChecked != checked) {
-            mChecked = checked;
-            refreshDrawableState();
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/widget/ContactEditorView.java b/src/com/android/contacts/ui/widget/ContactEditorView.java
deleted file mode 100644
index 83bf2fb..0000000
--- a/src/com/android/contacts/ui/widget/ContactEditorView.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import com.android.contacts.R;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.ContactsSource.EditType;
-import com.android.contacts.model.Editor.EditorListener;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.content.Context;
-import android.content.Entity;
-import android.content.res.Resources;
-import android.graphics.drawable.Drawable;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.provider.ContactsContract.CommonDataKinds.StructuredName;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.View.OnClickListener;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-/**
- * Custom view that provides all the editor interaction for a specific
- * {@link Contacts} represented through an {@link EntityDelta}. Callers can
- * reuse this view and quickly rebuild its contents through
- * {@link #setState(EntityDelta, ContactsSource)}.
- * <p>
- * Internal updates are performed against {@link ValuesDelta} so that the
- * source {@link Entity} can be swapped out. Any state-based changes, such as
- * adding {@link Data} rows or changing {@link EditType}, are performed through
- * {@link EntityModifier} to ensure that {@link ContactsSource} are enforced.
- */
-public class ContactEditorView extends BaseContactEditorView implements OnClickListener {
-    private TextView mReadOnly;
-    private TextView mReadOnlyName;
-
-    private View mPhotoStub;
-    private GenericEditorView mName;
-
-    private boolean mIsSourceReadOnly;
-    private ViewGroup mGeneral;
-    private ViewGroup mSecondary;
-    private boolean mSecondaryVisible;
-
-    private TextView mSecondaryHeader;
-
-    private Drawable mSecondaryOpen;
-    private Drawable mSecondaryClosed;
-
-    private View mHeaderColorBar;
-    private View mSideBar;
-    private ImageView mHeaderIcon;
-    private TextView mHeaderAccountType;
-    private TextView mHeaderAccountName;
-
-    private long mRawContactId = -1;
-
-    public ContactEditorView(Context context) {
-        super(context);
-    }
-
-    public ContactEditorView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mInflater = (LayoutInflater)getContext().getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-
-        mPhoto = (PhotoEditorView)findViewById(R.id.edit_photo);
-        mPhotoStub = findViewById(R.id.stub_photo);
-
-        final int photoSize = getResources().getDimensionPixelSize(R.dimen.edit_photo_size);
-
-        mReadOnly = (TextView)findViewById(R.id.edit_read_only);
-
-        mName = (GenericEditorView)findViewById(R.id.edit_name);
-        mName.setMinimumHeight(photoSize);
-        mName.setDeletable(false);
-
-        mReadOnlyName = (TextView) findViewById(R.id.read_only_name);
-
-        mGeneral = (ViewGroup)findViewById(R.id.sect_general);
-        mSecondary = (ViewGroup)findViewById(R.id.sect_secondary);
-
-        mHeaderColorBar = findViewById(R.id.header_color_bar);
-        mSideBar = findViewById(R.id.color_bar);
-        mHeaderIcon = (ImageView) findViewById(R.id.header_icon);
-        mHeaderAccountType = (TextView) findViewById(R.id.header_account_type);
-        mHeaderAccountName = (TextView) findViewById(R.id.header_account_name);
-
-        mSecondaryHeader = (TextView)findViewById(R.id.head_secondary);
-        mSecondaryHeader.setOnClickListener(this);
-
-        final Resources res = getResources();
-        mSecondaryOpen = res.getDrawable(com.android.internal.R.drawable.expander_ic_maximized);
-        mSecondaryClosed = res.getDrawable(com.android.internal.R.drawable.expander_ic_minimized);
-
-        this.setSecondaryVisible(false);
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View v) {
-        // Toggle visibility of secondary kinds
-        final boolean makeVisible = mSecondary.getVisibility() != View.VISIBLE;
-        this.setSecondaryVisible(makeVisible);
-    }
-
-    /**
-     * Set the visibility of secondary sections, along with header icon.
-     *
-     * <p>If the source is read-only and there's no secondary fields, the entire secondary section
-     * will be hidden.
-     */
-    private void setSecondaryVisible(boolean makeVisible) {
-        mSecondaryVisible = makeVisible;
-
-        if (!mIsSourceReadOnly && mSecondary.getChildCount() > 0) {
-            mSecondaryHeader.setVisibility(View.VISIBLE);
-            mSecondaryHeader.setCompoundDrawablesWithIntrinsicBounds(
-                    makeVisible ? mSecondaryOpen : mSecondaryClosed, null, null, null);
-            mSecondary.setVisibility(makeVisible ? View.VISIBLE : View.GONE);
-        } else {
-            mSecondaryHeader.setVisibility(View.GONE);
-            mSecondary.setVisibility(View.GONE);
-        }
-    }
-
-    /**
-     * Set the internal state for this view, given a current
-     * {@link EntityDelta} state and the {@link ContactsSource} that
-     * apply to that state.
-     */
-    @Override
-    public void setState(EntityDelta state, ContactsSource source, ViewIdGenerator vig) {
-        // Remove any existing sections
-        mGeneral.removeAllViews();
-        mSecondary.removeAllViews();
-
-        // Bail if invalid state or source
-        if (state == null || source == null) return;
-
-        setId(vig.getId(state, null, null, ViewIdGenerator.NO_VIEW_INDEX));
-
-        mIsSourceReadOnly = source.readOnly;
-
-        // Make sure we have StructuredName
-        EntityModifier.ensureKindExists(state, source, StructuredName.CONTENT_ITEM_TYPE);
-
-        // Fill in the header info
-        ValuesDelta values = state.getValues();
-        String accountName = values.getAsString(RawContacts.ACCOUNT_NAME);
-        CharSequence accountType = source.getDisplayLabel(mContext);
-        if (TextUtils.isEmpty(accountType)) {
-            accountType = mContext.getString(R.string.account_phone);
-        }
-        if (!TextUtils.isEmpty(accountName)) {
-            mHeaderAccountName.setText(
-                    mContext.getString(R.string.from_account_format, accountName));
-        }
-        mHeaderAccountType.setText(mContext.getString(R.string.account_type_format, accountType));
-        mHeaderIcon.setImageDrawable(source.getDisplayIcon(mContext));
-
-        mRawContactId = values.getAsLong(RawContacts._ID);
-
-        // Show photo editor when supported
-        EntityModifier.ensureKindExists(state, source, Photo.CONTENT_ITEM_TYPE);
-        mHasPhotoEditor = (source.getKindForMimetype(Photo.CONTENT_ITEM_TYPE) != null);
-        mPhoto.setVisibility(mHasPhotoEditor ? View.VISIBLE : View.GONE);
-        mPhoto.setEnabled(!mIsSourceReadOnly);
-        mName.setEnabled(!mIsSourceReadOnly);
-
-        // Show and hide the appropriate views
-        if (mIsSourceReadOnly) {
-            mGeneral.setVisibility(View.GONE);
-            mName.setVisibility(View.GONE);
-            mReadOnly.setVisibility(View.VISIBLE);
-            mReadOnly.setText(mContext.getString(R.string.contact_read_only, accountType));
-            mReadOnlyName.setVisibility(View.VISIBLE);
-        } else {
-            mGeneral.setVisibility(View.VISIBLE);
-            mName.setVisibility(View.VISIBLE);
-            mReadOnly.setVisibility(View.GONE);
-            mReadOnlyName.setVisibility(View.GONE);
-        }
-
-        boolean anySecondaryFieldFilled = false;
-        // Create editor sections for each possible data kind
-        for (DataKind kind : source.getSortedDataKinds()) {
-            // Skip kind of not editable
-            if (!kind.editable) continue;
-
-            final String mimeType = kind.mimeType;
-            if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                // Handle special case editor for structured name
-                final ValuesDelta primary = state.getPrimaryEntry(mimeType);
-                if (!mIsSourceReadOnly) {
-                    mName.setValues(kind, primary, state, mIsSourceReadOnly, vig);
-                } else {
-                    String displayName = primary.getAsString(StructuredName.DISPLAY_NAME);
-                    mReadOnlyName.setText(displayName);
-                }
-            } else if (Photo.CONTENT_ITEM_TYPE.equals(mimeType)) {
-                // Handle special case editor for photos
-                final ValuesDelta primary = state.getPrimaryEntry(mimeType);
-                mPhoto.setValues(kind, primary, state, mIsSourceReadOnly, vig);
-                if (mIsSourceReadOnly && !mPhoto.hasSetPhoto()) {
-                    mPhotoStub.setVisibility(View.GONE);
-                } else {
-                    mPhotoStub.setVisibility(View.VISIBLE);
-                }
-            } else if (!mIsSourceReadOnly) {
-                // Otherwise use generic section-based editors
-                if (kind.fieldList == null) continue;
-                final ViewGroup parent = kind.secondary ? mSecondary : mGeneral;
-                final KindSectionView section = (KindSectionView)mInflater.inflate(
-                        R.layout.item_kind_section, parent, false);
-                section.setState(kind, state, mIsSourceReadOnly, vig);
-                if (kind.secondary && section.isAnyEditorFilledOut()) {
-                    anySecondaryFieldFilled = true;
-                }
-                parent.addView(section);
-            }
-        }
-
-        setSecondaryVisible(anySecondaryFieldFilled);
-    }
-
-    /**
-     * Sets the {@link EditorListener} on the name field
-     */
-    @Override
-    public void setNameEditorListener(EditorListener listener) {
-        mName.setEditorListener(listener);
-    }
-
-    @Override
-    public long getRawContactId() {
-        return mRawContactId;
-    }
-
-    private static class SavedState extends BaseSavedState {
-        public boolean mSecondaryVisible;
-
-        SavedState(Parcelable superState) {
-            super(superState);
-        }
-
-        private SavedState(Parcel in) {
-            super(in);
-            mSecondaryVisible = (in.readInt() == 0 ? false : true);
-        }
-
-        @Override
-        public void writeToParcel(Parcel out, int flags) {
-            super.writeToParcel(out, flags);
-            out.writeInt(mSecondaryVisible ? 1 : 0);
-        }
-
-        public static final Parcelable.Creator<SavedState> CREATOR
-                = new Parcelable.Creator<SavedState>() {
-            public SavedState createFromParcel(Parcel in) {
-                return new SavedState(in);
-            }
-
-            public SavedState[] newArray(int size) {
-                return new SavedState[size];
-            }
-        };
-    }
-
-    /**
-     * Saves the visibility of the secondary field.
-     */
-    @Override
-    protected Parcelable onSaveInstanceState() {
-        Parcelable superState = super.onSaveInstanceState();
-        SavedState ss = new SavedState(superState);
-
-        ss.mSecondaryVisible = mSecondaryVisible;
-        return ss;
-    }
-
-    /**
-     * Restores the visibility of the secondary field.
-     */
-    @Override
-    protected void onRestoreInstanceState(Parcelable state) {
-        SavedState ss = (SavedState) state;
-        super.onRestoreInstanceState(ss.getSuperState());
-
-        setSecondaryVisible(ss.mSecondaryVisible);
-    }
-}
diff --git a/src/com/android/contacts/ui/widget/DontPressWithParentImageView.java b/src/com/android/contacts/ui/widget/DontPressWithParentImageView.java
deleted file mode 100644
index bdb0e0a..0000000
--- a/src/com/android/contacts/ui/widget/DontPressWithParentImageView.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.ImageView;
-
-/**
- * Special class to to allow the parent to be pressed without being pressed itself.
- * This way the line of a tab can be pressed, but the image itself is not.
- */
-public class DontPressWithParentImageView extends ImageView {
-
-    public DontPressWithParentImageView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    public void setPressed(boolean pressed) {
-        // If the parent is pressed, do not set to pressed.
-        if (pressed && ((View) getParent()).isPressed()) {
-            return;
-        }
-        super.setPressed(pressed);
-    }
-}
diff --git a/src/com/android/contacts/ui/widget/GenericEditorView.java b/src/com/android/contacts/ui/widget/GenericEditorView.java
deleted file mode 100644
index 24262bb..0000000
--- a/src/com/android/contacts/ui/widget/GenericEditorView.java
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import com.android.contacts.ContactsUtils;
-import com.android.contacts.R;
-import com.android.contacts.model.Editor;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.ContactsSource.EditField;
-import com.android.contacts.model.ContactsSource.EditType;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Entity;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.telephony.PhoneNumberFormattingTextWatcher;
-import android.text.Editable;
-import android.text.InputType;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.util.AttributeSet;
-import android.view.ContextThemeWrapper;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.inputmethod.EditorInfo;
-import android.widget.ArrayAdapter;
-import android.widget.EditText;
-import android.widget.ListAdapter;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-import java.util.List;
-
-/**
- * Simple editor that handles labels and any {@link EditField} defined for
- * the entry. Uses {@link ValuesDelta} to read any existing
- * {@link Entity} values, and to correctly write any changes values.
- */
-public class GenericEditorView extends RelativeLayout implements Editor, View.OnClickListener {
-    protected static final int RES_FIELD = R.layout.item_editor_field;
-    protected static final int RES_LABEL_ITEM = android.R.layout.simple_list_item_1;
-
-    protected LayoutInflater mInflater;
-
-    protected static final int INPUT_TYPE_CUSTOM = EditorInfo.TYPE_CLASS_TEXT
-            | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS;
-
-    protected TextView mLabel;
-    protected ViewGroup mFields;
-    protected View mDelete;
-    protected View mMore;
-    protected View mLess;
-
-    protected DataKind mKind;
-    protected ValuesDelta mEntry;
-    protected EntityDelta mState;
-    protected boolean mReadOnly;
-
-    protected boolean mHideOptional = true;
-
-    protected EditType mType;
-    // Used only when a user tries to use custom label.
-    private EditType mPendingType;
-
-    private ViewIdGenerator mViewIdGenerator;
-
-    public GenericEditorView(Context context) {
-        super(context);
-    }
-
-    public GenericEditorView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void onFinishInflate() {
-        mInflater = (LayoutInflater)getContext().getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-
-        mLabel = (TextView)findViewById(R.id.edit_label);
-        mLabel.setOnClickListener(this);
-
-        mFields = (ViewGroup)findViewById(R.id.edit_fields);
-
-        mDelete = findViewById(R.id.edit_delete);
-        mDelete.setOnClickListener(this);
-
-        mMore = findViewById(R.id.edit_more);
-        mMore.setOnClickListener(this);
-
-        mLess = findViewById(R.id.edit_less);
-        mLess.setOnClickListener(this);
-    }
-
-    protected EditorListener mListener;
-
-    public void setEditorListener(EditorListener listener) {
-        mListener = listener;
-    }
-
-    public void setDeletable(boolean deletable) {
-        mDelete.setVisibility(deletable ? View.VISIBLE : View.INVISIBLE);
-    }
-
-    @Override
-    public void setEnabled(boolean enabled) {
-        mLabel.setEnabled(enabled);
-        final int count = mFields.getChildCount();
-        for (int pos = 0; pos < count; pos++) {
-            final View v = mFields.getChildAt(pos);
-            v.setEnabled(enabled);
-        }
-        mMore.setEnabled(enabled);
-        mLess.setEnabled(enabled);
-    }
-
-    /**
-     * Build the current label state based on selected {@link EditType} and
-     * possible custom label string.
-     */
-    private void rebuildLabel() {
-        // Handle undetected types
-        if (mType == null) {
-            mLabel.setText(R.string.unknown);
-            return;
-        }
-
-        if (mType.customColumn != null) {
-            // Use custom label string when present
-            final String customText = mEntry.getAsString(mType.customColumn);
-            if (customText != null) {
-                mLabel.setText(customText);
-                return;
-            }
-        }
-
-        // Otherwise fall back to using default label
-        mLabel.setText(mType.labelRes);
-    }
-
-    /** {@inheritDoc} */
-    public void onFieldChanged(String column, String value) {
-        // Field changes are saved directly
-        mEntry.put(column, value);
-        if (mListener != null) {
-            mListener.onRequest(EditorListener.FIELD_CHANGED);
-        }
-    }
-
-    public boolean isAnyFieldFilledOut() {
-        int childCount = mFields.getChildCount();
-        for (int i = 0; i < childCount; i++) {
-            EditText editorView = (EditText) mFields.getChildAt(i);
-            if (!TextUtils.isEmpty(editorView.getText())) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private void rebuildValues() {
-        setValues(mKind, mEntry, mState, mReadOnly, mViewIdGenerator);
-    }
-
-    /**
-     * Prepare this editor using the given {@link DataKind} for defining
-     * structure and {@link ValuesDelta} describing the content to edit.
-     */
-    public void setValues(DataKind kind, ValuesDelta entry, EntityDelta state, boolean readOnly,
-            ViewIdGenerator vig) {
-        mKind = kind;
-        mEntry = entry;
-        mState = state;
-        mReadOnly = readOnly;
-        mViewIdGenerator = vig;
-        setId(vig.getId(state, kind, entry, ViewIdGenerator.NO_VIEW_INDEX));
-
-        final boolean enabled = !readOnly;
-
-        if (!entry.isVisible()) {
-            // Hide ourselves entirely if deleted
-            setVisibility(View.GONE);
-            return;
-        } else {
-            setVisibility(View.VISIBLE);
-        }
-
-        // Display label selector if multiple types available
-        final boolean hasTypes = EntityModifier.hasEditTypes(kind);
-        mLabel.setVisibility(hasTypes ? View.VISIBLE : View.GONE);
-        mLabel.setEnabled(enabled);
-        if (hasTypes) {
-            mType = EntityModifier.getCurrentType(entry, kind);
-            rebuildLabel();
-        }
-
-        // Build out set of fields
-        mFields.removeAllViews();
-        boolean hidePossible = false;
-        int n = 0;
-        for (EditField field : kind.fieldList) {
-            // Inflate field from definition
-            EditText fieldView = (EditText)mInflater.inflate(RES_FIELD, mFields, false);
-            fieldView.setId(vig.getId(state, kind, entry, n++));
-            if (field.titleRes > 0) {
-                fieldView.setHint(field.titleRes);
-            }
-            int inputType = field.inputType;
-            fieldView.setInputType(inputType);
-            if (inputType == InputType.TYPE_CLASS_PHONE) {
-                fieldView.addTextChangedListener(new PhoneNumberFormattingTextWatcher());
-            }
-            fieldView.setMinLines(field.minLines);
-
-            // Read current value from state
-            final String column = field.column;
-            final String value = entry.getAsString(column);
-            fieldView.setText(value);
-
-            // Prepare listener for writing changes
-            fieldView.addTextChangedListener(new TextWatcher() {
-                public void afterTextChanged(Editable s) {
-                    // Trigger event for newly changed value
-                    onFieldChanged(column, s.toString());
-                }
-
-                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-                }
-
-                public void onTextChanged(CharSequence s, int start, int before, int count) {
-                }
-            });
-
-            // Hide field when empty and optional value
-            final boolean couldHide = (!ContactsUtils.isGraphic(value) && field.optional);
-            final boolean willHide = (mHideOptional && couldHide);
-            fieldView.setVisibility(willHide ? View.GONE : View.VISIBLE);
-            fieldView.setEnabled(enabled);
-            hidePossible = hidePossible || couldHide;
-
-            mFields.addView(fieldView);
-        }
-
-        // When hiding fields, place expandable
-        if (hidePossible) {
-            mMore.setVisibility(mHideOptional ? View.VISIBLE : View.GONE);
-            mLess.setVisibility(mHideOptional ? View.GONE : View.VISIBLE);
-        } else {
-            mMore.setVisibility(View.GONE);
-            mLess.setVisibility(View.GONE);
-        }
-        mMore.setEnabled(enabled);
-        mLess.setEnabled(enabled);
-    }
-
-    /**
-     * Prepare dialog for entering a custom label. The input value is trimmed: white spaces before
-     * and after the input text is removed.
-     * <p>
-     * If the final value is empty, this change request is ignored;
-     * no empty text is allowed in any custom label.
-     */
-    private Dialog createCustomDialog() {
-        final EditText customType = new EditText(mContext);
-        customType.setInputType(INPUT_TYPE_CUSTOM);
-        customType.requestFocus();
-
-        final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
-        builder.setTitle(R.string.customLabelPickerTitle);
-        builder.setView(customType);
-
-        builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                final String customText = customType.getText().toString().trim();
-                if (ContactsUtils.isGraphic(customText)) {
-                    // Now we're sure it's ok to actually change the type value.
-                    mType = mPendingType;
-                    mPendingType = null;
-                    mEntry.put(mKind.typeColumn, mType.rawValue);
-                    mEntry.put(mType.customColumn, customText);
-                    rebuildLabel();
-                    if (!mFields.hasFocus())
-                        mFields.requestFocus();
-                }
-            }
-        });
-
-        builder.setNegativeButton(android.R.string.cancel, null);
-
-        return builder.create();
-    }
-
-    /**
-     * Prepare dialog for picking a new {@link EditType} or entering a
-     * custom label. This dialog is limited to the valid types as determined
-     * by {@link EntityModifier}.
-     */
-    public Dialog createLabelDialog() {
-        // Build list of valid types, including the current value
-        final List<EditType> validTypes = EntityModifier.getValidTypes(mState, mKind, mType);
-
-        // Wrap our context to inflate list items using correct theme
-        final Context dialogContext = new ContextThemeWrapper(mContext,
-                android.R.style.Theme_Light);
-        final LayoutInflater dialogInflater = mInflater.cloneInContext(dialogContext);
-
-        final ListAdapter typeAdapter = new ArrayAdapter<EditType>(mContext, RES_LABEL_ITEM,
-                validTypes) {
-            @Override
-            public View getView(int position, View convertView, ViewGroup parent) {
-                if (convertView == null) {
-                    convertView = dialogInflater.inflate(RES_LABEL_ITEM, parent, false);
-                }
-
-                final EditType type = this.getItem(position);
-                final TextView textView = (TextView)convertView;
-                textView.setText(type.labelRes);
-                return textView;
-            }
-        };
-
-        final DialogInterface.OnClickListener clickListener =
-                new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                dialog.dismiss();
-
-                final EditType selected = validTypes.get(which);
-                if (selected.customColumn != null) {
-                    // Show custom label dialog if requested by type.
-                    //
-                    // Only when the custum value input in the next step is correct one.
-                    // this method also set the type value to what the user requested here.
-                    mPendingType = selected;
-                    createCustomDialog().show();
-                } else {
-                    // User picked type, and we're sure it's ok to actually write the entry.
-                    mType = selected;
-                    mEntry.put(mKind.typeColumn, mType.rawValue);
-                    rebuildLabel();
-                    if (!mFields.hasFocus())
-                        mFields.requestFocus();
-                }
-            }
-        };
-
-        final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
-        builder.setTitle(R.string.selectLabel);
-        builder.setSingleChoiceItems(typeAdapter, 0, clickListener);
-        return builder.create();
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View v) {
-        switch (v.getId()) {
-            case R.id.edit_label: {
-                createLabelDialog().show();
-                break;
-            }
-            case R.id.edit_delete: {
-                // Keep around in model, but mark as deleted
-                mEntry.markDeleted();
-
-                // Remove editor from parent view
-                final ViewGroup parent = (ViewGroup)getParent();
-                parent.removeView(this);
-
-                if (mListener != null) {
-                    // Notify listener when present
-                    mListener.onDeleted(this);
-                }
-                break;
-            }
-            case R.id.edit_more:
-            case R.id.edit_less: {
-                mHideOptional = !mHideOptional;
-                rebuildValues();
-                break;
-            }
-        }
-    }
-
-    private static class SavedState extends BaseSavedState {
-        public boolean mHideOptional;
-        public int[] mVisibilities;
-
-        SavedState(Parcelable superState) {
-            super(superState);
-        }
-
-        private SavedState(Parcel in) {
-            super(in);
-            mVisibilities = new int[in.readInt()];
-            in.readIntArray(mVisibilities);
-        }
-
-        @Override
-        public void writeToParcel(Parcel out, int flags) {
-            super.writeToParcel(out, flags);
-            out.writeInt(mVisibilities.length);
-            out.writeIntArray(mVisibilities);
-        }
-
-        public static final Parcelable.Creator<SavedState> CREATOR
-                = new Parcelable.Creator<SavedState>() {
-            public SavedState createFromParcel(Parcel in) {
-                return new SavedState(in);
-            }
-
-            public SavedState[] newArray(int size) {
-                return new SavedState[size];
-            }
-        };
-    }
-
-    /**
-     * Saves the visibility of the child EditTexts, and mHideOptional.
-     */
-    @Override
-    protected Parcelable onSaveInstanceState() {
-        Parcelable superState = super.onSaveInstanceState();
-        SavedState ss = new SavedState(superState);
-
-        ss.mHideOptional = mHideOptional;
-
-        final int numChildren = mFields.getChildCount();
-        ss.mVisibilities = new int[numChildren];
-        for (int i = 0; i < numChildren; i++) {
-            ss.mVisibilities[i] = mFields.getChildAt(i).getVisibility();
-        }
-
-        return ss;
-    }
-
-    /**
-     * Restores the visibility of the child EditTexts, and mHideOptional.
-     */
-    @Override
-    protected void onRestoreInstanceState(Parcelable state) {
-        SavedState ss = (SavedState) state;
-        super.onRestoreInstanceState(ss.getSuperState());
-
-        mHideOptional = ss.mHideOptional;
-
-        int numChildren = Math.min(mFields.getChildCount(), ss.mVisibilities.length);
-        for (int i = 0; i < numChildren; i++) {
-            mFields.getChildAt(i).setVisibility(ss.mVisibilities[i]);
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/widget/KindSectionView.java b/src/com/android/contacts/ui/widget/KindSectionView.java
deleted file mode 100644
index 221bc16..0000000
--- a/src/com/android/contacts/ui/widget/KindSectionView.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import com.android.contacts.R;
-import com.android.contacts.model.Editor;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.Editor.EditorListener;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.content.Context;
-import android.provider.ContactsContract.Data;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.View.OnClickListener;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-/**
- * Custom view for an entire section of data as segmented by
- * {@link DataKind} around a {@link Data#MIMETYPE}. This view shows a
- * section header and a trigger for adding new {@link Data} rows.
- */
-public class KindSectionView extends LinearLayout implements OnClickListener, EditorListener {
-    private static final String TAG = "KindSectionView";
-
-    private LayoutInflater mInflater;
-
-    private ViewGroup mEditors;
-    private View mAdd;
-    private ImageView mAddPlusButton;
-    private TextView mTitle;
-
-    private DataKind mKind;
-    private EntityDelta mState;
-    private boolean mReadOnly;
-
-    private ViewIdGenerator mViewIdGenerator;
-
-    public KindSectionView(Context context) {
-        super(context);
-    }
-
-    public KindSectionView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void onFinishInflate() {
-        mInflater = (LayoutInflater)getContext().getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-
-        setDrawingCacheEnabled(true);
-        setAlwaysDrawnWithCacheEnabled(true);
-
-        mEditors = (ViewGroup)findViewById(R.id.kind_editors);
-
-        mAdd = findViewById(R.id.kind_header);
-        mAdd.setOnClickListener(this);
-
-        mAddPlusButton = (ImageView) findViewById(R.id.kind_plus);
-
-        mTitle = (TextView)findViewById(R.id.kind_title);
-    }
-
-    /** {@inheritDoc} */
-    public void onDeleted(Editor editor) {
-        this.updateAddEnabled();
-        this.updateEditorsVisible();
-    }
-
-    /** {@inheritDoc} */
-    public void onRequest(int request) {
-        // Ignore requests
-    }
-
-    public void setState(DataKind kind, EntityDelta state, boolean readOnly, ViewIdGenerator vig) {
-        mKind = kind;
-        mState = state;
-        mReadOnly = readOnly;
-        mViewIdGenerator = vig;
-
-        setId(mViewIdGenerator.getId(state, kind, null, ViewIdGenerator.NO_VIEW_INDEX));
-
-        // TODO: handle resources from remote packages
-        mTitle.setText(kind.titleRes);
-
-        // Only show the add button if this is a list
-        mAddPlusButton.setVisibility(mKind.isList ? View.VISIBLE : View.GONE);
-
-        this.rebuildFromState();
-        this.updateAddEnabled();
-        this.updateEditorsVisible();
-    }
-
-    public boolean isAnyEditorFilledOut() {
-        if (mState == null) {
-            return false;
-        }
-
-        if (!mState.hasMimeEntries(mKind.mimeType)) {
-            return false;
-        }
-
-        int editorCount = mEditors.getChildCount();
-        for (int i = 0; i < editorCount; i++) {
-            GenericEditorView editorView = (GenericEditorView) mEditors.getChildAt(i);
-            if (editorView.isAnyFieldFilledOut()) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Build editors for all current {@link #mState} rows.
-     */
-    public void rebuildFromState() {
-        // Remove any existing editors
-        mEditors.removeAllViews();
-
-        // Check if we are displaying anything here
-        boolean hasEntries = mState.hasMimeEntries(mKind.mimeType);
-
-        if (!mKind.isList) {
-            if (hasEntries) {
-                // we might have no visible entries. check that, too
-                for (ValuesDelta entry : mState.getMimeEntries(mKind.mimeType)) {
-                    if (!entry.isVisible()) {
-                        hasEntries = false;
-                        break;
-                    }
-                }
-            }
-
-            if (!hasEntries) {
-                EntityModifier.insertChild(mState, mKind);
-                hasEntries = true;
-            }
-        }
-
-        if (hasEntries) {
-            int entryIndex = 0;
-            for (ValuesDelta entry : mState.getMimeEntries(mKind.mimeType)) {
-                // Skip entries that aren't visible
-                if (!entry.isVisible()) continue;
-
-                final GenericEditorView editor = (GenericEditorView)mInflater.inflate(
-                        R.layout.item_generic_editor, mEditors, false);
-                editor.setValues(mKind, entry, mState, mReadOnly, mViewIdGenerator);
-                // older versions of android had lists where we now have a single value
-                // in these cases we should show the remove button for all but the first value
-                // to ensure that nothing is removed
-                editor.mDelete.setVisibility((mKind.isList || (entryIndex != 0))
-                        ? View.VISIBLE : View.GONE);
-                editor.setEditorListener(this);
-                mEditors.addView(editor);
-                entryIndex++;
-            }
-        }
-    }
-
-    protected void updateEditorsVisible() {
-        final boolean hasChildren = mEditors.getChildCount() > 0;
-        mEditors.setVisibility(hasChildren ? View.VISIBLE : View.GONE);
-    }
-
-    protected void updateAddEnabled() {
-        // Set enabled state on the "add" view
-        final boolean canInsert = EntityModifier.canInsert(mState, mKind);
-        final boolean isEnabled = !mReadOnly && canInsert;
-        mAdd.setEnabled(isEnabled);
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View v) {
-        // if this is not a list the plus button is not visible but the user might have clicked
-        // the text.
-        if (!mKind.isList)
-            return;
-
-        // Insert a new child and rebuild
-        final ValuesDelta newValues = EntityModifier.insertChild(mState, mKind);
-        this.rebuildFromState();
-        this.updateAddEnabled();
-        this.updateEditorsVisible();
-
-        // Find the newly added EditView and set focus.
-        final int newFieldId = mViewIdGenerator.getId(mState, mKind, newValues, 0);
-        final View newField = findViewById(newFieldId);
-        if (newField != null) {
-            newField.requestFocus();
-        }
-    }
-}
diff --git a/src/com/android/contacts/ui/widget/PhotoEditorView.java b/src/com/android/contacts/ui/widget/PhotoEditorView.java
deleted file mode 100644
index eff39d0..0000000
--- a/src/com/android/contacts/ui/widget/PhotoEditorView.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import com.android.contacts.R;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.model.Editor;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.ImageView;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-/**
- * Simple editor for {@link Photo}.
- */
-public class PhotoEditorView extends ImageView implements Editor, OnClickListener {
-    private static final String TAG = "PhotoEditorView";
-
-    private ValuesDelta mEntry;
-    private EditorListener mListener;
-
-    private boolean mHasSetPhoto = false;
-    private boolean mReadOnly;
-
-    public PhotoEditorView(Context context) {
-        super(context);
-    }
-
-    public PhotoEditorView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-        this.setOnClickListener(this);
-    }
-
-    /** {@inheritDoc} */
-    public void onClick(View v) {
-        if (mListener != null) {
-            mListener.onRequest(EditorListener.REQUEST_PICK_PHOTO);
-        }
-    }
-
-    /** {@inheritDoc} */
-    public void onFieldChanged(String column, String value) {
-        throw new UnsupportedOperationException("Photos don't support direct field changes");
-    }
-
-    /** {@inheritDoc} */
-    public void setValues(DataKind kind, ValuesDelta values, EntityDelta state, boolean readOnly,
-            ViewIdGenerator vig) {
-        mEntry = values;
-        mReadOnly = readOnly;
-
-        setId(vig.getId(state, kind, values, 0));
-
-        if (values != null) {
-            // Try decoding photo if actual entry
-            final byte[] photoBytes = values.getAsByteArray(Photo.PHOTO);
-            if (photoBytes != null) {
-                final Bitmap photo = BitmapFactory.decodeByteArray(photoBytes, 0,
-                        photoBytes.length);
-
-                setScaleType(ImageView.ScaleType.CENTER_CROP);
-                setImageBitmap(photo);
-                setEnabled(true);
-                mHasSetPhoto = true;
-                mEntry.setFromTemplate(false);
-            } else {
-                resetDefault();
-            }
-        } else {
-            resetDefault();
-        }
-    }
-
-    /**
-     * Return true if a valid {@link Photo} has been set.
-     */
-    public boolean hasSetPhoto() {
-        return mHasSetPhoto;
-    }
-
-    /**
-     * Assign the given {@link Bitmap} as the new value, updating UI and
-     * readying for persisting through {@link ValuesDelta}.
-     */
-    public void setPhotoBitmap(Bitmap photo) {
-        if (photo == null) {
-            // Clear any existing photo and return
-            mEntry.put(Photo.PHOTO, (byte[])null);
-            resetDefault();
-            return;
-        }
-
-        final int size = photo.getWidth() * photo.getHeight() * 4;
-        final ByteArrayOutputStream out = new ByteArrayOutputStream(size);
-
-        try {
-            photo.compress(Bitmap.CompressFormat.PNG, 100, out);
-            out.flush();
-            out.close();
-
-            mEntry.put(Photo.PHOTO, out.toByteArray());
-            setImageBitmap(photo);
-            setEnabled(true);
-            mHasSetPhoto = true;
-            mEntry.setFromTemplate(false);
-
-            // When the user chooses a new photo mark it as super primary
-            mEntry.put(Photo.IS_SUPER_PRIMARY, 1);
-        } catch (IOException e) {
-            Log.w(TAG, "Unable to serialize photo: " + e.toString());
-        }
-    }
-
-    /**
-     * Set the super primary bit on the photo.
-     */
-    public void setSuperPrimary(boolean superPrimary) {
-        mEntry.put(Photo.IS_SUPER_PRIMARY, superPrimary ? 1 : 0);
-    }
-
-    protected void resetDefault() {
-        // Invalid photo, show default "add photo" place-holder
-        setScaleType(ImageView.ScaleType.CENTER);
-        if (mReadOnly) {
-            setImageResource(R.drawable.ic_contact_picture);
-            setEnabled(false);
-        } else {
-            setImageResource(R.drawable.ic_menu_add_picture);
-            setEnabled(true);
-        }
-        mHasSetPhoto = false;
-        mEntry.setFromTemplate(true);
-    }
-
-    /** {@inheritDoc} */
-    public void setEditorListener(EditorListener listener) {
-        mListener = listener;
-    }
-}
diff --git a/src/com/android/contacts/ui/widget/ReadOnlyContactEditorView.java b/src/com/android/contacts/ui/widget/ReadOnlyContactEditorView.java
deleted file mode 100644
index 4635f6a..0000000
--- a/src/com/android/contacts/ui/widget/ReadOnlyContactEditorView.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*
- * Copyright (C) 2009 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.ui.widget;
-
-import com.android.contacts.R;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.ContactsSource.EditType;
-import com.android.contacts.model.Editor.EditorListener;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.android.contacts.ui.ViewIdGenerator;
-
-import android.content.Context;
-import android.content.Entity;
-import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.provider.ContactsContract.CommonDataKinds.Photo;
-import android.provider.ContactsContract.CommonDataKinds.StructuredName;
-import android.telephony.PhoneNumberUtils;
-import android.text.TextUtils;
-import android.util.AttributeSet;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-
-/**
- * Custom view that displays read-only contacts in the edit screen.
- */
-class ReadOnlyContactEditorView extends BaseContactEditorView {
-
-    private View mPhotoStub;
-    private TextView mName;
-    private TextView mReadOnlyWarning;
-    private ViewGroup mGeneral;
-
-    private View mHeaderColorBar;
-    private View mSideBar;
-    private ImageView mHeaderIcon;
-    private TextView mHeaderAccountType;
-    private TextView mHeaderAccountName;
-
-    private long mRawContactId = -1;
-
-    public ReadOnlyContactEditorView(Context context) {
-        super(context);
-    }
-
-    public ReadOnlyContactEditorView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mInflater = (LayoutInflater)getContext().getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-
-        mPhoto = (PhotoEditorView)findViewById(R.id.edit_photo);
-        mPhotoStub = findViewById(R.id.stub_photo);
-
-        mName = (TextView) findViewById(R.id.read_only_name);
-        mReadOnlyWarning = (TextView) findViewById(R.id.read_only_warning);
-        mGeneral = (ViewGroup)findViewById(R.id.sect_general);
-
-        mHeaderColorBar = findViewById(R.id.header_color_bar);
-        mSideBar = findViewById(R.id.color_bar);
-        mHeaderIcon = (ImageView) findViewById(R.id.header_icon);
-        mHeaderAccountType = (TextView) findViewById(R.id.header_account_type);
-        mHeaderAccountName = (TextView) findViewById(R.id.header_account_name);
-    }
-
-    /**
-     * Set the internal state for this view, given a current
-     * {@link EntityDelta} state and the {@link ContactsSource} that
-     * apply to that state.
-     *
-     * TODO: make this more generic using data from the source
-     */
-    @Override
-    public void setState(EntityDelta state, ContactsSource source, ViewIdGenerator vig) {
-        // Remove any existing sections
-        mGeneral.removeAllViews();
-
-        // Bail if invalid state or source
-        if (state == null || source == null) return;
-
-        // Make sure we have StructuredName
-        EntityModifier.ensureKindExists(state, source, StructuredName.CONTENT_ITEM_TYPE);
-
-        // Fill in the header info
-        ValuesDelta values = state.getValues();
-        String accountName = values.getAsString(RawContacts.ACCOUNT_NAME);
-        CharSequence accountType = source.getDisplayLabel(mContext);
-        if (TextUtils.isEmpty(accountType)) {
-            accountType = mContext.getString(R.string.account_phone);
-        }
-        if (!TextUtils.isEmpty(accountName)) {
-            mHeaderAccountName.setText(
-                    mContext.getString(R.string.from_account_format, accountName));
-        }
-        mHeaderAccountType.setText(mContext.getString(R.string.account_type_format, accountType));
-        mHeaderIcon.setImageDrawable(source.getDisplayIcon(mContext));
-
-        mRawContactId = values.getAsLong(RawContacts._ID);
-
-        ValuesDelta primary;
-
-        // Photo
-        DataKind kind = source.getKindForMimetype(Photo.CONTENT_ITEM_TYPE);
-        if (kind != null) {
-            EntityModifier.ensureKindExists(state, source, Photo.CONTENT_ITEM_TYPE);
-            mHasPhotoEditor = (source.getKindForMimetype(Photo.CONTENT_ITEM_TYPE) != null);
-            primary = state.getPrimaryEntry(Photo.CONTENT_ITEM_TYPE);
-            mPhoto.setValues(kind, primary, state, source.readOnly, vig);
-            if (!mHasPhotoEditor || !mPhoto.hasSetPhoto()) {
-                mPhotoStub.setVisibility(View.GONE);
-            } else {
-                mPhotoStub.setVisibility(View.VISIBLE);
-            }
-        } else {
-            mPhotoStub.setVisibility(View.VISIBLE);
-        }
-
-        // Name
-        primary = state.getPrimaryEntry(StructuredName.CONTENT_ITEM_TYPE);
-        mName.setText(primary.getAsString(StructuredName.DISPLAY_NAME));
-
-        // Read only warning
-        mReadOnlyWarning.setText(mContext.getString(R.string.contact_read_only, accountType));
-
-        // Phones
-        ArrayList<ValuesDelta> phones = state.getMimeEntries(Phone.CONTENT_ITEM_TYPE);
-        if (phones != null) {
-            for (ValuesDelta phone : phones) {
-                View field = mInflater.inflate(
-                        R.layout.item_read_only_field, mGeneral, false);
-                TextView v;
-                v = (TextView) field.findViewById(R.id.label);
-                v.setText(mContext.getText(R.string.phoneLabelsGroup));
-                v = (TextView) field.findViewById(R.id.data);
-                v.setText(PhoneNumberUtils.formatNumber(phone.getAsString(Phone.NUMBER)));
-                mGeneral.addView(field);
-            }
-        }
-
-        // Emails
-        ArrayList<ValuesDelta> emails = state.getMimeEntries(Email.CONTENT_ITEM_TYPE);
-        if (emails != null) {
-            for (ValuesDelta email : emails) {
-                View field = mInflater.inflate(
-                        R.layout.item_read_only_field, mGeneral, false);
-                TextView v;
-                v = (TextView) field.findViewById(R.id.label);
-                v.setText(mContext.getText(R.string.emailLabelsGroup));
-                v = (TextView) field.findViewById(R.id.data);
-                v.setText(email.getAsString(Email.DATA));
-                mGeneral.addView(field);
-            }
-        }
-
-        // Hide mGeneral if it's empty
-        if (mGeneral.getChildCount() > 0) {
-            mGeneral.setVisibility(View.VISIBLE);
-        } else {
-            mGeneral.setVisibility(View.GONE);
-        }
-    }
-
-    /**
-     * Sets the {@link EditorListener} on the name field
-     */
-    @Override
-    public void setNameEditorListener(EditorListener listener) {
-        // do nothing
-    }
-
-    @Override
-    public long getRawContactId() {
-        return mRawContactId;
-    }
-}
diff --git a/src/com/android/contacts/util/AccountSelectionUtil.java b/src/com/android/contacts/util/AccountSelectionUtil.java
index cc46d2b..6609a87 100644
--- a/src/com/android/contacts/util/AccountSelectionUtil.java
+++ b/src/com/android/contacts/util/AccountSelectionUtil.java
@@ -16,18 +16,13 @@
 
 package com.android.contacts.util;
 
-import com.android.contacts.ImportVCardActivity;
-import com.android.contacts.R;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.GoogleSource;
-import com.android.contacts.model.Sources;
-
 import android.accounts.Account;
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
+import android.net.Uri;
 import android.util.Log;
 import android.view.ContextThemeWrapper;
 import android.view.LayoutInflater;
@@ -35,7 +30,10 @@
 import android.view.ViewGroup;
 import android.widget.ArrayAdapter;
 import android.widget.TextView;
-import android.net.Uri;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.AccountTypes;
 
 import java.util.List;
 
@@ -89,7 +87,7 @@
     public static Dialog getSelectAccountDialog(Context context, int resId,
             DialogInterface.OnClickListener onClickListener,
             DialogInterface.OnCancelListener onCancelListener) {
-        final Sources sources = Sources.getInstance(context);
+        final AccountTypes sources = AccountTypes.getInstance(context);
         final List<Account> writableAccountList = sources.getAccounts(true);
 
         // Assume accountList.size() > 1
@@ -118,9 +116,9 @@
                         (TextView)convertView.findViewById(android.R.id.text2);
 
                 final Account account = this.getItem(position);
-                final ContactsSource source =
+                final BaseAccountType source =
                     sources.getInflatedSource(account.type,
-                            ContactsSource.LEVEL_SUMMARY);
+                            BaseAccountType.LEVEL_SUMMARY);
                 final Context context = getContext();
 
                 text1.setText(account.name);
@@ -163,10 +161,6 @@
     }
 
     public static void doImportFromSim(Context context, Account account) {
-        if (account != null) {
-            GoogleSource.createMyContactsIfNotExist(account, context);
-        }
-
         Intent importIntent = new Intent(Intent.ACTION_VIEW);
         importIntent.setType("vnd.android.cursor.item/sim-contact");
         if (account != null) {
@@ -178,11 +172,8 @@
     }
 
     public static void doImportFromSdCard(Context context, Account account) {
-        if (account != null) {
-            GoogleSource.createMyContactsIfNotExist(account, context);
-        }
-
-        Intent importIntent = new Intent(context, ImportVCardActivity.class);
+        Intent importIntent = new Intent(context,
+                com.android.contacts.vcard.ImportVCardActivity.class);
         if (account != null) {
             importIntent.putExtra("account_name", account.name);
             importIntent.putExtra("account_type", account.type);
diff --git a/src/com/android/contacts/util/Constants.java b/src/com/android/contacts/util/Constants.java
index a94608b..1d1e4e2 100644
--- a/src/com/android/contacts/util/Constants.java
+++ b/src/com/android/contacts/util/Constants.java
@@ -16,14 +16,8 @@
 
 package com.android.contacts.util;
 
-import android.app.Service;
 import android.provider.ContactsContract.CommonDataKinds.Phone;
 
-/**
- * Background {@link Service} that is used to keep our process alive long enough
- * for background threads to finish. Started and stopped directly by specific
- * background tasks when needed.
- */
 public class Constants {
     /**
      * Specific MIME-type for {@link Phone#CONTENT_ITEM_TYPE} entries that
diff --git a/src/com/android/contacts/util/ContactBadgeUtil.java b/src/com/android/contacts/util/ContactBadgeUtil.java
new file mode 100644
index 0000000..d779701
--- /dev/null
+++ b/src/com/android/contacts/util/ContactBadgeUtil.java
@@ -0,0 +1,163 @@
+/*
+ * 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.util;
+
+import com.android.contacts.R;
+import com.android.contacts.views.ContactLoader;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Entity;
+import android.content.Entity.NamedContentValues;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.content.res.Resources.NotFoundException;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.os.SystemClock;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.text.TextUtils;
+import android.text.format.DateUtils;
+import android.util.Log;
+
+/**
+ * Provides static functions to extract summary information for aggregate contacts
+ */
+public class ContactBadgeUtil {
+    private static final String TAG = "ContactBadgeUtil";
+
+    /**
+     * Looks for the photo data item in entities. If found, creates a new Bitmap instance. If
+     * not found, returns null
+     */
+    public static Bitmap getPhoto(ContactLoader.Result contactData) {
+        final long photoId = contactData.getPhotoId();
+        if (photoId <= 0) {
+            // No photo ID
+            return null;
+        }
+
+        for (Entity entity : contactData.getEntities()) {
+            for (NamedContentValues subValue : entity.getSubValues()) {
+                final ContentValues entryValues = subValue.values;
+                final long dataId = entryValues.getAsLong(Data._ID);
+                if (dataId == photoId) {
+                    final String mimeType = entryValues.getAsString(Data.MIMETYPE);
+                    // Correct Data Id but incorrect MimeType? Don't load
+                    if (!Photo.CONTENT_ITEM_TYPE.equals(mimeType)) return null;
+                    final byte[] binaryData = entryValues.getAsByteArray(Photo.PHOTO);
+                    if (binaryData == null) return null;
+                    return BitmapFactory.decodeByteArray(binaryData, 0, binaryData.length);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Returns the social snippet attribution, including the date
+     */
+    public static CharSequence getSocialDate(ContactLoader.Result contactData,
+            Context context) {
+        if (TextUtils.isEmpty(contactData.getSocialSnippet())) {
+            return null;
+        }
+
+        final CharSequence timestampDisplayValue;
+
+        final Long statusTimestamp = contactData.getStatusTimestamp();
+        if (statusTimestamp  != null) {
+            // Set the date/time field by mixing relative and absolute
+            // times.
+            int flags = DateUtils.FORMAT_ABBREV_RELATIVE;
+
+            timestampDisplayValue = DateUtils.getRelativeTimeSpanString(
+                    statusTimestamp.longValue(), System.currentTimeMillis(),
+                    DateUtils.MINUTE_IN_MILLIS, flags);
+        } else {
+            timestampDisplayValue = null;
+        }
+
+
+        String labelDisplayValue = null;
+
+        final Integer statusLabel = contactData.getStatusLabel();
+        final String statusResPackage = contactData.getStatusResPackage();
+        if (statusLabel  != null) {
+            Resources resources;
+            if (TextUtils.isEmpty(statusResPackage)) {
+                resources = context.getResources();
+            } else {
+                PackageManager pm = context.getPackageManager();
+                try {
+                    resources = pm.getResourcesForApplication(statusResPackage);
+                } catch (NameNotFoundException e) {
+                    Log.w(TAG, "Contact status update resource package not found: "
+                            + statusResPackage);
+                    resources = null;
+                }
+            }
+
+            if (resources != null) {
+                try {
+                    labelDisplayValue = resources.getString(statusLabel.intValue());
+                } catch (NotFoundException e) {
+                    Log.w(TAG, "Contact status update resource not found: " + statusResPackage + "@"
+                            + statusLabel.intValue());
+                }
+            }
+        }
+
+        final CharSequence attribution;
+        if (timestampDisplayValue != null && labelDisplayValue != null) {
+            attribution = context.getString(
+                    R.string.contact_status_update_attribution_with_date,
+                    timestampDisplayValue, labelDisplayValue);
+        } else if (timestampDisplayValue == null && labelDisplayValue != null) {
+            attribution = context.getString(
+                    R.string.contact_status_update_attribution,
+                    labelDisplayValue);
+        } else if (timestampDisplayValue != null) {
+            attribution = timestampDisplayValue;
+        } else {
+            attribution = null;
+        }
+        return attribution;
+    }
+
+    public static Bitmap loadPlaceholderPhoto(Context context) {
+        // Set the photo with a random "no contact" image
+        final long now = SystemClock.elapsedRealtime();
+        final int num = (int) now & 0xf;
+        final int resourceId;
+        if (num < 9) {
+            // Leaning in from right, common
+            resourceId = R.drawable.ic_contact_picture;
+        } else if (num < 14) {
+            // Leaning in from left uncommon
+            resourceId = R.drawable.ic_contact_picture_2;
+        } else {
+            // Coming in from the top, rare
+            resourceId = R.drawable.ic_contact_picture_3;
+        }
+
+        return BitmapFactory.decodeResource(context.getResources(), resourceId);
+    }
+}
diff --git a/src/com/android/contacts/util/DataStatus.java b/src/com/android/contacts/util/DataStatus.java
index 88c6594..ec3c1e5 100644
--- a/src/com/android/contacts/util/DataStatus.java
+++ b/src/com/android/contacts/util/DataStatus.java
@@ -24,6 +24,8 @@
 import android.text.TextUtils;
 import android.text.format.DateUtils;
 
+import com.android.contacts.R;
+
 /**
  * Storage for a social status update. Holds a single update, but can use
  * {@link #possibleUpdate(Cursor)} to consider updating when a better status
@@ -112,11 +114,11 @@
 
         if (validTimestamp && validLabel) {
             return context.getString(
-                    com.android.internal.R.string.contact_status_update_attribution_with_date,
+                    R.string.contact_status_update_attribution_with_date,
                     timeClause, labelClause);
         } else if (validLabel) {
             return context.getString(
-                    com.android.internal.R.string.contact_status_update_attribution,
+                    R.string.contact_status_update_attribution,
                     labelClause);
         } else if (validTimestamp) {
             return timeClause;
diff --git a/src/com/android/contacts/util/DateUtils.java b/src/com/android/contacts/util/DateUtils.java
new file mode 100644
index 0000000..39eeb84
--- /dev/null
+++ b/src/com/android/contacts/util/DateUtils.java
@@ -0,0 +1,102 @@
+/*
+ * 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.util;
+
+import android.content.Context;
+import android.text.format.DateFormat;
+
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Utility methods for processing dates.
+ */
+public class DateUtils {
+
+    private static final SimpleDateFormat NO_YEAR_DATE_FORMAT = new SimpleDateFormat("--MM-dd");
+
+    private static final SimpleDateFormat[] DATE_FORMATS = {
+        NO_YEAR_DATE_FORMAT,
+        new SimpleDateFormat("yyyy-MM-dd"),
+        new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"),
+    };
+    static {
+        for (SimpleDateFormat format : DATE_FORMATS) {
+            format.setLenient(true);
+        }
+    }
+
+    private static final java.text.DateFormat FORMAT_WITHOUT_YEAR_MONTH_FIRST =
+            new SimpleDateFormat("MMMM dd");
+
+    private static final java.text.DateFormat FORMAT_WITHOUT_YEAR_DATE_FIRST =
+            new SimpleDateFormat("dd MMMM");
+
+    /**
+     * Parses the supplied string to see if it looks like a date. If so,
+     * returns the same date in a cleaned-up format.  Otherwise, returns
+     * the supplied string unchanged.
+     */
+    public static String formatDate(Context context, String string) {
+        if (string == null) {
+            return null;
+        }
+
+        string = string.trim();
+        if (string.length() == 0) {
+            return string;
+        }
+
+        ParsePosition parsePosition = new ParsePosition(0);
+
+        for (int i = 0; i < DATE_FORMATS.length; i++) {
+            SimpleDateFormat f = DATE_FORMATS[i];
+            synchronized (f) {
+                parsePosition.setIndex(0);
+                Date date = f.parse(string, parsePosition);
+                if (parsePosition.getIndex() == string.length()) {
+                    java.text.DateFormat outFormat;
+                    if (f == NO_YEAR_DATE_FORMAT) {
+                        outFormat = isMonthBeforeDate(context) ? FORMAT_WITHOUT_YEAR_MONTH_FIRST
+                                : FORMAT_WITHOUT_YEAR_DATE_FIRST;
+                    } else {
+                        outFormat = DateFormat.getDateFormat(context);
+                    }
+
+                    synchronized (outFormat) {
+                        return outFormat.format(date);
+                    }
+                }
+            }
+        }
+        return string;
+    }
+
+    private static boolean isMonthBeforeDate(Context context) {
+        char[] dateFormatOrder = DateFormat.getDateFormatOrder(context);
+        for (int i = 0; i < dateFormatOrder.length; i++) {
+            if (dateFormatOrder[i] == DateFormat.DATE) {
+                return false;
+            }
+            if (dateFormatOrder[i] == DateFormat.MONTH) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/util/DialogManager.java b/src/com/android/contacts/util/DialogManager.java
new file mode 100644
index 0000000..f1bae0f
--- /dev/null
+++ b/src/com/android/contacts/util/DialogManager.java
@@ -0,0 +1,129 @@
+/*
+ * 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.util;
+
+import com.android.contacts.R;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnDismissListener;
+import android.os.Bundle;
+import android.view.View;
+
+/**
+ * Manages creation and destruction of Dialogs that are to be shown by Views. Unlike how Dialogs
+ * are regularly used, the Dialogs are not recycled but immediately destroyed after dismissal.
+ * To be able to do that, two IDs are required which are used consecutively.
+ * How to use:<ul>
+ * <li>The owning Activity creates on instance of this class, passing itself and two Ids that are
+ *    not used by other Dialogs of the Activity.</li>
+ * <li>Views owning Dialogs must implement {@link DialogManager.DialogShowingView}</li>
+ * <li>After creating the Views, configureManagingViews must be called to configure all views
+ *    that implement {@link DialogManager.DialogShowingView}</li>
+ * <li>In the implementation of {@link Activity#onCreateDialog}, calls for the
+ *    ViewId are forwarded to {@link DialogManager#onCreateDialog(int, Bundle)}</li>
+ * </ul>
+ * To actually show a Dialog, the View uses {@link DialogManager#showDialogInView(View, Bundle)},
+ * passing itself as a first parameter
+ */
+public class DialogManager {
+    private final Activity mActivity;
+    private boolean mUseDialogId2 = false;
+    public final static String VIEW_ID_KEY = "view_id";
+
+    public static final boolean isManagedId(int id) {
+        return (id == R.id.dialog_manager_id_1) || (id == R.id.dialog_manager_id_2);
+    }
+
+    /**
+     * Creates a new instance of this class for the given Activity.
+     * @param activity The activity this object is used for
+     */
+    public DialogManager(final Activity activity) {
+        if (activity == null) throw new IllegalArgumentException("activity must not be null");
+        mActivity = activity;
+    }
+
+    /**
+     * Called by a View to show a dialog. It has to pass itself and a Bundle with extra information.
+     * If the view can show several dialogs, it should distinguish them using an item in the Bundle.
+     * The View needs to have a valid and unique Id. This function modifies the bundle by adding a
+     * new item named {@link DialogManager#VIEW_ID_KEY}
+     */
+    public void showDialogInView(final View view, final Bundle bundle) {
+        final int viewId = view.getId();
+        if (bundle.containsKey(VIEW_ID_KEY)) {
+            throw new IllegalArgumentException("Bundle already contains a " + VIEW_ID_KEY);
+        }
+        if (viewId == View.NO_ID) {
+            throw new IllegalArgumentException("View does not have a proper ViewId");
+        }
+        bundle.putInt(VIEW_ID_KEY, viewId);
+        int dialogId = mUseDialogId2 ? R.id.dialog_manager_id_2 : R.id.dialog_manager_id_1;
+        mActivity.showDialog(dialogId, bundle);
+    }
+
+    /**
+     * Callback function called by the Activity to handle View-managed Dialogs.
+     * This function returns null if the id is not one of the two reserved Ids.
+     */
+    public Dialog onCreateDialog(final int id, final Bundle bundle) {
+        if (id == R.id.dialog_manager_id_1) {
+            mUseDialogId2 = true;
+        } else if (id == R.id.dialog_manager_id_2) {
+            mUseDialogId2 = false;
+        } else {
+            return null;
+        }
+        if (!bundle.containsKey(VIEW_ID_KEY)) {
+            throw new IllegalArgumentException("Bundle does not contain a ViewId");
+        }
+        final int viewId = bundle.getInt(VIEW_ID_KEY);
+        final View view = mActivity.findViewById(viewId);
+        if (view == null || !(view instanceof DialogShowingView)) {
+            return null;
+        }
+        final Dialog dialog = ((DialogShowingView)view).createDialog(bundle);
+
+        // As we will never re-use this dialog, we can completely kill it here
+        dialog.setOnDismissListener(new OnDismissListener() {
+            public void onDismiss(DialogInterface dialogInterface) {
+                mActivity.removeDialog(id);
+            }
+        });
+        return dialog;
+    }
+
+    /**
+     * Interface to implemented by Views that show Dialogs
+     */
+    public interface DialogShowingView {
+        /**
+         * Callback function to create a Dialog. Notice that the DialogManager overwrites the
+         * OnDismissListener on the returned Dialog, so the View should not use this Listener itself
+         */
+        Dialog createDialog(Bundle bundle);
+    }
+
+    /**
+     * Interface to implemented by Activities that host View-showing dialogs
+     */
+    public interface DialogShowingViewActivity {
+        DialogManager getDialogManager();
+    }
+}
diff --git a/src/com/android/contacts/util/LocalizedNameResolver.java b/src/com/android/contacts/util/LocalizedNameResolver.java
new file mode 100644
index 0000000..c2ee90a
--- /dev/null
+++ b/src/com/android/contacts/util/LocalizedNameResolver.java
@@ -0,0 +1,161 @@
+/*
+ * 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.util;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.accounts.AccountManager;
+import android.accounts.AuthenticatorDescription;
+import android.content.Context;
+import android.content.pm.PackageInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.ServiceInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
+import android.content.res.Resources.NotFoundException;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.util.Xml;
+
+import java.io.IOException;
+
+/**
+ * Retrieves localized names per account type. This allows customizing texts like
+ * "All Contacts" for certain account types, but e.g. "All Friends" or "All Connections" for others.
+ */
+public class LocalizedNameResolver  {
+    private static final String TAG = "LocalizedNameResolver";
+
+    /**
+     * Meta-data key for the contacts configuration associated with a sync service.
+     */
+    private static final String METADATA_CONTACTS = "android.provider.CONTACTS_STRUCTURE";
+
+    private static final String CONTACTS_DATA_KIND = "ContactsDataKind";
+
+    /**
+     * Returns the name for All Contacts for the specified account type.
+     */
+    public static String getAllContactsName(Context context, String accountType) {
+        if (context == null) throw new IllegalArgumentException("Context must not be null");
+        if (accountType == null) return null;
+
+        return resolveAllContactsName(context, accountType);
+     }
+
+    /**
+     * Finds "All Contacts"-Name for the specified account type.
+     */
+    private static String resolveAllContactsName(Context context, String accountType) {
+        final AccountManager am = AccountManager.get(context);
+
+        for (AuthenticatorDescription auth : am.getAuthenticatorTypes()) {
+            if (accountType.equals(auth.type)) {
+                return resolveAllContactsNameFromMetaData(context, auth.packageName);
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Finds the meta-data XML containing the contacts configuration and
+     * reads the picture priority from that file.
+     */
+    private static String resolveAllContactsNameFromMetaData(Context context, String packageName) {
+        final PackageManager pm = context.getPackageManager();
+        try {
+            PackageInfo pi = pm.getPackageInfo(packageName, PackageManager.GET_SERVICES
+                    | PackageManager.GET_META_DATA);
+            if (pi != null && pi.services != null) {
+                for (ServiceInfo si : pi.services) {
+                    final XmlResourceParser parser = si.loadXmlMetaData(pm, METADATA_CONTACTS);
+                    if (parser != null) {
+                        return loadAllContactsNameFromXml(context, parser, packageName);
+                    }
+                }
+            }
+        } catch (NameNotFoundException e) {
+            Log.w(TAG, "Problem loading \"All Contacts\"-name: " + e.toString());
+        }
+        return null;
+    }
+
+    private static String loadAllContactsNameFromXml(Context context, XmlPullParser parser,
+            String packageName) {
+        try {
+            final AttributeSet attrs = Xml.asAttributeSet(parser);
+            int type;
+            while ((type = parser.next()) != XmlPullParser.START_TAG
+                    && type != XmlPullParser.END_DOCUMENT) {
+                // Drain comments and whitespace
+            }
+
+            if (type != XmlPullParser.START_TAG) {
+                throw new IllegalStateException("No start tag found");
+            }
+
+            final int depth = parser.getDepth();
+            while (((type = parser.next()) != XmlPullParser.END_TAG || parser.getDepth() > depth)
+                    && type != XmlPullParser.END_DOCUMENT) {
+                String name = parser.getName();
+                if (type == XmlPullParser.START_TAG && CONTACTS_DATA_KIND.equals(name)) {
+                    final TypedArray typedArray = context.obtainStyledAttributes(attrs,
+                            android.R.styleable.ContactsDataKind);
+                    try {
+                        // See if a string has been hardcoded directly into the xml
+                        final String nonResourceString = typedArray.getNonResourceString(
+                                android.R.styleable.ContactsDataKind_allContactsName);
+                        if (nonResourceString != null) {
+                            return nonResourceString;
+                        }
+
+                        // See if a resource is referenced. We can't rely on getString
+                        // to automatically resolve it as the resource lives in a different package
+                        int id = typedArray.getResourceId(
+                                android.R.styleable.ContactsDataKind_allContactsName, 0);
+                        if (id == 0) return null;
+
+                        // Resolve the resource Id
+                        final PackageManager packageManager = context.getPackageManager();
+                        final Resources resources;
+                        try {
+                            resources = packageManager.getResourcesForApplication(packageName);
+                        } catch (NameNotFoundException e) {
+                            return null;
+                        }
+                        try {
+                            return resources.getString(id);
+                        } catch (NotFoundException e) {
+                            return null;
+                        }
+                    } finally {
+                        typedArray.recycle();
+                    }
+                }
+            }
+            return null;
+        } catch (XmlPullParserException e) {
+            throw new IllegalStateException("Problem reading XML", e);
+        } catch (IOException e) {
+            throw new IllegalStateException("Problem reading XML", e);
+        }
+    }
+}
diff --git a/src/com/android/contacts/util/PhoneCapabilityTester.java b/src/com/android/contacts/util/PhoneCapabilityTester.java
new file mode 100644
index 0000000..8383617
--- /dev/null
+++ b/src/com/android/contacts/util/PhoneCapabilityTester.java
@@ -0,0 +1,62 @@
+/*
+ * 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.util;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.net.Uri;
+
+import java.util.List;
+
+public final class PhoneCapabilityTester {
+    /**
+     * Tests whether the Intent has a receiver registered. This can be used to show/hide
+     * functionality (like Phone, SMS)
+     */
+    public static boolean isIntentRegistered(Context context, Intent intent) {
+        final PackageManager packageManager = context.getPackageManager();
+        final List<ResolveInfo> receiverList = packageManager.queryIntentActivities(intent,
+                PackageManager.MATCH_DEFAULT_ONLY);
+        return receiverList.size() > 0;
+    }
+
+    /**
+     * Returns true if this device can be used to make phone calls
+     */
+    public static boolean isPhone(Context context) {
+        // Is the device physically capabable of making phone calls?
+        if (!context.getResources().getBoolean(com.android.internal.R.bool.config_voice_capable)) {
+            return false;
+        }
+
+        // Is there an app registered that accepts the call intent?
+        final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                Uri.fromParts(Constants.SCHEME_TEL, "", null));
+        return isIntentRegistered(context, intent);
+    }
+
+    /**
+     * Returns true if the device has an SMS application installed.
+     */
+    public static boolean isSmsIntentRegistered(Context context) {
+        final Intent intent = new Intent(Intent.ACTION_SENDTO,
+                Uri.fromParts(Constants.SCHEME_SMSTO, "", null));
+        return isIntentRegistered(context, intent);
+    }
+}
diff --git a/src/com/android/contacts/util/PhonebookCollatorFactory.java b/src/com/android/contacts/util/PhonebookCollatorFactory.java
new file mode 100644
index 0000000..08ce27a
--- /dev/null
+++ b/src/com/android/contacts/util/PhonebookCollatorFactory.java
@@ -0,0 +1,43 @@
+/*
+ * 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.util;
+
+import java.text.Collator;
+import java.util.Locale;
+
+/**
+ * Returns the collator that can be used to sort contact list entries. This
+ * collator is the same as the one that is used in sqlite.
+ */
+public final class PhonebookCollatorFactory {
+    public static final Collator getCollator() {
+        final Locale defaultLocale = Locale.getDefault();
+        final String defaultLocaleString = defaultLocale.toString();
+        // For Japanese we use a special collator that puts japanese characters before foreign
+        // ones (this is called a dictionary collator)
+        // Warning: This function has to match the behavior in sqlite3_android.cpp (located in
+        // the framework)
+        final Locale locale;
+        if ("ja".equals(defaultLocaleString) || "ja_JP".equals(defaultLocaleString)) {
+            locale = new Locale("ja@collation=phonebook");
+        } else {
+            locale = defaultLocale;
+        }
+
+        return Collator.getInstance(locale);
+    }
+}
diff --git a/src/com/android/contacts/vcard/AnimatedImageView.java b/src/com/android/contacts/vcard/AnimatedImageView.java
new file mode 100644
index 0000000..8911b52
--- /dev/null
+++ b/src/com/android/contacts/vcard/AnimatedImageView.java
@@ -0,0 +1,87 @@
+/*
+ * 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.vcard;
+
+import android.content.Context;
+import android.graphics.drawable.AnimationDrawable;
+import android.graphics.drawable.Drawable;
+import android.util.AttributeSet;
+import android.widget.ImageView;
+import android.widget.RemoteViews.RemoteView;
+
+/**
+ * Just a bare copy from SystemUI. Do not edit. 
+ */
+public class AnimatedImageView extends ImageView {
+    AnimationDrawable mAnim;
+    boolean mAttached;
+
+    public AnimatedImageView(Context context) {
+        super(context);
+    }
+
+    public AnimatedImageView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    private void updateAnim() {
+        Drawable drawable = getDrawable();
+        if (mAttached && mAnim != null) {
+            mAnim.stop();
+        }
+        if (drawable instanceof AnimationDrawable) {
+            mAnim = (AnimationDrawable)drawable;
+            if (mAttached) {
+                mAnim.start();
+            }
+        } else {
+            mAnim = null;
+        }
+    }
+
+    @Override
+    public void setImageDrawable(Drawable drawable) {
+        super.setImageDrawable(drawable);
+        updateAnim();
+    }
+
+    @Override
+    @android.view.RemotableViewMethod
+    public void setImageResource(int resid) {
+        super.setImageResource(resid);
+        updateAnim();
+    }
+
+    @Override
+    public void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        if (mAnim != null) {
+            mAnim.start();
+        }
+        mAttached = true;
+    }
+
+    @Override
+    public void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mAnim != null) {
+            mAnim.stop();
+        }
+        mAttached = false;
+    }
+}
+
diff --git a/src/com/android/contacts/vcard/CancelImportActivity.java b/src/com/android/contacts/vcard/CancelImportActivity.java
new file mode 100644
index 0000000..22de0da
--- /dev/null
+++ b/src/com/android/contacts/vcard/CancelImportActivity.java
@@ -0,0 +1,129 @@
+/*
+ * 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.vcard;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.android.contacts.R;
+
+/**
+ * The Activity for canceling ongoing vCard import.
+ *
+ * Currently we ignore tha case where there are more than one import requests
+ * with a same Uri in the queue.
+ */
+public class CancelImportActivity extends Activity {
+    private final String LOG_TAG = "CancelImportActivity";
+
+    /* package */ final String EXTRA_TARGET_URI = "extra_target_uri";
+
+    private class CustomConnection implements ServiceConnection {
+        private Messenger mMessenger;
+        public void doBindService() {
+            bindService(new Intent(CancelImportActivity.this,
+                    VCardService.class), this, Context.BIND_AUTO_CREATE);
+        }
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            mMessenger = new Messenger(service);
+
+            try {
+                mMessenger.send(Message.obtain(null,
+                        VCardService.MSG_CANCEL_IMPORT_REQUEST,
+                        null));
+                finish();
+            } catch (RemoteException e) {
+                Log.e(LOG_TAG, "RemoteException is thrown when trying to send request");
+                CancelImportActivity.this.showDialog(R.string.fail_reason_unknown);
+            }
+        }
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            mMessenger = null;
+        }
+    }
+
+    private class RequestCancelImportListener implements DialogInterface.OnClickListener {
+        @Override
+        public void onClick(DialogInterface dialog, int which) {
+            mConnection.doBindService();
+        }
+    }
+
+    private class CancelListener
+            implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
+        @Override
+        public void onClick(DialogInterface dialog, int which) {
+            finish();
+        }
+        @Override
+        public void onCancel(DialogInterface dialog) {
+            finish();
+        }
+    }
+
+    private final CancelListener mCancelListener = new CancelListener();
+    private final CustomConnection mConnection = new CustomConnection();
+    // private String mTargetUri;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        showDialog(R.id.dialog_cancel_import_confirmation);
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int resId, Bundle bundle) {
+        switch (resId) {
+
+        case R.id.dialog_cancel_import_confirmation: {
+            return getConfirmationDialog();
+        }
+        case R.string.fail_reason_unknown:
+            final AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                .setTitle(getString(R.string.reading_vcard_failed_title))
+                .setIcon(android.R.drawable.ic_dialog_alert)
+                .setMessage(getString(resId))
+                .setOnCancelListener(mCancelListener)
+                .setPositiveButton(android.R.string.ok, mCancelListener);
+            return builder.create();
+        }
+        return super.onCreateDialog(resId, bundle);
+    }
+
+    private Dialog getConfirmationDialog() {
+        final AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                .setTitle(R.string.cancel_import_confirmation_title)
+                .setMessage(R.string.cancel_import_confirmation_message)
+                .setPositiveButton(android.R.string.ok, new RequestCancelImportListener())
+                .setOnCancelListener(mCancelListener)
+                .setNegativeButton(android.R.string.cancel, mCancelListener);
+        return builder.create();
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/vcard/CancelImportRequest.java b/src/com/android/contacts/vcard/CancelImportRequest.java
new file mode 100644
index 0000000..dd10187
--- /dev/null
+++ b/src/com/android/contacts/vcard/CancelImportRequest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.vcard;
+
+import android.net.Uri;
+
+/**
+ * Class representing one request for canceling vCard import (given as a Uri).
+ */
+public class CancelImportRequest {
+    public final Uri uri;
+    public CancelImportRequest(Uri uri) {
+        this.uri = uri;
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/vcard/ExportProcessor.java b/src/com/android/contacts/vcard/ExportProcessor.java
new file mode 100644
index 0000000..2532cb2
--- /dev/null
+++ b/src/com/android/contacts/vcard/ExportProcessor.java
@@ -0,0 +1,267 @@
+/*
+ * 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.vcard;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.contacts.R;
+import com.android.contacts.activities.ContactBrowserActivity;
+import com.android.vcard.VCardComposer;
+import com.android.vcard.VCardConfig;
+
+import java.io.FileNotFoundException;
+import java.io.OutputStream;
+import java.util.LinkedList;
+import java.util.Queue;
+
+public class ExportProcessor {
+    private static final String LOG_TAG = "ExportProcessor";
+
+    private final Context mContext;
+
+    private ContentResolver mResolver;
+    private NotificationManager mNotificationManager;
+
+    boolean mCanceled;
+
+    boolean mReadyForRequest;
+    private final Queue<ExportRequest> mPendingRequests =
+        new LinkedList<ExportRequest>();
+
+    public ExportProcessor(Context context) {
+        mContext = context;
+    }
+
+    /* package */ ThreadStarter mThreadStarter = new ThreadStarter() {
+        public void start() {
+            final Thread thread = new Thread(new Runnable() {
+                public void run() {
+                    process();
+                }
+            });
+            thread.start();
+        }
+    };
+
+    public synchronized void pushRequest(ExportRequest parameter) {
+        if (mResolver == null) {
+            // Service object may not ready at the construction time
+            // (e.g. ContentResolver may be null).
+            mResolver = mContext.getContentResolver();
+            mNotificationManager =
+                    (NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
+        }
+
+        final boolean needThreadStart;
+        if (!mReadyForRequest) {
+            needThreadStart = true;
+        } else {
+            needThreadStart = false;
+        }
+        mPendingRequests.add(parameter);
+        if (needThreadStart) {
+            mThreadStarter.start();
+        }
+
+        mReadyForRequest = true;
+    }
+
+    /* package */ void process() {
+        if (!mReadyForRequest) {
+            throw new RuntimeException(
+                    "process() is called before request being pushed "
+                    + "or after this object's finishing its processing.");
+        }
+
+        try {
+            while (!mCanceled) {
+                final ExportRequest parameter;
+                synchronized (this) {
+                    if (mPendingRequests.size() == 0) {
+                        mReadyForRequest = false;
+                        break;
+                    } else {
+                        parameter = mPendingRequests.poll();
+                    }
+                }  // synchronized (this)
+                handleOneRequest(parameter);
+            }
+
+            doFinishNotification(mContext.getString(R.string.exporting_vcard_finished_title),
+                    "");
+        } finally {
+            // Not thread safe. Just in case.
+            // TODO: verify this works fine.
+            mReadyForRequest = false;
+        }
+    }
+
+    /* package */ void handleOneRequest(ExportRequest request) {
+        boolean shouldCallFinish = true;
+        VCardComposer composer = null;
+        try {
+            final Uri uri = request.destUri;
+            final OutputStream outputStream;
+            try {
+                outputStream = mResolver.openOutputStream(uri);
+            } catch (FileNotFoundException e) {
+                // Need concise title.
+
+                final String errorReason =
+                    mContext.getString(R.string.fail_reason_could_not_open_file,
+                            uri, e.getMessage());
+                shouldCallFinish = false;
+                doFinishNotification(errorReason, "");
+                return;
+            }
+            final String exportType = request.exportType;
+            final int vcardType;
+            if (TextUtils.isEmpty(exportType)) {
+                vcardType = VCardConfig.getVCardTypeFromString(
+                        mContext.getString(R.string.config_export_vcard_type));
+            } else {
+                vcardType = VCardConfig.getVCardTypeFromString(exportType);
+            }
+
+            composer = new VCardComposer(mContext, vcardType, true);
+
+            // for test
+            // int vcardType = (VCardConfig.VCARD_TYPE_V21_GENERIC |
+            //     VCardConfig.FLAG_USE_QP_TO_PRIMARY_PROPERTIES);
+            // composer = new VCardComposer(ExportVCardActivity.this, vcardType, true);
+
+            composer.addHandler(composer.new HandlerForOutputStream(outputStream));
+
+            if (!composer.init()) {
+                final String errorReason = composer.getErrorReason();
+                Log.e(LOG_TAG, "initialization of vCard composer failed: " + errorReason);
+                final String translatedErrorReason =
+                        translateComposerError(errorReason);
+                final String title =
+                        mContext.getString(R.string.fail_reason_could_not_initialize_exporter,
+                                translatedErrorReason);
+                doFinishNotification(title, "");
+                return;
+            }
+
+            final int total = composer.getCount();
+            if (total == 0) {
+                final String title =
+                        mContext.getString(R.string.fail_reason_no_exportable_contact);
+                doFinishNotification(title, "");
+                return;
+            }
+
+            int current = 1;  // 1-origin
+            while (!composer.isAfterLast()) {
+                if (mCanceled) {
+                    return;
+                }
+                if (!composer.createOneEntry()) {
+                    final String errorReason = composer.getErrorReason();
+                    Log.e(LOG_TAG, "Failed to read a contact: " + errorReason);
+                    final String translatedErrorReason =
+                            translateComposerError(errorReason);
+                    final String title =
+                            mContext.getString(R.string.fail_reason_error_occurred_during_export,
+                                    translatedErrorReason);
+                    doFinishNotification(title, "");
+                    return;
+                }
+                doProgressNotification(uri, total, current);
+                current++;
+            }
+        } finally {
+            if (composer != null) {
+                composer.terminate();
+            }
+        }
+    }
+
+    private String translateComposerError(String errorMessage) {
+        final Resources resources = mContext.getResources();
+        if (VCardComposer.FAILURE_REASON_FAILED_TO_GET_DATABASE_INFO.equals(errorMessage)) {
+            return resources.getString(R.string.composer_failed_to_get_database_infomation);
+        } else if (VCardComposer.FAILURE_REASON_NO_ENTRY.equals(errorMessage)) {
+            return resources.getString(R.string.composer_has_no_exportable_contact);
+        } else if (VCardComposer.FAILURE_REASON_NOT_INITIALIZED.equals(errorMessage)) {
+            return resources.getString(R.string.composer_not_initialized);
+        } else {
+            return errorMessage;
+        }
+    }
+
+    private void doProgressNotification(Uri uri, int total, int current) {
+        final String title = mContext.getString(R.string.exporting_contact_list_title);
+        final String description =
+                mContext.getString(R.string.exporting_contact_list_message, uri);
+
+        /* TODO: fix this
+        final RemoteViews remoteViews = new RemoteViews(mService.getPackageName(),
+                R.layout.status_bar_ongoing_event_progress_bar);
+        remoteViews.setTextViewText(R.id.status_description, message);
+        remoteViews.setProgressBar(R.id.status_progress_bar, total, current, (total == -1));
+
+        final String percentage = mService.getString(R.string.percentage,
+                String.valueOf((current * 100)/total));
+        remoteViews.setTextViewText(R.id.status_progress_text, percentage);
+        remoteViews.setImageViewResource(R.id.status_icon, android.R.drawable.stat_sys_upload);
+
+        final Notification notification = new Notification();
+        notification.icon = android.R.drawable.stat_sys_upload;
+        notification.flags |= Notification.FLAG_ONGOING_EVENT;
+        notification.tickerText = title;
+        notification.contentView = remoteViews;
+        notification.contentIntent =
+                PendingIntent.getActivity(mService, 0,
+                        new Intent(mService, ContactBrowserActivity.class), 0);*/
+
+        final long when = System.currentTimeMillis();
+        final Notification notification = new Notification(
+                android.R.drawable.stat_sys_upload,
+                description,
+                when);
+
+        final Context context = mContext.getApplicationContext();
+        final PendingIntent pendingIntent =
+                PendingIntent.getActivity(context, 0,
+                        new Intent(context, ContactBrowserActivity.class),
+                        PendingIntent.FLAG_UPDATE_CURRENT);
+
+        notification.setLatestEventInfo(context, title, description, pendingIntent);
+        mNotificationManager.notify(VCardService.EXPORT_NOTIFICATION_ID, notification);
+    }
+
+    private void doFinishNotification(final String title, final String message) {
+        final Notification notification = new Notification();
+        notification.icon = android.R.drawable.stat_sys_upload_done;
+        notification.flags |= Notification.FLAG_AUTO_CANCEL;
+        notification.setLatestEventInfo(mContext, title, message, null);
+        final Intent intent = new Intent(mContext, ContactBrowserActivity.class);
+        notification.contentIntent =
+                PendingIntent.getActivity(mContext, 0, intent, 0);
+        mNotificationManager.notify(VCardService.EXPORT_NOTIFICATION_ID, notification);
+    }
+}
diff --git a/src/com/android/contacts/vcard/ExportRequest.java b/src/com/android/contacts/vcard/ExportRequest.java
new file mode 100644
index 0000000..fae2d07
--- /dev/null
+++ b/src/com/android/contacts/vcard/ExportRequest.java
@@ -0,0 +1,35 @@
+/*
+ * 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.vcard;
+
+import android.net.Uri;
+
+public class ExportRequest {
+    public final Uri destUri;
+    /**
+     * Can be null.
+     */
+    public final String exportType;
+
+    public ExportRequest(Uri destUri) {
+        this(destUri, null);
+    }
+
+    public ExportRequest(Uri destUri, String exportType) {
+        this.destUri = destUri;
+        this.exportType = exportType;
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/vcard/ExportVCardActivity.java b/src/com/android/contacts/vcard/ExportVCardActivity.java
new file mode 100644
index 0000000..fbe6d48
--- /dev/null
+++ b/src/com/android/contacts/vcard/ExportVCardActivity.java
@@ -0,0 +1,391 @@
+/*
+ * Copyright (C) 2009 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.vcard;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.RemoteException;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.contacts.R;
+import com.android.vcard.VCardComposer;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Queue;
+import java.util.Set;
+
+/**
+ * Class for exporting vCard.
+ *
+ * Note that this Activity assumes that the instance is a "one-shot Activity", which will be
+ * finished (with the method {@link Activity#finish()}) after the export and never reuse
+ * any Dialog in the instance. So this code is careless about the management around managed
+ * dialogs stuffs (like how onCreateDialog() is used).
+ */
+public class ExportVCardActivity extends Activity {
+    private static final String LOG_TAG = "ExportVCardActivity";
+
+    // If true, VCardExporter is able to emits files longer than 8.3 format.
+    private static final boolean ALLOW_LONG_FILE_NAME = false;
+    private String mTargetDirectory;
+    private String mFileNamePrefix;
+    private String mFileNameSuffix;
+    private int mFileIndexMinimum;
+    private int mFileIndexMaximum;
+    private String mFileNameExtension;
+    private Set<String> mExtensionsToConsider;
+
+    // Used temporarily when asking users to confirm the file name
+    private String mTargetFileName;
+
+    // String for storing error reason temporarily.
+    private String mErrorReason;
+
+
+    private class CustomConnection implements ServiceConnection {
+        private Messenger mMessenger;
+        private Queue<ExportRequest> mPendingRequests = new LinkedList<ExportRequest>();
+
+        public void doBindService() {
+            bindService(new Intent(ExportVCardActivity.this,
+                    VCardService.class), this, Context.BIND_AUTO_CREATE);
+        }
+
+        public synchronized void requestSend(final ExportRequest parameter) {
+            if (mMessenger != null) {
+                sendMessage(parameter);
+            } else {
+                mPendingRequests.add(parameter);
+            }
+        }
+
+        private void sendMessage(final ExportRequest request) {
+            try {
+                mMessenger.send(Message.obtain(null,
+                        VCardService.MSG_EXPORT_REQUEST,
+                        request));
+            } catch (RemoteException e) {
+                Log.e(LOG_TAG, "RemoteException is thrown when trying to send request");
+                runOnUiThread(new ErrorReasonDisplayer(
+                        getString(R.string.fail_reason_unknown)));
+            }
+        }
+
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            synchronized (this) {
+                mMessenger = new Messenger(service);
+                // Send pending requests thrown from this Activity before an actual connection
+                // is established.
+                while (!mPendingRequests.isEmpty()) {
+                    final ExportRequest parameter = mPendingRequests.poll();
+                    if (parameter == null) {
+                        throw new NullPointerException();
+                    }
+                    sendMessage(parameter);
+                }
+
+                unbindService(this);
+                finish();
+            }
+        }
+
+        public void onServiceDisconnected(ComponentName name) {
+            synchronized (this) {
+                if (!mPendingRequests.isEmpty()) {
+                    Log.w(LOG_TAG, "Some request(s) are dropped.");
+                }
+                // Set to null so that we can detect inappropriate re-connection toward
+                // the Service via NullPointerException;
+                mPendingRequests = null;
+                mMessenger = null;
+            }
+        }
+    }
+
+    private final CustomConnection mConnection = new CustomConnection();
+
+    private class CancelListener
+            implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
+        public void onClick(DialogInterface dialog, int which) {
+            finish();
+        }
+        public void onCancel(DialogInterface dialog) {
+            finish();
+        }
+    }
+
+    private CancelListener mCancelListener = new CancelListener();
+
+    private class ErrorReasonDisplayer implements Runnable {
+        private final int mResId;
+        public ErrorReasonDisplayer(int resId) {
+            mResId = resId;
+        }
+        public ErrorReasonDisplayer(String errorReason) {
+            mResId = R.id.dialog_fail_to_export_with_reason;
+            mErrorReason = errorReason;
+        }
+        public void run() {
+            // Show the Dialog only when the parent Activity is still alive.
+            if (!ExportVCardActivity.this.isFinishing()) {
+                showDialog(mResId);
+            }
+        }
+    }
+
+    private class ExportConfirmationListener implements DialogInterface.OnClickListener {
+        private final Uri mDestUri;
+
+        public ExportConfirmationListener(String fileName) {
+            this(Uri.parse("file://" + fileName));
+        }
+
+        public ExportConfirmationListener(Uri uri) {
+            mDestUri = uri;
+        }
+
+        public void onClick(DialogInterface dialog, int which) {
+            if (which == DialogInterface.BUTTON_POSITIVE) {
+                mConnection.doBindService();
+
+                final ExportRequest request = new ExportRequest(mDestUri);
+
+                // The connection object will call finish().
+                mConnection.requestSend(request);
+            }
+        }
+    }
+
+    private String translateComposerError(String errorMessage) {
+        Resources resources = getResources();
+        if (VCardComposer.FAILURE_REASON_FAILED_TO_GET_DATABASE_INFO.equals(errorMessage)) {
+            return resources.getString(R.string.composer_failed_to_get_database_infomation);
+        } else if (VCardComposer.FAILURE_REASON_NO_ENTRY.equals(errorMessage)) {
+            return resources.getString(R.string.composer_has_no_exportable_contact);
+        } else if (VCardComposer.FAILURE_REASON_NOT_INITIALIZED.equals(errorMessage)) {
+            return resources.getString(R.string.composer_not_initialized);
+        } else {
+            return errorMessage;
+        }
+    }
+
+    @Override
+    protected void onCreate(Bundle bundle) {
+        super.onCreate(bundle);
+
+        mTargetDirectory = getString(R.string.config_export_dir);
+        mFileNamePrefix = getString(R.string.config_export_file_prefix);
+        mFileNameSuffix = getString(R.string.config_export_file_suffix);
+        mFileNameExtension = getString(R.string.config_export_file_extension);
+
+        mExtensionsToConsider = new HashSet<String>();
+        mExtensionsToConsider.add(mFileNameExtension);
+
+        final String additionalExtensions =
+            getString(R.string.config_export_extensions_to_consider);
+        if (!TextUtils.isEmpty(additionalExtensions)) {
+            for (String extension : additionalExtensions.split(",")) {
+                String trimed = extension.trim();
+                if (trimed.length() > 0) {
+                    mExtensionsToConsider.add(trimed);
+                }
+            }
+        }
+
+        final Resources resources = getResources();
+        mFileIndexMinimum = resources.getInteger(R.integer.config_export_file_min_index);
+        mFileIndexMaximum = resources.getInteger(R.integer.config_export_file_max_index);
+
+        startExportVCardToSdCard();
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int id, Bundle bundle) {
+        switch (id) {
+            case R.id.dialog_export_confirmation: {
+                return getExportConfirmationDialog();
+            }
+            case R.string.fail_reason_too_many_vcard: {
+                return new AlertDialog.Builder(this)
+                    .setTitle(R.string.exporting_contact_failed_title)
+                    .setMessage(getString(R.string.exporting_contact_failed_message,
+                                getString(R.string.fail_reason_too_many_vcard)))
+                                .setPositiveButton(android.R.string.ok, mCancelListener)
+                                .create();
+            }
+            case R.id.dialog_fail_to_export_with_reason: {
+                return getErrorDialogWithReason();
+            }
+            case R.id.dialog_sdcard_not_found: {
+                AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                .setTitle(R.string.no_sdcard_title)
+                .setIcon(android.R.drawable.ic_dialog_alert)
+                .setMessage(R.string.no_sdcard_message)
+                .setPositiveButton(android.R.string.ok, mCancelListener);
+                return builder.create();
+            }
+        }
+        return super.onCreateDialog(id, bundle);
+    }
+
+    @Override
+    protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
+        if (id == R.id.dialog_fail_to_export_with_reason) {
+            ((AlertDialog)dialog).setMessage(getErrorReason());
+        } else if (id == R.id.dialog_export_confirmation) {
+            ((AlertDialog)dialog).setMessage(
+                    getString(R.string.confirm_export_message, mTargetFileName));
+        } else {
+            super.onPrepareDialog(id, dialog, args);
+        }
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+
+        if (!isFinishing()) {
+            finish();
+        }
+    }
+
+    /**
+     * Tries to start exporting VCard. If there's no SDCard available,
+     * an error dialog is shown.
+     */
+    public void startExportVCardToSdCard() {
+        File targetDirectory = new File(mTargetDirectory);
+
+        if (!(targetDirectory.exists() &&
+                targetDirectory.isDirectory() &&
+                targetDirectory.canRead()) &&
+                !targetDirectory.mkdirs()) {
+            showDialog(R.id.dialog_sdcard_not_found);
+        } else {
+            mTargetFileName = getAppropriateFileName(mTargetDirectory);
+            if (TextUtils.isEmpty(mTargetFileName)) {
+                mTargetFileName = null;
+                // finish() is called via the error dialog. Do not call the method here.
+                return;
+            }
+
+            showDialog(R.id.dialog_export_confirmation);
+        }
+    }
+
+    /**
+     * Tries to get an appropriate filename. Returns null if it fails.
+     */
+    private String getAppropriateFileName(final String destDirectory) {
+        int fileNumberStringLength = 0;
+        {
+            // Calling Math.Log10() is costly.
+            int tmp;
+            for (fileNumberStringLength = 0, tmp = mFileIndexMaximum; tmp > 0;
+                fileNumberStringLength++, tmp /= 10) {
+            }
+        }
+        String bodyFormat = "%s%0" + fileNumberStringLength + "d%s";
+
+        if (!ALLOW_LONG_FILE_NAME) {
+            String possibleBody = String.format(bodyFormat,mFileNamePrefix, 1, mFileNameSuffix);
+            if (possibleBody.length() > 8 || mFileNameExtension.length() > 3) {
+                Log.e(LOG_TAG, "This code does not allow any long file name.");
+                mErrorReason = getString(R.string.fail_reason_too_long_filename,
+                        String.format("%s.%s", possibleBody, mFileNameExtension));
+                showDialog(R.id.dialog_fail_to_export_with_reason);
+                // finish() is called via the error dialog. Do not call the method here.
+                return null;
+            }
+        }
+
+        // Note that this logic assumes that the target directory is case insensitive.
+        // As of 2009-07-16, it is true since the external storage is only sdcard, and
+        // it is formated as FAT/VFAT.
+        // TODO: fix this.
+        for (int i = mFileIndexMinimum; i <= mFileIndexMaximum; i++) {
+            boolean numberIsAvailable = true;
+            // SD Association's specification seems to require this feature, though we cannot
+            // have the specification since it is proprietary...
+            String body = null;
+            for (String possibleExtension : mExtensionsToConsider) {
+                body = String.format(bodyFormat, mFileNamePrefix, i, mFileNameSuffix);
+                File file = new File(String.format("%s/%s.%s",
+                        destDirectory, body, possibleExtension));
+                if (file.exists()) {
+                    numberIsAvailable = false;
+                    break;
+                }
+            }
+            if (numberIsAvailable) {
+                return String.format("%s/%s.%s", destDirectory, body, mFileNameExtension);
+            }
+        }
+        showDialog(R.string.fail_reason_too_many_vcard);
+        return null;
+    }
+
+    public Dialog getExportConfirmationDialog() {
+        if (TextUtils.isEmpty(mTargetFileName)) {
+            Log.e(LOG_TAG, "Target file name is empty, which must not be!");
+            // This situation is not acceptable (probably a bug!), but we don't have no reason to
+            // show...
+            mErrorReason = null;
+            return getErrorDialogWithReason();
+        }
+
+        return new AlertDialog.Builder(this)
+            .setTitle(R.string.confirm_export_title)
+            .setMessage(getString(R.string.confirm_export_message, mTargetFileName))
+            .setPositiveButton(android.R.string.ok,
+                    new ExportConfirmationListener(mTargetFileName))
+            .setNegativeButton(android.R.string.cancel, mCancelListener)
+            .setOnCancelListener(mCancelListener)
+            .create();
+    }
+
+    public Dialog getErrorDialogWithReason() {
+        if (mErrorReason == null) {
+            Log.e(LOG_TAG, "Error reason must have been set.");
+            mErrorReason = getString(R.string.fail_reason_unknown);
+        }
+        return new AlertDialog.Builder(this)
+            .setTitle(R.string.exporting_contact_failed_title)
+                .setMessage(getString(R.string.exporting_contact_failed_message, mErrorReason))
+            .setPositiveButton(android.R.string.ok, mCancelListener)
+            .setOnCancelListener(mCancelListener)
+            .create();
+    }
+
+    public String getErrorReason() {
+        return mErrorReason;
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/vcard/ImportProcessor.java b/src/com/android/contacts/vcard/ImportProcessor.java
new file mode 100644
index 0000000..6a7dbe6
--- /dev/null
+++ b/src/com/android/contacts/vcard/ImportProcessor.java
@@ -0,0 +1,442 @@
+/*
+ * 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.vcard;
+
+import android.accounts.Account;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.Service;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.net.Uri;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.RemoteException;
+import android.provider.ContactsContract.RawContacts;
+import android.util.Log;
+
+import com.android.contacts.R;
+import com.android.vcard.VCardEntryCommitter;
+import com.android.vcard.VCardEntryConstructor;
+import com.android.vcard.VCardInterpreter;
+import com.android.vcard.VCardParser;
+import com.android.vcard.VCardParser_V21;
+import com.android.vcard.VCardParser_V30;
+import com.android.vcard.exception.VCardException;
+import com.android.vcard.exception.VCardNestedException;
+import com.android.vcard.exception.VCardNotSupportedException;
+import com.android.vcard.exception.VCardVersionException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+
+/**
+ * Class for processing incoming import request from {@link ImportVCardActivity}.
+ *
+ * This class is designed so that a user ({@link Service}) does not need to (and should not)
+ * recreate multiple instances, as this holds total count of vCard entries to be imported.
+ */
+public class ImportProcessor {
+    private static final String LOG_TAG = ImportProcessor.class.getSimpleName();
+
+    private class ImportProcessorConnection implements ServiceConnection {
+        private Messenger mMessenger;
+        private boolean mBound;
+
+        public synchronized void tryBind() {
+            if (!mContext.bindService(new Intent(mContext, VCardService.class),
+                    mConnection, Context.BIND_AUTO_CREATE)) {
+                throw new RuntimeException("Failed to bind to VCardService.");
+            }
+            mBound = true;
+        }
+
+        public synchronized void tryUnbind() {
+            if (mBound) {
+                mContext.unbindService(mConnection);
+            } else {
+                // TODO: Not graceful.
+                Log.w(LOG_TAG, "unbind() is tried while ServiceConnection is not bound yet");
+            }
+            mBound = false;
+        }
+
+        public void sendFinishNotification() {
+            try {
+                mMessenger.send(Message.obtain(null,
+                        VCardService.MSG_NOTIFY_IMPORT_FINISHED,
+                        null));
+            } catch (RemoteException e) {
+                Log.e(LOG_TAG, "RemoteException is thrown when trying to send request");
+            }
+        }
+
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            mMessenger = new Messenger(service);
+        }
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            mMessenger = null;
+        }
+    }
+
+    private final Context mContext;
+
+    private final ImportProcessorConnection mConnection = new ImportProcessorConnection();
+
+    private ContentResolver mResolver;
+    private NotificationManager mNotificationManager;
+
+    private final List<Uri> mFailedUris = new ArrayList<Uri>();
+    private final List<Uri> mCreatedUris = new ArrayList<Uri>();
+    private final ImportProgressNotifier mNotifier = new ImportProgressNotifier();
+
+    private VCardParser mVCardParser;
+
+    /**
+     * Meaning a controller of this object requests the operation should be canceled
+     * or not, which implies {@link #mReadyForRequest} should be set to false soon, but
+     * it does not meaning cancel request is able to immediately stop this object,
+     * so we have two variables.
+     */
+    private boolean mCanceled;
+
+    /**
+     * Meaning that this object is able to accept import requests.
+     */
+    private boolean mReadyForRequest;
+    private final Queue<ImportRequest> mPendingRequests =
+            new LinkedList<ImportRequest>();
+
+    // For testability.
+    /* package */ ThreadStarter mThreadStarter = new ThreadStarter() {
+        public void start() {
+            final Thread thread = new Thread(new Runnable() {
+                public void run() {
+                    process();
+                }
+            });
+            thread.start();
+        }
+    };
+    /* package */ interface CommitterGenerator {
+        public VCardEntryCommitter generate(ContentResolver resolver);
+    }
+    /* package */ class DefaultCommitterGenerator implements CommitterGenerator {
+        public VCardEntryCommitter generate(ContentResolver resolver) {
+            return new VCardEntryCommitter(mResolver);
+        }
+    }
+
+    private CommitterGenerator mCommitterGenerator =
+        new DefaultCommitterGenerator();
+
+    public ImportProcessor(final Context context) {
+        mContext = context;
+
+        mConnection.tryBind();
+    }
+
+    /**
+     * Checks this object and initialize it if not.
+     *
+     * This method is needed since {@link VCardService} is not ready when this object is
+     * created and we need to delay this initialization, while we want to initialize
+     * this object soon in tests.
+     */
+    /* package */ void ensureInit() {
+        if (mResolver == null) {
+            // Service object may not ready at the construction time
+            // (e.g. ContentResolver may be null).
+            mResolver = mContext.getContentResolver();
+            mNotificationManager =
+                    (NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
+        }
+    }
+
+    public synchronized void pushRequest(final ImportRequest request) {
+        ensureInit();
+
+        final boolean needThreadStart;
+        if (!mReadyForRequest) {
+            mFailedUris.clear();
+            mCreatedUris.clear();
+
+            mNotifier.init(mContext, mNotificationManager);
+            needThreadStart = true;
+        } else {
+            needThreadStart = false;
+        }
+        final int count = request.entryCount;
+        if (count > 0) {
+            mNotifier.addTotalCount(count);
+        }
+        mPendingRequests.add(request);
+        if (needThreadStart) {
+            mThreadStarter.start();
+        }
+
+        mReadyForRequest = true;
+    }
+
+    /**
+     * Starts processing import requests. Never stops until all given requests are
+     * processed or some error happens, assuming this method is called from a
+     * {@link Thread} object.
+     */
+    private void process() {
+        if (!mReadyForRequest) {
+            mConnection.tryUnbind();
+            throw new RuntimeException(
+                    "process() is called before request being pushed "
+                    + "or after this object's finishing its processing.");
+        }
+
+        try {
+            while (!mCanceled) {
+                final ImportRequest parameter;
+                synchronized (this) {
+                    if (mPendingRequests.size() == 0) {
+                        mReadyForRequest = false;
+                        break;
+                    } else {
+                        parameter = mPendingRequests.poll();
+                    }
+                }  // synchronized (this)
+                handleOneRequest(parameter);
+            }
+
+            // Currenty we don't have an appropriate way to let users see all URIs imported.
+            // Instead, we show one only when there's just one created uri.
+            doFinishNotification(mCreatedUris.size() > 0 ? mCreatedUris.get(0) : null);
+            mConnection.sendFinishNotification();
+        } finally {
+            // TODO: verify this works fine.
+            mReadyForRequest = false;  // Just in case.
+            mNotifier.resetTotalCount();
+            mConnection.tryUnbind();
+        }
+    }
+
+    /**
+     * Would be run inside synchronized block.
+     */
+    /* package */ boolean handleOneRequest(final ImportRequest request) {
+        if (mCanceled) {
+            Log.i(LOG_TAG, "Canceled before actually handling parameter ("
+                    + request.uri + ")");
+            return false;
+        }
+        final int[] possibleVCardVersions;
+        if (request.vcardVersion == ImportVCardActivity.VCARD_VERSION_AUTO_DETECT) {
+            /**
+             * Note: this code assumes that a given Uri is able to be opened more than once,
+             * which may not be true in certain conditions.
+             */
+            possibleVCardVersions = new int[] {
+                    ImportVCardActivity.VCARD_VERSION_V21,
+                    ImportVCardActivity.VCARD_VERSION_V30
+            };
+        } else {
+            possibleVCardVersions = new int[] {
+                    request.vcardVersion
+            };
+        }
+
+        final Uri uri = request.uri;
+        final Account account = request.account;
+        final int estimatedVCardType = request.estimatedVCardType;
+        final String estimatedCharset = request.estimatedCharset;
+
+        final VCardEntryConstructor constructor =
+                new VCardEntryConstructor(estimatedVCardType, account, estimatedCharset);
+        final VCardEntryCommitter committer = mCommitterGenerator.generate(mResolver);
+        constructor.addEntryHandler(committer);
+        constructor.addEntryHandler(mNotifier);
+
+        final boolean successful =
+            readOneVCard(uri, estimatedVCardType, estimatedCharset,
+                    constructor, possibleVCardVersions);
+        if (successful) {
+            List<Uri> uris = committer.getCreatedUris();
+            if (uris != null) {
+                mCreatedUris.addAll(uris);
+            } else {
+                // Not critical, but suspicious.
+                Log.w(LOG_TAG,
+                        "Created Uris is null while the creation itself is successful.");
+            }
+        } else {
+            mFailedUris.add(uri);
+        }
+
+        return successful;
+    }
+
+    /*
+    private void doErrorNotification(int id) {
+        final Notification notification = new Notification();
+        notification.icon = android.R.drawable.stat_sys_download_done;
+        notification.flags |= Notification.FLAG_AUTO_CANCEL;
+        final String title = mService.getString(R.string.reading_vcard_failed_title);
+        final PendingIntent intent =
+                PendingIntent.getActivity(mService, 0, new Intent(), 0);
+        notification.setLatestEventInfo(mService, title, "", intent);
+        mNotificationManager.notify(MESSAGE_ID, notification);
+    }
+    */
+
+    private void doFinishNotification(final Uri createdUri) {
+        final Notification notification = new Notification();
+        final String title;
+        notification.flags |= Notification.FLAG_AUTO_CANCEL;
+
+        if (isCanceled()) {
+            notification.icon = android.R.drawable.stat_notify_error;
+            title = mContext.getString(R.string.importing_vcard_canceled_title);
+        } else {
+            notification.icon = android.R.drawable.stat_sys_download_done;
+            title = mContext.getString(R.string.importing_vcard_finished_title);
+        }
+
+        final Intent intent;
+        if (createdUri != null) {
+            final long rawContactId = ContentUris.parseId(createdUri);
+            final Uri contactUri = RawContacts.getContactLookupUri(
+                    mResolver, ContentUris.withAppendedId(
+                            RawContacts.CONTENT_URI, rawContactId));
+            intent = new Intent(Intent.ACTION_VIEW, contactUri);
+        } else {
+            intent = null;
+        }
+
+        notification.setLatestEventInfo(mContext, title, "",
+                PendingIntent.getActivity(mContext, 0, intent, 0));
+        mNotificationManager.notify(VCardService.IMPORT_NOTIFICATION_ID, notification);
+    }
+
+    // Make package private for testing use.
+    /* package */ boolean readOneVCard(Uri uri, int vcardType, String charset,
+            final VCardInterpreter interpreter,
+            final int[] possibleVCardVersions) {
+        boolean successful = false;
+        final int length = possibleVCardVersions.length;
+        for (int i = 0; i < length; i++) {
+            InputStream is = null;
+            final int vcardVersion = possibleVCardVersions[i];
+            try {
+                if (i > 0 && (interpreter instanceof VCardEntryConstructor)) {
+                    // Let the object clean up internal temporary objects,
+                    ((VCardEntryConstructor) interpreter).clear();
+                }
+
+                is = mResolver.openInputStream(uri);
+
+                // We need synchronized block here,
+                // since we need to handle mCanceled and mVCardParser at once.
+                // In the worst case, a user may call cancel() just before creating
+                // mVCardParser.
+                synchronized (this) {
+                    mVCardParser = (vcardVersion == ImportVCardActivity.VCARD_VERSION_V30 ?
+                            new VCardParser_V30(vcardType) :
+                                new VCardParser_V21(vcardType));
+                    if (mCanceled) {
+                        mVCardParser.cancel();
+                    }
+                }
+                mVCardParser.parse(is, interpreter);
+
+                successful = true;
+                break;
+            } catch (IOException e) {
+                Log.e(LOG_TAG, "IOException was emitted: " + e.getMessage());
+            } catch (VCardNestedException e) {
+                // This exception should not be thrown here. We should instead handle it
+                // in the preprocessing session in ImportVCardActivity, as we don't try
+                // to detect the type of given vCard here.
+                //
+                // TODO: Handle this case appropriately, which should mean we have to have
+                // code trying to auto-detect the type of given vCard twice (both in
+                // ImportVCardActivity and ImportVCardService).
+                Log.e(LOG_TAG, "Nested Exception is found.");
+            } catch (VCardNotSupportedException e) {
+                Log.e(LOG_TAG, e.getMessage());
+            } catch (VCardVersionException e) {
+                if (i == length - 1) {
+                    Log.e(LOG_TAG, "Appropriate version for this vCard is not found.");
+                } else {
+                    // We'll try the other (v30) version.
+                }
+            } catch (VCardException e) {
+                Log.e(LOG_TAG, e.getMessage());
+            } finally {
+                if (is != null) {
+                    try {
+                        is.close();
+                    } catch (IOException e) {
+                    }
+                }
+            }
+        }
+
+        return successful;
+    }
+
+    public synchronized boolean isReadyForRequest() {
+        return mReadyForRequest;
+    }
+
+    public boolean isCanceled() {
+        return mCanceled;
+    }
+
+    public void cancel() {
+        mCanceled = true;
+        synchronized (this) {
+            if (mVCardParser != null) {
+                mVCardParser.cancel();
+            }
+        }
+    }
+
+    public List<Uri> getCreatedUrisForTest() {
+        return mCreatedUris;
+    }
+
+    public List<Uri> getFailedUrisForTest() {
+        return mFailedUris;
+    }
+
+    public void injectCommitterGeneratorForTest(
+            final CommitterGenerator generator) {
+        mCommitterGenerator = generator;
+    }
+
+    public void initNotifierForTest() {
+        mNotifier.init(mContext, mNotificationManager);
+    }
+}
diff --git a/src/com/android/contacts/vcard/ImportProgressNotifier.java b/src/com/android/contacts/vcard/ImportProgressNotifier.java
new file mode 100644
index 0000000..99a6f55
--- /dev/null
+++ b/src/com/android/contacts/vcard/ImportProgressNotifier.java
@@ -0,0 +1,117 @@
+/*
+ * 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.vcard;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.widget.RemoteViews;
+
+import com.android.contacts.R;
+import com.android.vcard.VCardEntry;
+import com.android.vcard.VCardEntryHandler;
+
+/**
+ * {@link VCardEntryHandler} implementation which lets the system update
+ * the current status of vCard import.
+ */
+public class ImportProgressNotifier implements VCardEntryHandler {
+    private Context mContext;
+    private NotificationManager mNotificationManager;
+
+    private int mCurrentCount;
+    private int mTotalCount;
+
+    public void init(Context context, NotificationManager notificationManager) {
+        mContext = context;
+        mNotificationManager = notificationManager;
+    }
+
+    public void onStart() {
+    }
+
+    public void onEntryCreated(VCardEntry contactStruct) {
+        mCurrentCount++;  // 1 origin.
+        if (contactStruct.isIgnorable()) {
+            return;
+        }
+
+        // We don't use startEntry() since:
+        // - We cannot know name there but here.
+        // - There's high probability where name comes soon after the beginning of entry, so
+        //   we don't need to hurry to show something.
+
+
+        final String totalCountString;
+        synchronized (this) {
+            totalCountString = String.valueOf(mTotalCount);
+        }
+        final String tickerText =
+                mContext.getString(R.string.progress_notifier_message,
+                        String.valueOf(mCurrentCount),
+                        totalCountString,
+                        contactStruct.getDisplayName());
+
+
+        final Context context = mContext.getApplicationContext();
+
+        final String description = mContext.getString(R.string.importing_vcard_description,
+                contactStruct.getDisplayName());
+        final RemoteViews remoteViews =
+                new RemoteViews(context.getPackageName(),
+                R.layout.status_bar_ongoing_event_progress_bar);
+        remoteViews.setTextViewText(R.id.status_description, description);
+        remoteViews.setProgressBar(R.id.status_progress_bar, mTotalCount, mCurrentCount,
+                mTotalCount == -1);
+        final String percentage;
+        if (mTotalCount > 0) {
+            percentage = context.getString(R.string.percentage,
+                    String.valueOf(mCurrentCount * 100/mTotalCount));
+        } else {
+            percentage = "";
+        }
+        remoteViews.setTextViewText(R.id.status_progress_text, percentage);
+        remoteViews.setImageViewResource(R.id.status_icon, android.R.drawable.stat_sys_download);
+
+        final Notification notification = new Notification();
+        notification.icon = android.R.drawable.stat_sys_download;
+        notification.tickerText = tickerText;
+        notification.contentView = remoteViews;
+        notification.flags |= Notification.FLAG_ONGOING_EVENT;
+
+        final PendingIntent pendingIntent =
+                PendingIntent.getActivity(context, 0,
+                        new Intent(context, CancelImportActivity.class),
+                        PendingIntent.FLAG_UPDATE_CURRENT);
+
+        notification.contentIntent = pendingIntent;
+        // notification.setLatestEventInfo(context, title, description, pendingIntent);
+        mNotificationManager.notify(VCardService.IMPORT_NOTIFICATION_ID, notification);
+    }
+
+    public synchronized void addTotalCount(int additionalCount) {
+        mTotalCount += additionalCount;
+    }
+
+    public synchronized void resetTotalCount() {
+        mTotalCount = 0;
+    }
+
+    public void onEnd() {
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/vcard/ImportRequest.java b/src/com/android/contacts/vcard/ImportRequest.java
new file mode 100644
index 0000000..5d46166
--- /dev/null
+++ b/src/com/android/contacts/vcard/ImportRequest.java
@@ -0,0 +1,86 @@
+/*
+ * 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.vcard;
+
+import android.accounts.Account;
+import android.net.Uri;
+
+import com.android.vcard.VCardSourceDetector;
+
+/**
+ * Class representing one request for importing vCard (given as a Uri).
+ *
+ * Mainly used when {@link ImportVCardActivity} requests {@link VCardService}
+ * to import some specific Uri.
+ *
+ * Note: This object's accepting only One Uri does NOT mean that
+ * there's only one vCard entry inside the instance, as one Uri often has multiple
+ * vCard entries inside it.
+ */
+public class ImportRequest {
+    /**
+     * Can be null (typically when there's no Account available in the system).
+     */
+    public final Account account;
+    public final Uri uri;
+    /**
+     * Can be {@link VCardSourceDetector#PARSE_TYPE_UNKNOWN}.
+     */
+    public final int estimatedVCardType;
+    /**
+     * Can be null, meaning no preferable charset is available.
+     */
+    public final String estimatedCharset;
+    /**
+     * Assumes that one Uri contains only one version, while there's a (tiny) possibility
+     * we may have two types in one vCard.
+     *
+     * e.g.
+     * BEGIN:VCARD
+     * VERSION:2.1
+     * ...
+     * END:VCARD
+     * BEGIN:VCARD
+     * VERSION:3.0
+     * ...
+     * END:VCARD
+     *
+     * We've never seen this kind of a file, but we may have to cope with it in the future.
+     */
+    public final int vcardVersion;
+
+    /**
+     * The count of vCard entries in {@link #uri}. A receiver of this object can use it
+     * when showing the progress of import. Thus a receiver must be able to torelate this
+     * variable being invalid because of vCard's limitation.
+     *
+     * vCard does not let us know this count without looking over a whole file content,
+     * which means we have to open and scan over {@link #uri} to know this value, while
+     * it may not be opened more than once (Uri does not require it to be opened multiple times
+     * and may become invalid after its close() request).
+     */
+    public final int entryCount;
+    public ImportRequest(Account account,
+            Uri uri, int estimatedType, String estimatedCharset,
+            int vcardVersion, int entryCount) {
+        this.account = account;
+        this.uri = uri;
+        this.estimatedVCardType = estimatedType;
+        this.estimatedCharset = estimatedCharset;
+        this.vcardVersion = vcardVersion;
+        this.entryCount = entryCount;
+    }
+}
diff --git a/src/com/android/contacts/vcard/ImportVCardActivity.java b/src/com/android/contacts/vcard/ImportVCardActivity.java
new file mode 100644
index 0000000..faa8bf3
--- /dev/null
+++ b/src/com/android/contacts/vcard/ImportVCardActivity.java
@@ -0,0 +1,1040 @@
+/*
+ * Copyright (C) 2009 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.vcard;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.ProgressDialog;
+import android.content.ComponentName;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.DialogInterface.OnCancelListener;
+import android.content.DialogInterface.OnClickListener;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.Messenger;
+import android.os.PowerManager;
+import android.os.RemoteException;
+import android.text.SpannableStringBuilder;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.text.style.RelativeSizeSpan;
+import android.util.Log;
+
+import com.android.contacts.R;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.util.AccountSelectionUtil;
+import com.android.vcard.VCardEntryCounter;
+import com.android.vcard.VCardInterpreterCollection;
+import com.android.vcard.VCardParser;
+import com.android.vcard.VCardParser_V21;
+import com.android.vcard.VCardParser_V30;
+import com.android.vcard.VCardSourceDetector;
+import com.android.vcard.exception.VCardException;
+import com.android.vcard.exception.VCardNestedException;
+import com.android.vcard.exception.VCardVersionException;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.channels.WritableByteChannel;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+import java.util.Set;
+import java.util.Vector;
+
+/**
+ * The class letting users to import vCard. This includes the UI part for letting them select
+ * an Account and posssibly a file if there's no Uri is given from its caller Activity.
+ *
+ * Note that this Activity assumes that the instance is a "one-shot Activity", which will be
+ * finished (with the method {@link Activity#finish()}) after the import and never reuse
+ * any Dialog in the instance. So this code is careless about the management around managed
+ * dialogs stuffs (like how onCreateDialog() is used).
+ */
+public class ImportVCardActivity extends Activity {
+    private static final String LOG_TAG = "ImportVCardActivity";
+
+    private static final int SELECT_ACCOUNT = 0;
+
+    /* package */ static final String VCARD_URI_ARRAY = "vcard_uri";
+    /* package */ static final String ESTIMATED_VCARD_TYPE_ARRAY = "estimated_vcard_type";
+    /* package */ static final String ESTIMATED_CHARSET_ARRAY = "estimated_charset";
+    /* package */ static final String VCARD_VERSION_ARRAY = "vcard_version";
+    /* package */ static final String ENTRY_COUNT_ARRAY = "entry_count";
+
+    /* package */ final static int VCARD_VERSION_AUTO_DETECT = 0;
+    /* package */ final static int VCARD_VERSION_V21 = 1;
+    /* package */ final static int VCARD_VERSION_V30 = 2;
+
+    private static final String SECURE_DIRECTORY_NAME = ".android_secure";
+
+    final static String CACHED_URIS = "cached_uris";
+
+    private AccountSelectionUtil.AccountSelectedListener mAccountSelectionListener;
+
+    private Account mAccount;
+
+    private String mAction;
+    private Uri mUri;
+
+    private ProgressDialog mProgressDialogForScanVCard;
+    private ProgressDialog mProgressDialogForCacheVCard;
+
+    private List<VCardFile> mAllVCardFileList;
+    private VCardScanThread mVCardScanThread;
+
+    private VCardCacheThread mVCardCacheThread;
+
+    private String mErrorMessage;
+
+    private class CustomConnection implements ServiceConnection {
+        private Messenger mMessenger;
+        /**
+         * Stores {@link ImportRequest} objects until actual connection is established.
+         */
+        private Queue<ImportRequest> mPendingRequests =
+                new LinkedList<ImportRequest>();
+
+        private boolean mConnected = false;
+        private boolean mNeedToCallFinish = false;
+        private boolean mDisconnectAndFinishDone = false;
+
+        public void doBindService() {
+            bindService(new Intent(ImportVCardActivity.this,
+                    VCardService.class), this, Context.BIND_AUTO_CREATE);
+        }
+
+        /**
+         * Tries to unbind this connection and call {@link ImportVCardActivity#finish()}.
+         * When timing is not appropriate, this object remembers this call and
+         * call {@link ImportVCardActivity#unbindService(ServiceConnection)} and
+         * {@link ImportVCardActivity#finish()} afterwards.
+         */
+        public void tryDisconnectAndFinish() {
+            synchronized (this) {
+                if (!mDisconnectAndFinishDone) {
+                    mNeedToCallFinish = true;
+                    if (mConnected) {
+                        // onServiceConnected() is already finished and we need to
+                        // "manually" call unbindService() here.
+                        unbindService(this);
+                        mConnected = false;
+                        mDisconnectAndFinishDone = true;
+                        finish();
+                    } else {
+                        // If not connected, finish() must be called when connected, as
+                        // We cannot call finish() now.
+                    }
+                }
+            }
+        }
+
+        public void requestSend(final ImportRequest parameter) {
+            synchronized (mPendingRequests) {
+                if (mMessenger != null) {
+                    sendMessage(parameter);
+                } else {
+                    mPendingRequests.add(parameter);
+                }
+            }
+        }
+
+        private void sendMessage(final ImportRequest request) {
+            try {
+                mMessenger.send(Message.obtain(null,
+                        VCardService.MSG_IMPORT_REQUEST,
+                        request));
+            } catch (RemoteException e) {
+                Log.e(LOG_TAG, "RemoteException is thrown when trying to send request");
+                runOnUiThread(new DialogDisplayer(
+                        getString(R.string.fail_reason_unknown)));
+            }
+        }
+
+        @Override
+        public void onServiceConnected(ComponentName name, IBinder service) {
+            synchronized (mPendingRequests) {
+                mMessenger = new Messenger(service);
+
+                // Send pending requests thrown from this Activity before an actual connection
+                // is established.
+                while (!mPendingRequests.isEmpty()) {
+                    final ImportRequest parameter = mPendingRequests.poll();
+                    if (parameter == null) {
+                        throw new NullPointerException();
+                    }
+                    sendMessage(parameter);
+                }
+            }
+
+            synchronized (this) {
+                if (!mDisconnectAndFinishDone) {
+                    mConnected = true;
+                    if (mNeedToCallFinish) {
+                        mDisconnectAndFinishDone = true;
+                        finish();
+                    }
+                }
+            }
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName name) {
+            synchronized (mPendingRequests) {
+                if (!mPendingRequests.isEmpty()) {
+                    Log.w(LOG_TAG, "Some request(s) are dropped.");
+                }
+            }
+
+            // Set to null so that we can detect inappropriate re-connection toward
+            // the Service via NullPointerException;
+            mPendingRequests = null;
+            mMessenger = null;
+        }
+    }
+
+    private final CustomConnection mConnection = new CustomConnection();
+
+    private static class VCardFile {
+        private final String mName;
+        private final String mCanonicalPath;
+        private final long mLastModified;
+
+        public VCardFile(String name, String canonicalPath, long lastModified) {
+            mName = name;
+            mCanonicalPath = canonicalPath;
+            mLastModified = lastModified;
+        }
+
+        public String getName() {
+            return mName;
+        }
+
+        public String getCanonicalPath() {
+            return mCanonicalPath;
+        }
+
+        public long getLastModified() {
+            return mLastModified;
+        }
+    }
+
+    // Runs on the UI thread.
+    private class DialogDisplayer implements Runnable {
+        private final int mResId;
+        public DialogDisplayer(int resId) {
+            mResId = resId;
+        }
+        public DialogDisplayer(String errorMessage) {
+            mResId = R.id.dialog_error_with_message;
+            mErrorMessage = errorMessage;
+        }
+        public void run() {
+            showDialog(mResId);
+        }
+    }
+
+    private class CancelListener
+        implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
+        public void onClick(DialogInterface dialog, int which) {
+            finish();
+        }
+
+        public void onCancel(DialogInterface dialog) {
+            finish();
+        }
+    }
+
+    private CancelListener mCancelListener = new CancelListener();
+
+    /**
+     * Caches all vCard data into local data directory so that we allow
+     * {@link VCardService} to access all the contents in given Uris, some of
+     * which may not be accessible from other components due to permission problem.
+     * (Activity which gives the Uri may allow only this Activity to access that content,
+     * not the other components like {@link VCardService}.
+     *
+     * We also allow the Service to happen to exit during the vCard import procedure.
+     */
+    private class VCardCacheThread extends Thread
+            implements DialogInterface.OnCancelListener {
+        private static final String CACHE_FILE_PREFIX = "import_tmp_";
+        private boolean mCanceled;
+        private PowerManager.WakeLock mWakeLock;
+        private VCardParser mVCardParser;
+        private final Uri[] mSourceUris;
+
+        public VCardCacheThread(final Uri[] sourceUris) {
+            mSourceUris = sourceUris;
+            final int length = sourceUris.length;
+            final Context context = ImportVCardActivity.this;
+            final PowerManager powerManager =
+                    (PowerManager)context.getSystemService(Context.POWER_SERVICE);
+            mWakeLock = powerManager.newWakeLock(
+                    PowerManager.SCREEN_DIM_WAKE_LOCK |
+                    PowerManager.ON_AFTER_RELEASE, LOG_TAG);
+        }
+
+        @Override
+        public void finalize() {
+            if (mWakeLock != null && mWakeLock.isHeld()) {
+                mWakeLock.release();
+            }
+        }
+
+        @Override
+        public void run() {
+            final Context context = ImportVCardActivity.this;
+            final ContentResolver resolver = context.getContentResolver();
+            String errorMessage = null;
+            mWakeLock.acquire();
+            try {
+                clearOldCache();
+                mConnection.doBindService();
+
+                final int length = mSourceUris.length;
+                // Uris given from caller applications may not be opened twice: consider when
+                // it is not from local storage (e.g. "file:///...") but from some special
+                // provider (e.g. "content://...").
+                // Thus we have to once copy the content of Uri into local storage, and read
+                // it after it. This copy is also useful fro the view of stability of the import,
+                // as we are able to restore the procedure even when it is aborted during it.
+                // Imagine the case the importer encountered memory-low situation when
+                // reading 10th entry of a vCard file.
+                //
+                // We may be able to read content of each vCard file during copying them
+                // to local storage, but currently vCard code does not allow us to do so.
+                for (int i = 0; i < length; i++) {
+                    final Uri sourceUri = mSourceUris[i];
+                    final Uri localDataUri = copyToLocal(sourceUri, i);
+                    if (mCanceled) {
+                        break;
+                    }
+                    if (localDataUri == null) {
+                        Log.w(LOG_TAG, "destUri is null");
+                        break;
+                    }
+                    final ImportRequest parameter = constructRequestParameter(localDataUri);
+                    if (mCanceled) {
+                        return;
+                    }
+                    mConnection.requestSend(parameter);
+                }
+            } catch (OutOfMemoryError e) {
+                Log.e(LOG_TAG, "OutOfMemoryError");
+                // We should take care of this case since Android devices may have
+                // smaller memory than we usually expect.
+                System.gc();
+                runOnUiThread(new DialogDisplayer(
+                        getString(R.string.fail_reason_low_memory_during_import)));
+            } catch (IOException e) {
+                Log.e(LOG_TAG, e.getMessage());
+                runOnUiThread(new DialogDisplayer(
+                        getString(R.string.fail_reason_io_error)));
+            } finally {
+                mWakeLock.release();
+                mProgressDialogForCacheVCard.dismiss();
+                mConnection.tryDisconnectAndFinish();
+            }
+        }
+
+        /**
+         * Copy the content of sourceUri to local storage. 
+         */
+        private Uri copyToLocal(final Uri sourceUri, int i) throws IOException {
+            final Context context = ImportVCardActivity.this;
+            final ContentResolver resolver = context.getContentResolver();
+            ReadableByteChannel inputChannel = null;
+            WritableByteChannel outputChannel = null;
+            Uri destUri;
+            try {
+                // XXX: better way to copy stream?
+                {
+                    inputChannel = Channels.newChannel(resolver.openInputStream(mSourceUris[i]));
+                    final String filename = CACHE_FILE_PREFIX + i + ".vcf";
+                    destUri = Uri.parse(context.getFileStreamPath(filename).toURI().toString());
+                    outputChannel =
+                            context.openFileOutput(filename, Context.MODE_PRIVATE).getChannel();
+                    final ByteBuffer buffer = ByteBuffer.allocateDirect(8192);
+                    while (inputChannel.read(buffer) != -1) {
+                        if (mCanceled) {
+                            Log.d(LOG_TAG, "Canceled during caching " + mSourceUris[i]);
+                            return null;
+                        }
+                        buffer.flip();
+                        outputChannel.write(buffer);
+                        buffer.compact();
+                    }
+                    buffer.flip();
+                    while (buffer.hasRemaining()) {
+                        outputChannel.write(buffer);
+                    }
+                }
+            } finally {
+                if (inputChannel != null) {
+                    try {
+                        inputChannel.close();
+                    } catch (IOException e) {
+                        Log.w(LOG_TAG, "Failed to close inputChannel.");
+                    }
+                }
+                if (outputChannel != null) {
+                    try {
+                        outputChannel.close();
+                    } catch(IOException e) {
+                        Log.w(LOG_TAG, "Failed to close outputChannel");
+                    }
+                }
+            }
+            return destUri;
+        }
+
+        /**
+         * Reads the Uri once (or twice) and constructs {@link ImportRequest} from
+         * its content.
+         */
+        private ImportRequest constructRequestParameter(final Uri uri) {
+            final ContentResolver resolver =
+                    ImportVCardActivity.this.getContentResolver();
+            VCardEntryCounter counter = null;
+            VCardSourceDetector detector = null;
+            VCardInterpreterCollection interpreter = null;
+            int vcardVersion = VCARD_VERSION_V21;
+            try {
+                boolean shouldUseV30 = false;
+                InputStream is;
+
+                is = resolver.openInputStream(uri);
+                mVCardParser = new VCardParser_V21();
+                try {
+                    counter = new VCardEntryCounter();
+                    detector = new VCardSourceDetector();
+                    interpreter =
+                            new VCardInterpreterCollection(
+                                    Arrays.asList(counter, detector));
+                    mVCardParser.parse(is, interpreter);
+                } catch (VCardVersionException e1) {
+                    try {
+                        is.close();
+                    } catch (IOException e) {
+                    }
+
+                    shouldUseV30 = true;
+                    is = resolver.openInputStream(uri);
+                    mVCardParser = new VCardParser_V30();
+                    try {
+                        counter = new VCardEntryCounter();
+                        detector = new VCardSourceDetector();
+                        interpreter =
+                                new VCardInterpreterCollection(
+                                        Arrays.asList(counter, detector));
+                        mVCardParser.parse(is, interpreter);
+                    } catch (VCardVersionException e2) {
+                        throw new VCardException("vCard with unspported version.");
+                    }
+                } finally {
+                    if (is != null) {
+                        try {
+                            is.close();
+                        } catch (IOException e) {
+                        }
+                    }
+                }
+
+                vcardVersion = shouldUseV30 ? VCARD_VERSION_V30 : VCARD_VERSION_V21;
+            } catch (VCardNestedException e) {
+                Log.w(LOG_TAG, "Nested Exception is found (it may be false-positive).");
+                // Go through without returning null.
+            } catch (VCardException e) {
+                Log.e(LOG_TAG, e.getMessage());
+                return null;
+            } catch (IOException e) {
+                Log.e(LOG_TAG, "IOException was emitted: " + e.getMessage());
+                return null;
+            }
+            return new ImportRequest(mAccount, uri,
+                    detector.getEstimatedType(),
+                    detector.getEstimatedCharset(),
+                    vcardVersion, counter.getCount());
+        }
+
+        /**
+         * We (currently) don't have any way to clean up cache files used in the previous
+         * import process,
+         * TODO(dmiyakawa): Can we do it after Service being done?
+         */
+        private void clearOldCache() {
+            final Context context = ImportVCardActivity.this;
+            final String[] fileLists = context.fileList();
+            for (String fileName : fileLists) {
+                if (fileName.startsWith(CACHE_FILE_PREFIX)) {
+                    Log.d(LOG_TAG, "Remove temporary file: " + fileName);
+                    context.deleteFile(fileName);
+                }
+            }
+        }
+
+        public Uri[] getSourceUris() {
+            return mSourceUris;
+        }
+
+        public void cancel() {
+            mCanceled = true;
+            if (mVCardParser != null) {
+                mVCardParser.cancel();
+            }
+        }
+
+        public void onCancel(DialogInterface dialog) {
+            cancel();
+        }
+    }
+
+    private class ImportTypeSelectedListener implements
+            DialogInterface.OnClickListener {
+        public static final int IMPORT_ONE = 0;
+        public static final int IMPORT_MULTIPLE = 1;
+        public static final int IMPORT_ALL = 2;
+        public static final int IMPORT_TYPE_SIZE = 3;
+
+        private int mCurrentIndex;
+
+        public void onClick(DialogInterface dialog, int which) {
+            if (which == DialogInterface.BUTTON_POSITIVE) {
+                switch (mCurrentIndex) {
+                case IMPORT_ALL:
+                    importVCardFromSDCard(mAllVCardFileList);
+                    break;
+                case IMPORT_MULTIPLE:
+                    showDialog(R.id.dialog_select_multiple_vcard);
+                    break;
+                default:
+                    showDialog(R.id.dialog_select_one_vcard);
+                    break;
+                }
+            } else if (which == DialogInterface.BUTTON_NEGATIVE) {
+                finish();
+            } else {
+                mCurrentIndex = which;
+            }
+        }
+    }
+
+    private class VCardSelectedListener implements
+            DialogInterface.OnClickListener, DialogInterface.OnMultiChoiceClickListener {
+        private int mCurrentIndex;
+        private Set<Integer> mSelectedIndexSet;
+
+        public VCardSelectedListener(boolean multipleSelect) {
+            mCurrentIndex = 0;
+            if (multipleSelect) {
+                mSelectedIndexSet = new HashSet<Integer>();
+            }
+        }
+
+        public void onClick(DialogInterface dialog, int which) {
+            if (which == DialogInterface.BUTTON_POSITIVE) {
+                if (mSelectedIndexSet != null) {
+                    List<VCardFile> selectedVCardFileList = new ArrayList<VCardFile>();
+                    final int size = mAllVCardFileList.size();
+                    // We'd like to sort the files by its index, so we do not use Set iterator.
+                    for (int i = 0; i < size; i++) {
+                        if (mSelectedIndexSet.contains(i)) {
+                            selectedVCardFileList.add(mAllVCardFileList.get(i));
+                        }
+                    }
+                    importVCardFromSDCard(selectedVCardFileList);
+                } else {
+                    importVCardFromSDCard(mAllVCardFileList.get(mCurrentIndex));
+                }
+            } else if (which == DialogInterface.BUTTON_NEGATIVE) {
+                finish();
+            } else {
+                // Some file is selected.
+                mCurrentIndex = which;
+                if (mSelectedIndexSet != null) {
+                    if (mSelectedIndexSet.contains(which)) {
+                        mSelectedIndexSet.remove(which);
+                    } else {
+                        mSelectedIndexSet.add(which);
+                    }
+                }
+            }
+        }
+
+        public void onClick(DialogInterface dialog, int which, boolean isChecked) {
+            if (mSelectedIndexSet == null || (mSelectedIndexSet.contains(which) == isChecked)) {
+                Log.e(LOG_TAG, String.format("Inconsist state in index %d (%s)", which,
+                        mAllVCardFileList.get(which).getCanonicalPath()));
+            } else {
+                onClick(dialog, which);
+            }
+        }
+    }
+
+    /**
+     * Thread scanning VCard from SDCard. After scanning, the dialog which lets a user select
+     * a vCard file is shown. After the choice, VCardReadThread starts running.
+     */
+    private class VCardScanThread extends Thread implements OnCancelListener, OnClickListener {
+        private boolean mCanceled;
+        private boolean mGotIOException;
+        private File mRootDirectory;
+
+        // To avoid recursive link.
+        private Set<String> mCheckedPaths;
+        private PowerManager.WakeLock mWakeLock;
+
+        private class CanceledException extends Exception {
+        }
+
+        public VCardScanThread(File sdcardDirectory) {
+            mCanceled = false;
+            mGotIOException = false;
+            mRootDirectory = sdcardDirectory;
+            mCheckedPaths = new HashSet<String>();
+            PowerManager powerManager = (PowerManager)ImportVCardActivity.this.getSystemService(
+                    Context.POWER_SERVICE);
+            mWakeLock = powerManager.newWakeLock(
+                    PowerManager.SCREEN_DIM_WAKE_LOCK |
+                    PowerManager.ON_AFTER_RELEASE, LOG_TAG);
+        }
+
+        @Override
+        public void run() {
+            mAllVCardFileList = new Vector<VCardFile>();
+            try {
+                mWakeLock.acquire();
+                getVCardFileRecursively(mRootDirectory);
+            } catch (CanceledException e) {
+                mCanceled = true;
+            } catch (IOException e) {
+                mGotIOException = true;
+            } finally {
+                mWakeLock.release();
+            }
+
+            if (mCanceled) {
+                mAllVCardFileList = null;
+            }
+
+            mProgressDialogForScanVCard.dismiss();
+            mProgressDialogForScanVCard = null;
+
+            if (mGotIOException) {
+                runOnUiThread(new DialogDisplayer(R.id.dialog_io_exception));
+            } else if (mCanceled) {
+                finish();
+            } else {
+                int size = mAllVCardFileList.size();
+                final Context context = ImportVCardActivity.this;
+                if (size == 0) {
+                    runOnUiThread(new DialogDisplayer(R.id.dialog_vcard_not_found));
+                } else {
+                    startVCardSelectAndImport();
+                }
+            }
+        }
+
+        private void getVCardFileRecursively(File directory)
+                throws CanceledException, IOException {
+            if (mCanceled) {
+                throw new CanceledException();
+            }
+
+            // e.g. secured directory may return null toward listFiles().
+            final File[] files = directory.listFiles();
+            if (files == null) {
+                final String currentDirectoryPath = directory.getCanonicalPath();
+                final String secureDirectoryPath =
+                        mRootDirectory.getCanonicalPath().concat(SECURE_DIRECTORY_NAME);
+                if (!TextUtils.equals(currentDirectoryPath, secureDirectoryPath)) {
+                    Log.w(LOG_TAG, "listFiles() returned null (directory: " + directory + ")");
+                }
+                return;
+            }
+            for (File file : directory.listFiles()) {
+                if (mCanceled) {
+                    throw new CanceledException();
+                }
+                String canonicalPath = file.getCanonicalPath();
+                if (mCheckedPaths.contains(canonicalPath)) {
+                    continue;
+                }
+
+                mCheckedPaths.add(canonicalPath);
+
+                if (file.isDirectory()) {
+                    getVCardFileRecursively(file);
+                } else if (canonicalPath.toLowerCase().endsWith(".vcf") &&
+                        file.canRead()){
+                    String fileName = file.getName();
+                    VCardFile vcardFile = new VCardFile(
+                            fileName, canonicalPath, file.lastModified());
+                    mAllVCardFileList.add(vcardFile);
+                }
+            }
+        }
+
+        public void onCancel(DialogInterface dialog) {
+            mCanceled = true;
+        }
+
+        public void onClick(DialogInterface dialog, int which) {
+            if (which == DialogInterface.BUTTON_NEGATIVE) {
+                mCanceled = true;
+            }
+        }
+    }
+
+    private void startVCardSelectAndImport() {
+        int size = mAllVCardFileList.size();
+        if (getResources().getBoolean(R.bool.config_import_all_vcard_from_sdcard_automatically) ||
+                size == 1) {
+            importVCardFromSDCard(mAllVCardFileList);
+        } else if (getResources().getBoolean(R.bool.config_allow_users_select_all_vcard_import)) {
+            runOnUiThread(new DialogDisplayer(R.id.dialog_select_import_type));
+        } else {
+            runOnUiThread(new DialogDisplayer(R.id.dialog_select_one_vcard));
+        }
+    }
+
+    private void importVCardFromSDCard(final List<VCardFile> selectedVCardFileList) {
+        final int size = selectedVCardFileList.size();
+        String[] uriStrings = new String[size];
+        int i = 0;
+        for (VCardFile vcardFile : selectedVCardFileList) {
+            uriStrings[i] = "file://" + vcardFile.getCanonicalPath();
+            i++;
+        }
+        importVCard(uriStrings);
+    }
+    
+    private void importVCardFromSDCard(final VCardFile vcardFile) {
+        importVCard(new Uri[] {Uri.parse("file://" + vcardFile.getCanonicalPath())});
+    }
+
+    private void importVCard(final Uri uri) {
+        importVCard(new Uri[] {uri});
+    }
+
+    private void importVCard(final String[] uriStrings) {
+        final int length = uriStrings.length;
+        final Uri[] uris = new Uri[length];
+        for (int i = 0; i < length; i++) {
+            uris[i] = Uri.parse(uriStrings[i]);
+        }
+        importVCard(uris);
+    }
+
+    private void importVCard(final Uri[] uris) {
+        runOnUiThread(new Runnable() {
+            public void run() {
+                mVCardCacheThread = new VCardCacheThread(uris);
+                showDialog(R.id.dialog_cache_vcard);
+            }
+        });
+    }
+
+    private Dialog getSelectImportTypeDialog() {
+        final DialogInterface.OnClickListener listener = new ImportTypeSelectedListener();
+        final AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                .setTitle(R.string.select_vcard_title)
+                .setPositiveButton(android.R.string.ok, listener)
+                .setOnCancelListener(mCancelListener)
+                .setNegativeButton(android.R.string.cancel, mCancelListener);
+
+        final String[] items = new String[ImportTypeSelectedListener.IMPORT_TYPE_SIZE];
+        items[ImportTypeSelectedListener.IMPORT_ONE] =
+                getString(R.string.import_one_vcard_string);
+        items[ImportTypeSelectedListener.IMPORT_MULTIPLE] =
+                getString(R.string.import_multiple_vcard_string);
+        items[ImportTypeSelectedListener.IMPORT_ALL] =
+                getString(R.string.import_all_vcard_string);
+        builder.setSingleChoiceItems(items, ImportTypeSelectedListener.IMPORT_ONE, listener);
+        return builder.create();
+    }
+
+    private Dialog getVCardFileSelectDialog(boolean multipleSelect) {
+        final int size = mAllVCardFileList.size();
+        final VCardSelectedListener listener = new VCardSelectedListener(multipleSelect);
+        final AlertDialog.Builder builder =
+                new AlertDialog.Builder(this)
+                        .setTitle(R.string.select_vcard_title)
+                        .setPositiveButton(android.R.string.ok, listener)
+                        .setOnCancelListener(mCancelListener)
+                        .setNegativeButton(android.R.string.cancel, mCancelListener);
+
+        CharSequence[] items = new CharSequence[size];
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        for (int i = 0; i < size; i++) {
+            VCardFile vcardFile = mAllVCardFileList.get(i);
+            SpannableStringBuilder stringBuilder = new SpannableStringBuilder();
+            stringBuilder.append(vcardFile.getName());
+            stringBuilder.append('\n');
+            int indexToBeSpanned = stringBuilder.length();
+            // Smaller date text looks better, since each file name becomes easier to read.
+            // The value set to RelativeSizeSpan is arbitrary. You can change it to any other
+            // value (but the value bigger than 1.0f would not make nice appearance :)
+            stringBuilder.append(
+                        "(" + dateFormat.format(new Date(vcardFile.getLastModified())) + ")");
+            stringBuilder.setSpan(
+                    new RelativeSizeSpan(0.7f), indexToBeSpanned, stringBuilder.length(),
+                    Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+            items[i] = stringBuilder;
+        }
+        if (multipleSelect) {
+            builder.setMultiChoiceItems(items, (boolean[])null, listener);
+        } else {
+            builder.setSingleChoiceItems(items, 0, listener);
+        }
+        return builder.create();
+    }
+
+    @Override
+    protected void onCreate(Bundle bundle) {
+        super.onCreate(bundle);
+
+        String accountName = null;
+        String accountType = null;
+        final Intent intent = getIntent();
+        if (intent != null) {
+            accountName = intent.getStringExtra(SelectAccountActivity.ACCOUNT_NAME);
+            accountType = intent.getStringExtra(SelectAccountActivity.ACCOUNT_TYPE);
+            mAction = intent.getAction();
+            mUri = intent.getData();
+        } else {
+            Log.e(LOG_TAG, "intent does not exist");
+        }
+
+        if (!TextUtils.isEmpty(accountName) && !TextUtils.isEmpty(accountType)) {
+            mAccount = new Account(accountName, accountType);
+        } else {
+            final AccountTypes sources = AccountTypes.getInstance(this);
+            final List<Account> accountList = sources.getAccounts(true);
+            if (accountList.size() == 0) {
+                mAccount = null;
+            } else if (accountList.size() == 1) {
+                mAccount = accountList.get(0);
+            } else {
+                startActivityForResult(new Intent(this, SelectAccountActivity.class),
+                        SELECT_ACCOUNT);
+                return;
+            }
+        }
+
+        startImport(mAction, mUri);
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
+        if (requestCode == SELECT_ACCOUNT) {
+            if (resultCode == RESULT_OK) {
+                mAccount = new Account(
+                        intent.getStringExtra(SelectAccountActivity.ACCOUNT_NAME),
+                        intent.getStringExtra(SelectAccountActivity.ACCOUNT_TYPE));
+                startImport(mAction, mUri);
+            } else {
+                if (resultCode != RESULT_CANCELED) {
+                    Log.w(LOG_TAG, "Result code was not OK nor CANCELED: " + resultCode);
+                }
+                finish();
+            }
+        }
+    }
+
+    private void startImport(String action, Uri uri) {
+        Log.d(LOG_TAG, "action = " + action + " ; path = " + uri);
+
+        if (uri != null) {
+            importVCard(uri);
+        } else {
+            doScanExternalStorageAndImportVCard();
+        }
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int resId, Bundle bundle) {
+        switch (resId) {
+            case R.string.import_from_sdcard: {
+                if (mAccountSelectionListener == null) {
+                    throw new NullPointerException(
+                            "mAccountSelectionListener must not be null.");
+                }
+                return AccountSelectionUtil.getSelectAccountDialog(this, resId,
+                        mAccountSelectionListener, mCancelListener);
+            }
+            case R.id.dialog_searching_vcard: {
+                if (mProgressDialogForScanVCard == null) {
+                    String title = getString(R.string.searching_vcard_title);
+                    String message = getString(R.string.searching_vcard_message);
+                    mProgressDialogForScanVCard =
+                        ProgressDialog.show(this, title, message, true, false);
+                    mProgressDialogForScanVCard.setOnCancelListener(mVCardScanThread);
+                    mVCardScanThread.start();
+                }
+                return mProgressDialogForScanVCard;
+            }
+            case R.id.dialog_sdcard_not_found: {
+                AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                    .setTitle(R.string.no_sdcard_title)
+                    .setIcon(android.R.drawable.ic_dialog_alert)
+                    .setMessage(R.string.no_sdcard_message)
+                    .setOnCancelListener(mCancelListener)
+                    .setPositiveButton(android.R.string.ok, mCancelListener);
+                return builder.create();
+            }
+            case R.id.dialog_vcard_not_found: {
+                String message = (getString(R.string.scanning_sdcard_failed_message,
+                        getString(R.string.fail_reason_no_vcard_file)));
+                AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                    .setTitle(R.string.scanning_sdcard_failed_title)
+                    .setMessage(message)
+                    .setOnCancelListener(mCancelListener)
+                    .setPositiveButton(android.R.string.ok, mCancelListener);
+                return builder.create();
+            }
+            case R.id.dialog_select_import_type: {
+                return getSelectImportTypeDialog();
+            }
+            case R.id.dialog_select_multiple_vcard: {
+                return getVCardFileSelectDialog(true);
+            }
+            case R.id.dialog_select_one_vcard: {
+                return getVCardFileSelectDialog(false);
+            }
+            case R.id.dialog_cache_vcard: {
+                if (mProgressDialogForCacheVCard == null) {
+                    final String title = getString(R.string.caching_vcard_title);
+                    final String message = getString(R.string.caching_vcard_message);
+                    mProgressDialogForCacheVCard = new ProgressDialog(this);
+                    mProgressDialogForCacheVCard.setTitle(title);
+                    mProgressDialogForCacheVCard.setMessage(message);
+                    mProgressDialogForCacheVCard.setProgressStyle(ProgressDialog.STYLE_SPINNER);
+                    mProgressDialogForCacheVCard.setOnCancelListener(mVCardCacheThread);
+                    mVCardCacheThread.start();
+                }
+                return mProgressDialogForCacheVCard;
+            }
+            case R.id.dialog_io_exception: {
+                String message = (getString(R.string.scanning_sdcard_failed_message,
+                        getString(R.string.fail_reason_io_error)));
+                AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                    .setTitle(R.string.scanning_sdcard_failed_title)
+                    .setIcon(android.R.drawable.ic_dialog_alert)
+                    .setMessage(message)
+                    .setOnCancelListener(mCancelListener)
+                    .setPositiveButton(android.R.string.ok, mCancelListener);
+                return builder.create();
+            }
+            case R.id.dialog_error_with_message: {
+                String message = mErrorMessage;
+                if (TextUtils.isEmpty(message)) {
+                    Log.e(LOG_TAG, "Error message is null while it must not.");
+                    message = getString(R.string.fail_reason_unknown);
+                }
+                final AlertDialog.Builder builder = new AlertDialog.Builder(this)
+                    .setTitle(getString(R.string.reading_vcard_failed_title))
+                    .setIcon(android.R.drawable.ic_dialog_alert)
+                    .setMessage(message)
+                    .setOnCancelListener(mCancelListener)
+                    .setPositiveButton(android.R.string.ok, mCancelListener);
+                return builder.create();
+            }
+        }
+
+        return super.onCreateDialog(resId, bundle);
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        if (mVCardCacheThread != null) {
+            final Uri[] uris = mVCardCacheThread.getSourceUris();
+            final int length = uris.length;
+            final String[] uriStrings = new String[length];
+            for (int i = 0; i < length; i++) {
+                    uriStrings[i] = uris[i].toString();
+            }
+            outState.putStringArray(CACHED_URIS, uriStrings);
+
+            mVCardCacheThread.cancel();
+        }
+    }
+
+    @Override
+    protected void onRestoreInstanceState(Bundle inState) {
+        final String[] uriStrings = inState.getStringArray(CACHED_URIS);
+        if (uriStrings != null && uriStrings.length > 0) {
+            final int length = uriStrings.length;
+            final Uri[] uris = new Uri[length];
+            for (int i = 0; i < length; i++) {
+                uris[i] = Uri.parse(uriStrings[i]);
+            }
+
+            mVCardCacheThread = new VCardCacheThread(uris);
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+
+        mConnection.tryDisconnectAndFinish();
+
+        // ImportVCardActivity should not be persistent. In other words, if there's some
+        // event calling onPause(), this Activity should finish its work and give the main
+        // screen back to the caller Activity.
+        if (!isFinishing()) {
+            finish();
+        }
+    }
+
+    /**
+     * Scans vCard in external storage (typically SDCard) and tries to import it.
+     * - When there's no SDCard available, an error dialog is shown.
+     * - When multiple vCard files are available, asks a user to select one.
+     */
+    private void doScanExternalStorageAndImportVCard() {
+        // TODO: should use getExternalStorageState().
+        final File file = Environment.getExternalStorageDirectory();
+        if (!file.exists() || !file.isDirectory() || !file.canRead()) {
+            showDialog(R.id.dialog_sdcard_not_found);
+        } else {
+            mVCardScanThread = new VCardScanThread(file);
+            showDialog(R.id.dialog_searching_vcard);
+        }
+    }
+}
diff --git a/src/com/android/contacts/vcard/SelectAccountActivity.java b/src/com/android/contacts/vcard/SelectAccountActivity.java
new file mode 100644
index 0000000..3b78921
--- /dev/null
+++ b/src/com/android/contacts/vcard/SelectAccountActivity.java
@@ -0,0 +1,107 @@
+/*
+ * 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.vcard;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.os.Bundle;
+import android.util.Log;
+
+import com.android.contacts.R;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.util.AccountSelectionUtil;
+
+import java.util.List;
+
+public class SelectAccountActivity extends Activity {
+    private static final String LOG_TAG = "SelectAccountActivity";
+
+    public static final String ACCOUNT_NAME = "account_name";
+    public static final String ACCOUNT_TYPE = "account_type";
+
+    private class CancelListener
+            implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener {
+        public void onClick(DialogInterface dialog, int which) {
+            finish();
+        }
+        public void onCancel(DialogInterface dialog) {
+            finish();
+        }
+    }
+
+    private AccountSelectionUtil.AccountSelectedListener mAccountSelectionListener;
+
+    @Override
+    protected void onCreate(Bundle bundle) {
+        super.onCreate(bundle);
+
+        // There's three possibilities:
+        // - more than one accounts -> ask the user
+        // - just one account -> use the account without asking the user
+        // - no account -> use phone-local storage without asking the user
+        final int resId = R.string.import_from_sdcard;
+        final AccountTypes sources = AccountTypes.getInstance(this);
+        final List<Account> accountList = sources.getAccounts(true);
+        if (accountList.size() == 0) {
+            Log.w(LOG_TAG, "Account does not exist");
+            finish();
+        } else if (accountList.size() == 1) {
+            final Account account = accountList.get(0);
+            final Intent intent = new Intent();
+            intent.putExtra(ACCOUNT_NAME, account.name);
+            intent.putExtra(ACCOUNT_TYPE, account.type);
+            setResult(RESULT_OK, intent);
+            finish();
+        }
+
+        // Multiple accounts. Let users to select one.
+        mAccountSelectionListener =
+                new AccountSelectionUtil.AccountSelectedListener(
+                        this, accountList, resId) {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        dialog.dismiss();
+                        final Account account = mAccountList.get(which);
+                        final Intent intent = new Intent();
+                        intent.putExtra(ACCOUNT_NAME, account.name);
+                        intent.putExtra(ACCOUNT_TYPE, account.type);
+                        setResult(RESULT_OK, intent);
+                        finish();
+                    }
+                };
+        showDialog(resId);
+        return;
+    }
+
+    @Override
+    protected Dialog onCreateDialog(int resId, Bundle bundle) {
+        switch (resId) {
+            case R.string.import_from_sdcard: {
+                if (mAccountSelectionListener == null) {
+                    throw new NullPointerException(
+                            "mAccountSelectionListener must not be null.");
+                }
+                return AccountSelectionUtil.getSelectAccountDialog(this, resId,
+                        mAccountSelectionListener,
+                        new CancelListener());
+            }
+        }
+        return super.onCreateDialog(resId, bundle);
+    }
+}
diff --git a/src/com/android/contacts/vcard/ThreadStarter.java b/src/com/android/contacts/vcard/ThreadStarter.java
new file mode 100644
index 0000000..d7adad6
--- /dev/null
+++ b/src/com/android/contacts/vcard/ThreadStarter.java
@@ -0,0 +1,20 @@
+/*
+ * 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.vcard;
+
+public interface ThreadStarter {
+    public void start();
+}
\ No newline at end of file
diff --git a/src/com/android/contacts/vcard/VCardService.java b/src/com/android/contacts/vcard/VCardService.java
new file mode 100644
index 0000000..1e855ab
--- /dev/null
+++ b/src/com/android/contacts/vcard/VCardService.java
@@ -0,0 +1,127 @@
+/*
+ * 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.vcard;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Message;
+import android.os.Messenger;
+import android.util.Log;
+import android.widget.Toast;
+
+import com.android.contacts.R;
+
+/**
+ * The class responsible for importing vCard from one ore multiple Uris.
+ */
+public class VCardService extends Service {
+    private final static String LOG_TAG = VCardService.class.getSimpleName();
+
+    /* package */ static final int MSG_IMPORT_REQUEST = 1;
+    /* package */ static final int MSG_EXPORT_REQUEST = 2;
+    /* package */ static final int MSG_CANCEL_IMPORT_REQUEST = 3;
+    /* package */ static final int MSG_NOTIFY_IMPORT_FINISHED = 5;
+
+    /* package */ static final int IMPORT_NOTIFICATION_ID = 1000;
+    /* package */ static final int EXPORT_NOTIFICATION_ID = 1001;
+
+    /**
+     * Small vCard file is imported soon, so any meassage saying "vCard import started" is
+     * not needed. We show the message when the size of vCard is larger than this constant. 
+     */
+    private static final int IMPORT_NOTIFICATION_THRESHOLD = 10;
+
+    public class ImportRequestHandler extends Handler {
+        private ImportProcessor mImportProcessor;
+        private ExportProcessor mExportProcessor = new ExportProcessor(VCardService.this);
+        private boolean mDoDelayedCancel = false;
+
+        public ImportRequestHandler() {
+            super();
+        }
+
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case MSG_IMPORT_REQUEST: {
+                    if (mDoDelayedCancel) {
+                        Log.i(LOG_TAG, "A cancel request came before import request. " +
+                                "Refrain current import once.");
+                        mDoDelayedCancel = false;
+                    } else {
+                        final ImportRequest parameter = (ImportRequest)msg.obj;
+
+                        if (mImportProcessor == null || !mImportProcessor.isReadyForRequest()) {
+                            mImportProcessor = new ImportProcessor(VCardService.this);
+                        } else if (mImportProcessor.isCanceled()) {
+                            Log.i(LOG_TAG,
+                                    "Existing ImporterProcessor is canceled. create another.");
+                            mImportProcessor = new ImportProcessor(VCardService.this);
+                        }
+
+                        mImportProcessor.pushRequest(parameter);
+                        if (parameter.entryCount > IMPORT_NOTIFICATION_THRESHOLD) {
+                            Toast.makeText(VCardService.this,
+                                    getString(R.string.vcard_importer_start_message),
+                                    Toast.LENGTH_LONG).show();
+                        }
+                    }
+                    break;
+                }
+                case MSG_EXPORT_REQUEST: {
+                    final ExportRequest parameter = (ExportRequest)msg.obj;
+                    mExportProcessor.pushRequest(parameter);
+                    Toast.makeText(VCardService.this,
+                            getString(R.string.vcard_exporter_start_message),
+                            Toast.LENGTH_LONG).show();
+                    break;
+                }
+                case MSG_CANCEL_IMPORT_REQUEST: {
+                    if (mImportProcessor != null) {
+                        mImportProcessor.cancel();
+                    } else {
+                        Log.w(LOG_TAG, "ImportProcessor isn't ready. Delay the cancel request.");
+                        mDoDelayedCancel = true;
+                    }
+                    break;
+                }
+                case MSG_NOTIFY_IMPORT_FINISHED: {
+                    Log.d(LOG_TAG, "MSG_NOTIFY_IMPORT_FINISHED");
+                    break;
+                }
+                default: {
+                    Log.e(LOG_TAG, "Unknown request type: " + msg.what);
+                    super.hasMessages(msg.what);
+                }
+            }
+        }
+    }
+
+    private ImportRequestHandler mHandler = new ImportRequestHandler();
+    private Messenger mMessenger = new Messenger(mHandler);
+
+    @Override
+    public int onStartCommand(Intent intent, int flags, int id) {
+        return START_STICKY;
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return mMessenger.getBinder();
+    }
+}
diff --git a/src/com/android/contacts/views/ContactLoader.java b/src/com/android/contacts/views/ContactLoader.java
new file mode 100644
index 0000000..d272f59
--- /dev/null
+++ b/src/com/android/contacts/views/ContactLoader.java
@@ -0,0 +1,851 @@
+/*
+ * 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.views;
+
+import com.android.contacts.util.DataStatus;
+
+import android.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Entity;
+import android.content.Entity.NamedContentValues;
+import android.content.Loader;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.Directory;
+import android.provider.ContactsContract.DisplayNameSources;
+import android.provider.ContactsContract.Groups;
+import android.provider.ContactsContract.RawContacts;
+import android.text.TextUtils;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Loads a single Contact and all it constituent RawContacts.
+ */
+public class ContactLoader extends Loader<ContactLoader.Result> {
+    private static final String TAG = "ContactLoader";
+
+    private Uri mLookupUri;
+    private boolean mLoadGroupMetaData;
+    private Result mContact;
+    private ForceLoadContentObserver mObserver;
+    private boolean mDestroyed;
+
+
+    public interface Listener {
+        public void onContactLoaded(Result contact);
+    }
+
+    /**
+     * The result of a load operation. Contains all data necessary to display the contact.
+     */
+    public static final class Result {
+        /**
+         * Singleton instance that represents "No Contact Found"
+         */
+        public static final Result NOT_FOUND = new Result();
+
+        /**
+         * Singleton instance that represents an error, e.g. because of an invalid Uri
+         * TODO: We should come up with something nicer here. Maybe use an Either type so
+         * that we can capture the Exception?
+         */
+        public static final Result ERROR = new Result();
+
+        private final Uri mLookupUri;
+        private final Uri mUri;
+        private final long mDirectoryId;
+        private final String mLookupKey;
+        private final long mId;
+        private final long mNameRawContactId;
+        private final int mDisplayNameSource;
+        private final long mPhotoId;
+        private final String mPhotoUri;
+        private final String mDisplayName;
+        private final String mPhoneticName;
+        private final boolean mStarred;
+        private final Integer mPresence;
+        private final ArrayList<Entity> mEntities;
+        private final HashMap<Long, DataStatus> mStatuses;
+        private final String mStatus;
+        private final Long mStatusTimestamp;
+        private final Integer mStatusLabel;
+        private final String mStatusResPackage;
+
+        private String mDirectoryDisplayName;
+        private String mDirectoryType;
+        private String mDirectoryAccountType;
+        private String mDirectoryAccountName;
+        private int mDirectoryExportSupport;
+
+        private ArrayList<GroupMetaData> mGroups;
+
+        /**
+         * Constructor for case "no contact found". This must only be used for the
+         * final {@link Result#NOT_FOUND} singleton
+         */
+        private Result() {
+            mLookupUri = null;
+            mUri = null;
+            mDirectoryId = -1;
+            mLookupKey = null;
+            mId = -1;
+            mEntities = null;
+            mStatuses = null;
+            mNameRawContactId = -1;
+            mDisplayNameSource = DisplayNameSources.UNDEFINED;
+            mPhotoId = -1;
+            mPhotoUri = null;
+            mDisplayName = null;
+            mPhoneticName = null;
+            mStarred = false;
+            mPresence = null;
+            mStatus = null;
+            mStatusTimestamp = null;
+            mStatusLabel = null;
+            mStatusResPackage = null;
+        }
+
+        /**
+         * Constructor to call when contact was found
+         * @param photoUri TODO
+         */
+        private Result(Uri uri, Uri lookupUri, long directoryId, String lookupKey, long id,
+                long nameRawContactId, int displayNameSource, long photoId, String photoUri,
+                String displayName, String phoneticName, boolean starred, Integer presence,
+                String status, Long statusTimestamp, Integer statusLabel, String statusResPackage) {
+            mLookupUri = lookupUri;
+            mUri = uri;
+            mDirectoryId = directoryId;
+            mLookupKey = lookupKey;
+            mId = id;
+            mEntities = new ArrayList<Entity>();
+            mStatuses = new HashMap<Long, DataStatus>();
+            mNameRawContactId = nameRawContactId;
+            mDisplayNameSource = displayNameSource;
+            mPhotoId = photoId;
+            mPhotoUri = photoUri;
+            mDisplayName = displayName;
+            mPhoneticName = phoneticName;
+            mStarred = starred;
+            mPresence = presence;
+            mStatus = status;
+            mStatusTimestamp = statusTimestamp;
+            mStatusLabel = statusLabel;
+            mStatusResPackage = statusResPackage;
+        }
+
+        /**
+         * @param exportSupport See {@link Directory#EXPORT_SUPPORT}.
+         */
+        private void setDirectoryMetaData(String displayName, String directoryType,
+                String accountType, String accountName, int exportSupport) {
+            mDirectoryDisplayName = displayName;
+            mDirectoryType = directoryType;
+            mDirectoryAccountType = accountType;
+            mDirectoryAccountName = accountName;
+            mDirectoryExportSupport = exportSupport;
+        }
+
+        public Uri getLookupUri() {
+            return mLookupUri;
+        }
+        public String getLookupKey() {
+            return mLookupKey;
+        }
+        public Uri getUri() {
+            return mUri;
+        }
+        public long getId() {
+            return mId;
+        }
+        public long getNameRawContactId() {
+            return mNameRawContactId;
+        }
+        public int getDisplayNameSource() {
+            return mDisplayNameSource;
+        }
+        public long getPhotoId() {
+            return mPhotoId;
+        }
+        public String getPhotoUri() {
+            return mPhotoUri;
+        }
+        public String getDisplayName() {
+            return mDisplayName;
+        }
+        public String getPhoneticName() {
+            return mPhoneticName;
+        }
+        public boolean getStarred() {
+            return mStarred;
+        }
+        public Integer getPresence() {
+            return mPresence;
+        }
+        public String getSocialSnippet() {
+            return mStatus;
+        }
+        public Long getStatusTimestamp() {
+            return mStatusTimestamp;
+        }
+        public Integer getStatusLabel() {
+            return mStatusLabel;
+        }
+        public String getStatusResPackage() {
+            return mStatusResPackage;
+        }
+        public ArrayList<Entity> getEntities() {
+            return mEntities;
+        }
+        public HashMap<Long, DataStatus> getStatuses() {
+            return mStatuses;
+        }
+
+        public long getDirectoryId() {
+            return mDirectoryId;
+        }
+
+        public boolean isDirectoryEntry() {
+            return mDirectoryId != -1 && mDirectoryId != Directory.DEFAULT
+                    && mDirectoryId != Directory.LOCAL_INVISIBLE;
+        }
+
+        public int getDirectoryExportSupport() {
+            return mDirectoryExportSupport;
+        }
+
+        public String getDirectoryDisplayName() {
+            return mDirectoryDisplayName;
+        }
+
+        public String getDirectoryType() {
+            return mDirectoryType;
+        }
+
+        public String getDirectoryAccountType() {
+            return mDirectoryAccountType;
+        }
+
+        public String getDirectoryAccountName() {
+            return mDirectoryAccountName;
+        }
+
+        public ArrayList<ContentValues> getContentValues() {
+            if (mEntities.size() != 1) {
+                throw new IllegalStateException(
+                        "Cannot extract content values from an aggregated contact");
+            }
+
+            Entity entity = mEntities.get(0);
+            ArrayList<ContentValues> result = new ArrayList<ContentValues>();
+            ArrayList<NamedContentValues> subValues = entity.getSubValues();
+            if (subValues != null) {
+                int size = subValues.size();
+                for (int i = 0; i < size; i++) {
+                    NamedContentValues pair = subValues.get(i);
+                    if (Data.CONTENT_URI.equals(pair.uri)) {
+                        result.add(pair.values);
+                    }
+                }
+            }
+            return result;
+        }
+
+        private void addGroupMetaData(GroupMetaData group) {
+            if (mGroups == null) {
+                mGroups = new ArrayList<GroupMetaData>();
+            }
+            mGroups.add(group);
+        }
+
+        public List<GroupMetaData> getGroupMetaData() {
+            return mGroups;
+        }
+    }
+
+    private static class ContactQuery {
+        // Projection used for the query that loads all data for the entire contact.
+        final static String[] COLUMNS = new String[] {
+                Contacts.NAME_RAW_CONTACT_ID,
+                Contacts.DISPLAY_NAME_SOURCE,
+                Contacts.LOOKUP_KEY,
+                Contacts.DISPLAY_NAME,
+                Contacts.PHONETIC_NAME,
+                Contacts.PHOTO_ID,
+                Contacts.STARRED,
+                Contacts.CONTACT_PRESENCE,
+                Contacts.CONTACT_STATUS,
+                Contacts.CONTACT_STATUS_TIMESTAMP,
+                Contacts.CONTACT_STATUS_RES_PACKAGE,
+                Contacts.CONTACT_STATUS_LABEL,
+                Contacts.Entity.CONTACT_ID,
+                Contacts.Entity.RAW_CONTACT_ID,
+
+                RawContacts.ACCOUNT_NAME,
+                RawContacts.ACCOUNT_TYPE,
+                RawContacts.DIRTY,
+                RawContacts.VERSION,
+                RawContacts.SOURCE_ID,
+                RawContacts.SYNC1,
+                RawContacts.SYNC2,
+                RawContacts.SYNC3,
+                RawContacts.SYNC4,
+                RawContacts.DELETED,
+                RawContacts.IS_RESTRICTED,
+                RawContacts.NAME_VERIFIED,
+
+                Contacts.Entity.DATA_ID,
+                Data.DATA1,
+                Data.DATA2,
+                Data.DATA3,
+                Data.DATA4,
+                Data.DATA5,
+                Data.DATA6,
+                Data.DATA7,
+                Data.DATA8,
+                Data.DATA9,
+                Data.DATA10,
+                Data.DATA11,
+                Data.DATA12,
+                Data.DATA13,
+                Data.DATA14,
+                Data.DATA15,
+                Data.SYNC1,
+                Data.SYNC2,
+                Data.SYNC3,
+                Data.SYNC4,
+                Data.DATA_VERSION,
+                Data.IS_PRIMARY,
+                Data.IS_SUPER_PRIMARY,
+                Data.MIMETYPE,
+                Data.RES_PACKAGE,
+
+                GroupMembership.GROUP_SOURCE_ID,
+
+                Data.PRESENCE,
+                Data.CHAT_CAPABILITY,
+                Data.STATUS,
+                Data.STATUS_RES_PACKAGE,
+                Data.STATUS_ICON,
+                Data.STATUS_LABEL,
+                Data.STATUS_TIMESTAMP,
+
+                Contacts.PHOTO_URI,
+        };
+
+        public final static int NAME_RAW_CONTACT_ID = 0;
+        public final static int DISPLAY_NAME_SOURCE = 1;
+        public final static int LOOKUP_KEY = 2;
+        public final static int DISPLAY_NAME = 3;
+        public final static int PHONETIC_NAME = 4;
+        public final static int PHOTO_ID = 5;
+        public final static int STARRED = 6;
+        public final static int CONTACT_PRESENCE = 7;
+        public final static int CONTACT_STATUS = 8;
+        public final static int CONTACT_STATUS_TIMESTAMP = 9;
+        public final static int CONTACT_STATUS_RES_PACKAGE = 10;
+        public final static int CONTACT_STATUS_LABEL = 11;
+        public final static int CONTACT_ID = 12;
+        public final static int RAW_CONTACT_ID = 13;
+
+        public final static int ACCOUNT_NAME = 14;
+        public final static int ACCOUNT_TYPE = 15;
+        public final static int DIRTY = 16;
+        public final static int VERSION = 17;
+        public final static int SOURCE_ID = 18;
+        public final static int SYNC1 = 19;
+        public final static int SYNC2 = 20;
+        public final static int SYNC3 = 21;
+        public final static int SYNC4 = 22;
+        public final static int DELETED = 23;
+        public final static int IS_RESTRICTED = 24;
+        public final static int NAME_VERIFIED = 25;
+
+        public final static int DATA_ID = 26;
+        public final static int DATA1 = 27;
+        public final static int DATA2 = 28;
+        public final static int DATA3 = 29;
+        public final static int DATA4 = 30;
+        public final static int DATA5 = 31;
+        public final static int DATA6 = 32;
+        public final static int DATA7 = 33;
+        public final static int DATA8 = 34;
+        public final static int DATA9 = 35;
+        public final static int DATA10 = 36;
+        public final static int DATA11 = 37;
+        public final static int DATA12 = 38;
+        public final static int DATA13 = 39;
+        public final static int DATA14 = 40;
+        public final static int DATA15 = 41;
+        public final static int DATA_SYNC1 = 42;
+        public final static int DATA_SYNC2 = 43;
+        public final static int DATA_SYNC3 = 44;
+        public final static int DATA_SYNC4 = 45;
+        public final static int DATA_VERSION = 46;
+        public final static int IS_PRIMARY = 47;
+        public final static int IS_SUPERPRIMARY = 48;
+        public final static int MIMETYPE = 49;
+        public final static int RES_PACKAGE = 50;
+
+        public final static int GROUP_SOURCE_ID = 51;
+
+        public final static int PRESENCE = 52;
+        public final static int CHAT_CAPABILITY = 53;
+        public final static int STATUS = 54;
+        public final static int STATUS_RES_PACKAGE = 55;
+        public final static int STATUS_ICON = 56;
+        public final static int STATUS_LABEL = 57;
+        public final static int STATUS_TIMESTAMP = 58;
+
+        public final static int PHOTO_URI = 59;
+    }
+
+    private static class DirectoryQuery {
+        // Projection used for the query that loads all data for the entire contact.
+        final static String[] COLUMNS = new String[] {
+            Directory.DISPLAY_NAME,
+            Directory.PACKAGE_NAME,
+            Directory.TYPE_RESOURCE_ID,
+            Directory.ACCOUNT_TYPE,
+            Directory.ACCOUNT_NAME,
+            Directory.EXPORT_SUPPORT,
+        };
+
+        public final static int DISPLAY_NAME = 0;
+        public final static int PACKAGE_NAME = 1;
+        public final static int TYPE_RESOURCE_ID = 2;
+        public final static int ACCOUNT_TYPE = 3;
+        public final static int ACCOUNT_NAME = 4;
+        public final static int EXPORT_SUPPORT = 5;
+    }
+
+    private static class GroupQuery {
+        final static String[] COLUMNS = new String[] {
+            Groups.ACCOUNT_NAME,
+            Groups.ACCOUNT_TYPE,
+            Groups._ID,
+            Groups.TITLE,
+            Groups.AUTO_ADD,
+            Groups.FAVORITES,
+        };
+
+        public final static int ACCOUNT_NAME = 0;
+        public final static int ACCOUNT_TYPE = 1;
+        public final static int ID = 2;
+        public final static int TITLE = 3;
+        public final static int AUTO_ADD = 4;
+        public final static int FAVORITES = 5;
+    }
+
+    private final class LoadContactTask extends AsyncTask<Void, Void, Result> {
+
+        @Override
+        protected Result doInBackground(Void... args) {
+            try {
+                final ContentResolver resolver = getContext().getContentResolver();
+                final Uri uriCurrentFormat = ensureIsContactUri(resolver, mLookupUri);
+                Result result = loadContactEntity(resolver, uriCurrentFormat);
+                if (result != Result.NOT_FOUND) {
+                    if (result.isDirectoryEntry()) {
+                        loadDirectoryMetaData(result);
+                    } else if (mLoadGroupMetaData) {
+                        loadGroupMetaData(result);
+                    }
+                }
+                return result;
+            } catch (Exception e) {
+                Log.e(TAG, "Error loading the contact: " + mLookupUri, e);
+                return Result.ERROR;
+            }
+        }
+
+        /**
+         * Transforms the given Uri and returns a Lookup-Uri that represents the contact.
+         * For legacy contacts, a raw-contact lookup is performed.
+         * @param resolver
+         */
+        private Uri ensureIsContactUri(final ContentResolver resolver, final Uri uri) {
+            if (uri == null) throw new IllegalArgumentException("uri must not be null");
+
+            final String authority = uri.getAuthority();
+
+            // Current Style Uri?
+            if (ContactsContract.AUTHORITY.equals(authority)) {
+                final String type = resolver.getType(uri);
+                // Contact-Uri? Good, return it
+                if (Contacts.CONTENT_ITEM_TYPE.equals(type)) {
+                    return uri;
+                }
+
+                // RawContact-Uri? Transform it to ContactUri
+                if (RawContacts.CONTENT_ITEM_TYPE.equals(type)) {
+                    final long rawContactId = ContentUris.parseId(uri);
+                    return RawContacts.getContactLookupUri(getContext().getContentResolver(),
+                            ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
+                }
+
+                // Anything else? We don't know what this is
+                throw new IllegalArgumentException("uri format is unknown");
+            }
+
+            // Legacy Style? Convert to RawContact
+            final String OBSOLETE_AUTHORITY = "contacts";
+            if (OBSOLETE_AUTHORITY.equals(authority)) {
+                // Legacy Format. Convert to RawContact-Uri and then lookup the contact
+                final long rawContactId = ContentUris.parseId(uri);
+                return RawContacts.getContactLookupUri(resolver,
+                        ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
+            }
+
+            throw new IllegalArgumentException("uri authority is unknown");
+        }
+
+        private Result loadContactEntity(ContentResolver resolver, Uri contactUri) {
+            Uri entityUri = Uri.withAppendedPath(contactUri, Contacts.Entity.CONTENT_DIRECTORY);
+            Cursor cursor = resolver.query(entityUri, ContactQuery.COLUMNS, null, null,
+                    Contacts.Entity.RAW_CONTACT_ID);
+            if (cursor == null) {
+                Log.e(TAG, "No cursor returned in loadContactEntity");
+                return Result.NOT_FOUND;
+            }
+
+            try {
+                if (!cursor.moveToFirst()) {
+                    cursor.close();
+                    return Result.NOT_FOUND;
+                }
+
+                long currentRawContactId = -1;
+                Entity entity = null;
+                Result result = loadContactHeaderData(cursor, contactUri);
+                ArrayList<Entity> entities = result.getEntities();
+                HashMap<Long, DataStatus> statuses = result.getStatuses();
+                for (; !cursor.isAfterLast(); cursor.moveToNext()) {
+                    long rawContactId = cursor.getLong(ContactQuery.RAW_CONTACT_ID);
+                    if (rawContactId != currentRawContactId) {
+                        currentRawContactId = rawContactId;
+                        entity = new android.content.Entity(loadRawContact(cursor));
+                        entities.add(entity);
+                    }
+                    if (!cursor.isNull(ContactQuery.DATA_ID)) {
+                        ContentValues data = loadData(cursor);
+                        entity.addSubValue(ContactsContract.Data.CONTENT_URI, data);
+
+                        if (!cursor.isNull(ContactQuery.PRESENCE)
+                                || !cursor.isNull(ContactQuery.STATUS)) {
+                            final DataStatus status = new DataStatus(cursor);
+                            final long dataId = cursor.getLong(ContactQuery.DATA_ID);
+                            statuses.put(dataId, status);
+                        }
+                    }
+                }
+
+                return result;
+            } finally {
+                cursor.close();
+            }
+        }
+
+        /**
+         * Extracts Contact level columns from the cursor.
+         */
+        private Result loadContactHeaderData(final Cursor cursor, Uri contactUri) {
+            final String directoryParameter =
+                    contactUri.getQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY);
+            final long directoryId = directoryParameter == null
+                    ? Directory.DEFAULT
+                    : Long.parseLong(directoryParameter);
+            final long contactId = cursor.getLong(ContactQuery.CONTACT_ID);
+            final String lookupKey = cursor.getString(ContactQuery.LOOKUP_KEY);
+            final long nameRawContactId = cursor.getLong(ContactQuery.NAME_RAW_CONTACT_ID);
+            final int displayNameSource = cursor.getInt(ContactQuery.DISPLAY_NAME_SOURCE);
+            final String displayName = cursor.getString(ContactQuery.DISPLAY_NAME);
+            final String phoneticName = cursor.getString(ContactQuery.PHONETIC_NAME);
+            final long photoId = cursor.getLong(ContactQuery.PHOTO_ID);
+            final String photoUri = cursor.getString(ContactQuery.PHOTO_URI);
+            final boolean starred = cursor.getInt(ContactQuery.STARRED) != 0;
+            final Integer presence = cursor.isNull(ContactQuery.CONTACT_PRESENCE)
+                    ? null
+                    : cursor.getInt(ContactQuery.CONTACT_PRESENCE);
+            final String status = cursor.getString(ContactQuery.CONTACT_STATUS);
+            final Long statusTimestamp = cursor.isNull(ContactQuery.CONTACT_STATUS_TIMESTAMP)
+                    ? null
+                    : cursor.getLong(ContactQuery.CONTACT_STATUS_TIMESTAMP);
+            final Integer statusLabel = cursor.isNull(ContactQuery.CONTACT_STATUS_LABEL)
+                    ? null
+                    : cursor.getInt(ContactQuery.CONTACT_STATUS_LABEL);
+            final String statusResPackage = cursor.getString(
+                    ContactQuery.CONTACT_STATUS_RES_PACKAGE);
+
+            Uri lookupUri = ContentUris.withAppendedId(
+                    Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey), contactId);
+            return new Result(contactUri, lookupUri, directoryId, lookupKey, contactId,
+                    nameRawContactId, displayNameSource, photoId, photoUri, displayName,
+                    phoneticName, starred, presence, status, statusTimestamp, statusLabel,
+                    statusResPackage);
+        }
+
+        /**
+         * Extracts RawContact level columns from the cursor.
+         */
+        private ContentValues loadRawContact(Cursor cursor) {
+            ContentValues cv = new ContentValues();
+
+            cv.put(RawContacts._ID, cursor.getLong(ContactQuery.RAW_CONTACT_ID));
+
+            cursorColumnToContentValues(cursor, cv, ContactQuery.ACCOUNT_NAME);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.ACCOUNT_TYPE);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DIRTY);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.VERSION);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.SOURCE_ID);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC1);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC2);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC3);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.SYNC4);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DELETED);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.CONTACT_ID);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.STARRED);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.IS_RESTRICTED);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.NAME_VERIFIED);
+
+            return cv;
+        }
+
+        /**
+         * Extracts Data level columns from the cursor.
+         */
+        private ContentValues loadData(Cursor cursor) {
+            ContentValues cv = new ContentValues();
+
+            cv.put(Data._ID, cursor.getLong(ContactQuery.DATA_ID));
+
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA1);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA2);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA3);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA4);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA5);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA6);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA7);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA8);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA9);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA10);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA11);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA12);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA13);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA14);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA15);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_SYNC1);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_SYNC2);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_SYNC3);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_SYNC4);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.DATA_VERSION);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.IS_PRIMARY);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.IS_SUPERPRIMARY);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.MIMETYPE);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.RES_PACKAGE);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.GROUP_SOURCE_ID);
+            cursorColumnToContentValues(cursor, cv, ContactQuery.CHAT_CAPABILITY);
+
+            return cv;
+        }
+
+        private void cursorColumnToContentValues(
+                Cursor cursor, ContentValues values, int index) {
+            switch (cursor.getType(index)) {
+                case Cursor.FIELD_TYPE_NULL:
+                    // don't put anything in the content values
+                    break;
+                case Cursor.FIELD_TYPE_INTEGER:
+                    values.put(ContactQuery.COLUMNS[index], cursor.getLong(index));
+                    break;
+                case Cursor.FIELD_TYPE_STRING:
+                    values.put(ContactQuery.COLUMNS[index], cursor.getString(index));
+                    break;
+                case Cursor.FIELD_TYPE_BLOB:
+                    values.put(ContactQuery.COLUMNS[index], cursor.getBlob(index));
+                    break;
+                default:
+                    throw new IllegalStateException("Invalid or unhandled data type");
+            }
+        }
+
+        private void loadDirectoryMetaData(Result result) {
+            long directoryId = result.getDirectoryId();
+
+            Cursor cursor = getContext().getContentResolver().query(
+                    ContentUris.withAppendedId(Directory.CONTENT_URI, directoryId),
+                    DirectoryQuery.COLUMNS, null, null, null);
+            if (cursor == null) {
+                return;
+            }
+            try {
+                if (cursor.moveToFirst()) {
+                    final String displayName = cursor.getString(DirectoryQuery.DISPLAY_NAME);
+                    final String packageName = cursor.getString(DirectoryQuery.PACKAGE_NAME);
+                    final int typeResourceId = cursor.getInt(DirectoryQuery.TYPE_RESOURCE_ID);
+                    final String accountType = cursor.getString(DirectoryQuery.ACCOUNT_TYPE);
+                    final String accountName = cursor.getString(DirectoryQuery.ACCOUNT_NAME);
+                    final int exportSupport = cursor.getInt(DirectoryQuery.EXPORT_SUPPORT);
+                    String directoryType = null;
+                    if (!TextUtils.isEmpty(packageName)) {
+                        PackageManager pm = getContext().getPackageManager();
+                        try {
+                            Resources resources = pm.getResourcesForApplication(packageName);
+                            directoryType = resources.getString(typeResourceId);
+                        } catch (NameNotFoundException e) {
+                            Log.w(TAG, "Contact directory resource not found: "
+                                    + packageName + "." + typeResourceId);
+                        }
+                    }
+
+                    result.setDirectoryMetaData(
+                            displayName, directoryType, accountType, accountName, exportSupport);
+                }
+            } finally {
+                cursor.close();
+            }
+        }
+
+        /**
+         * Loads groups meta-data for all groups associated with all constituent raw contacts'
+         * accounts.
+         */
+        private void loadGroupMetaData(Result result) {
+            StringBuilder selection = new StringBuilder();
+            ArrayList<String> selectionArgs = new ArrayList<String>();
+            for (Entity entity : result.mEntities) {
+                ContentValues values = entity.getEntityValues();
+                String accountName = values.getAsString(RawContacts.ACCOUNT_NAME);
+                String accountType = values.getAsString(RawContacts.ACCOUNT_TYPE);
+                if (accountName != null && accountType != null) {
+                    if (selection.length() != 0) {
+                        selection.append(" OR ");
+                    }
+                    selection.append(
+                            "(" + Groups.ACCOUNT_NAME + "=? AND " + Groups.ACCOUNT_TYPE + "=?)");
+                    selectionArgs.add(accountName);
+                    selectionArgs.add(accountType);
+                }
+            }
+            Cursor cursor = getContext().getContentResolver().query(Groups.CONTENT_URI,
+                    GroupQuery.COLUMNS, selection.toString(), selectionArgs.toArray(new String[0]),
+                    null);
+            try {
+                while (cursor.moveToNext()) {
+                    final String accountName = cursor.getString(GroupQuery.ACCOUNT_NAME);
+                    final String accountType = cursor.getString(GroupQuery.ACCOUNT_TYPE);
+                    final long groupId = cursor.getLong(GroupQuery.ID);
+                    final String title = cursor.getString(GroupQuery.TITLE);
+                    final boolean defaultGroup = cursor.isNull(GroupQuery.AUTO_ADD)
+                            ? false
+                            : cursor.getInt(GroupQuery.AUTO_ADD) != 0;
+                    final boolean favorites = cursor.isNull(GroupQuery.FAVORITES)
+                            ? false
+                            : cursor.getInt(GroupQuery.FAVORITES) != 0;
+
+                    result.addGroupMetaData(new GroupMetaData(
+                            accountName, accountType, groupId, title, defaultGroup, favorites));
+                }
+            } finally {
+                cursor.close();
+            }
+        }
+
+        @Override
+        protected void onPostExecute(Result result) {
+            // The creator isn't interested in any further updates
+            if (mDestroyed) {
+                return;
+            }
+
+            mContact = result;
+            if (result != null) {
+                mLookupUri = result.getLookupUri();
+                unregisterObserver();
+                if (mObserver == null) {
+                    mObserver = new ForceLoadContentObserver();
+                }
+                Log.i(TAG, "Registering content observer for " + mLookupUri);
+
+                if (result != Result.ERROR && result != Result.NOT_FOUND) {
+                    getContext().getContentResolver().registerContentObserver(mLookupUri, true,
+                            mObserver);
+                }
+                deliverResult(result);
+            }
+        }
+    }
+
+    private void unregisterObserver() {
+        if (mObserver != null) {
+            getContext().getContentResolver().unregisterContentObserver(mObserver);
+            mObserver = null;
+        }
+    }
+
+    public ContactLoader(Context context, Uri lookupUri) {
+        this(context, lookupUri, false);
+    }
+
+    public ContactLoader(Context context, Uri lookupUri, boolean loadGroupMetaData) {
+        super(context);
+        mLookupUri = lookupUri;
+        mLoadGroupMetaData = loadGroupMetaData;
+    }
+
+    @Override
+    public void startLoading() {
+        if (mContact != null) {
+            deliverResult(mContact);
+        } else {
+            forceLoad();
+        }
+    }
+
+    @Override
+    public void forceLoad() {
+        final LoadContactTask task = new LoadContactTask();
+        task.execute((Void[])null);
+    }
+
+    @Override
+    public void stopLoading() {
+        unregisterObserver();
+        mContact = null;
+    }
+
+    @Override
+    public void destroy() {
+        unregisterObserver();
+        mContact = null;
+        mDestroyed = true;
+    }
+}
diff --git a/src/com/android/contacts/views/ContactSaveService.java b/src/com/android/contacts/views/ContactSaveService.java
new file mode 100644
index 0000000..91d2413
--- /dev/null
+++ b/src/com/android/contacts/views/ContactSaveService.java
@@ -0,0 +1,172 @@
+/*
+ * 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.views;
+
+import com.android.contacts.activities.ContactBrowserActivity;
+import com.google.android.collect.Sets;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.IntentService;
+import android.content.ContentProviderOperation;
+import android.content.ContentProviderResult;
+import android.content.ContentResolver;
+import android.content.ContentValues;
+import android.content.Intent;
+import android.content.OperationApplicationException;
+import android.net.Uri;
+import android.os.Parcelable;
+import android.os.RemoteException;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+public class ContactSaveService extends IntentService {
+    private static final String TAG = "ContactSaveService";
+
+    public static final String ACTION_NEW_RAW_CONTACT = "newRawContact";
+
+    public static final String EXTRA_ACCOUNT_NAME = "accountName";
+    public static final String EXTRA_ACCOUNT_TYPE = "accountType";
+    public static final String EXTRA_CONTENT_VALUES = "contentValues";
+    public static final String EXTRA_CALLBACK_INTENT = "callbackIntent";
+
+    public static final String EXTRA_OPERATIONS = "Operations";
+
+    private static final HashSet<String> ALLOWED_DATA_COLUMNS = Sets.newHashSet(
+        Data.MIMETYPE,
+        Data.IS_PRIMARY,
+        Data.DATA1,
+        Data.DATA2,
+        Data.DATA3,
+        Data.DATA4,
+        Data.DATA5,
+        Data.DATA6,
+        Data.DATA7,
+        Data.DATA8,
+        Data.DATA9,
+        Data.DATA10,
+        Data.DATA11,
+        Data.DATA12,
+        Data.DATA13,
+        Data.DATA14,
+        Data.DATA15
+    );
+
+    public ContactSaveService() {
+        super(TAG);
+        setIntentRedelivery(true);
+    }
+
+    @Override
+    protected void onHandleIntent(Intent intent) {
+        String action = intent.getAction();
+        if (ACTION_NEW_RAW_CONTACT.equals(action)) {
+            createRawContact(intent);
+        } else {
+            performContentProviderOperations(intent);
+        }
+    }
+
+    private void createRawContact(Intent intent) {
+        String accountName = intent.getStringExtra(EXTRA_ACCOUNT_NAME);
+        String accountType = intent.getStringExtra(EXTRA_ACCOUNT_TYPE);
+        List<ContentValues> valueList = intent.getParcelableArrayListExtra(EXTRA_CONTENT_VALUES);
+        Intent callbackIntent = intent.getParcelableExtra(EXTRA_CALLBACK_INTENT);
+
+        ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
+        operations.add(ContentProviderOperation.newInsert(RawContacts.CONTENT_URI)
+                .withValue(RawContacts.ACCOUNT_NAME, accountName)
+                .withValue(RawContacts.ACCOUNT_TYPE, accountType)
+                .build());
+
+        int size = valueList.size();
+        for (int i = 0; i < size; i++) {
+            ContentValues values = valueList.get(i);
+            values.keySet().retainAll(ALLOWED_DATA_COLUMNS);
+            operations.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
+                    .withValueBackReference(Data.RAW_CONTACT_ID, 0)
+                    .withValues(values)
+                    .build());
+        }
+
+        ContentResolver resolver = getContentResolver();
+        ContentProviderResult[] results;
+        try {
+            results = resolver.applyBatch(ContactsContract.AUTHORITY, operations);
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to store new contact", e);
+        }
+
+        Uri result = ContactsContract.Directory.CONTENT_URI;
+        Uri rawContactUri = results[0].uri;
+        callbackIntent.setData(RawContacts.getContactLookupUri(resolver, rawContactUri));
+
+        startActivity(callbackIntent);
+    }
+
+    private void performContentProviderOperations(Intent intent) {
+        final Parcelable[] operationsArray = intent.getParcelableArrayExtra(EXTRA_OPERATIONS);
+
+        // We have to cast each item individually here
+        final ArrayList<ContentProviderOperation> operations =
+                new ArrayList<ContentProviderOperation>(operationsArray.length);
+        for (Parcelable p : operationsArray) {
+            operations.add((ContentProviderOperation) p);
+        }
+
+        try {
+            getContentResolver().applyBatch(ContactsContract.AUTHORITY, operations);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error saving", e);
+        } catch (OperationApplicationException e) {
+            Log.e(TAG, "Error saving", e);
+        }
+    }
+
+    /**
+     * Creates an intent that can be sent to this service to create a new raw contact
+     * using data presented as a set of ContentValues.
+     */
+    public static Intent createNewRawContactIntent(
+            Activity activity, ArrayList<ContentValues> values, Account account) {
+        Intent serviceIntent = new Intent(
+                activity, ContactSaveService.class);
+        serviceIntent.setAction(ContactSaveService.ACTION_NEW_RAW_CONTACT);
+        if (account != null) {
+            serviceIntent.putExtra(ContactSaveService.EXTRA_ACCOUNT_NAME, account.name);
+            serviceIntent.putExtra(ContactSaveService.EXTRA_ACCOUNT_TYPE, account.type);
+        }
+        serviceIntent.putParcelableArrayListExtra(
+                ContactSaveService.EXTRA_CONTENT_VALUES, values);
+
+        // Callback intent will be invoked by the service once the new contact is
+        // created.  The service will put the URI of the new contact as "data" on
+        // the callback intent.
+        Intent callbackIntent = new Intent(activity, activity.getClass());
+        callbackIntent.setAction(Intent.ACTION_VIEW);
+        callbackIntent.setFlags(
+                Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        serviceIntent.putExtra(ContactSaveService.EXTRA_CALLBACK_INTENT, callbackIntent);
+        return serviceIntent;
+    }
+}
diff --git a/src/com/android/contacts/views/GroupMetaData.java b/src/com/android/contacts/views/GroupMetaData.java
new file mode 100644
index 0000000..dd52eb0
--- /dev/null
+++ b/src/com/android/contacts/views/GroupMetaData.java
@@ -0,0 +1,61 @@
+/*
+ * 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.views;
+
+/**
+ * Meta-data for a contact group.  We load all groups associated with the contact's
+ * constituent accounts.
+ */
+public final class GroupMetaData {
+    private String mAccountName;
+    private String mAccountType;
+    private long mGroupId;
+    private String mTitle;
+    private boolean mDefaultGroup;
+    private boolean mFavorites;
+
+    public GroupMetaData(String accountName, String accountType, long groupId, String title,
+            boolean defaultGroup, boolean favorites) {
+        this.mGroupId = groupId;
+        this.mTitle = title;
+        this.mDefaultGroup = defaultGroup;
+        this.mFavorites = favorites;
+    }
+
+    public String getAccountName() {
+        return mAccountName;
+    }
+
+    public String getAccountType() {
+        return mAccountType;
+    }
+
+    public long getGroupId() {
+        return mGroupId;
+    }
+
+    public String getTitle() {
+        return mTitle;
+    }
+
+    public boolean isDefaultGroup() {
+        return mDefaultGroup;
+    }
+
+    public boolean isFavorites() {
+        return mFavorites;
+    }
+}
diff --git a/src/com/android/contacts/views/GroupMetaDataLoader.java b/src/com/android/contacts/views/GroupMetaDataLoader.java
new file mode 100644
index 0000000..adfe0bf
--- /dev/null
+++ b/src/com/android/contacts/views/GroupMetaDataLoader.java
@@ -0,0 +1,46 @@
+/*
+ * 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.views;
+
+import android.content.Context;
+import android.content.CursorLoader;
+import android.provider.ContactsContract.Groups;
+
+/**
+ * Group meta-data loader.  Loads all groups from the database.
+ */
+public final class GroupMetaDataLoader extends CursorLoader {
+
+    private final static String[] COLUMNS = new String[] {
+        Groups.ACCOUNT_NAME,
+        Groups.ACCOUNT_TYPE,
+        Groups._ID,
+        Groups.TITLE,
+        Groups.AUTO_ADD,
+        Groups.FAVORITES,
+    };
+
+    public final static int ACCOUNT_NAME = 0;
+    public final static int ACCOUNT_TYPE = 1;
+    public final static int GROUP_ID = 2;
+    public final static int TITLE = 3;
+    public final static int AUTO_ADD = 4;
+    public final static int FAVORITES = 5;
+
+    public GroupMetaDataLoader(Context context) {
+        super(context, Groups.CONTENT_URI, COLUMNS, null, null, null);
+    }
+}
diff --git a/src/com/android/contacts/views/detail/ContactDetailFragment.java b/src/com/android/contacts/views/detail/ContactDetailFragment.java
new file mode 100644
index 0000000..264a8d5
--- /dev/null
+++ b/src/com/android/contacts/views/detail/ContactDetailFragment.java
@@ -0,0 +1,1218 @@
+/*
+ * 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.views.detail;
+
+import com.android.contacts.Collapser;
+import com.android.contacts.Collapser.Collapsible;
+import com.android.contacts.ContactOptionsActivity;
+import com.android.contacts.ContactPresenceIconUtil;
+import com.android.contacts.ContactsUtils;
+import com.android.contacts.ContactsUtils.ImActions;
+import com.android.contacts.R;
+import com.android.contacts.TypePrecedence;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.BaseAccountType.EditType;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.util.Constants;
+import com.android.contacts.util.DataStatus;
+import com.android.contacts.util.DateUtils;
+import com.android.contacts.util.PhoneCapabilityTester;
+import com.android.contacts.views.ContactLoader;
+import com.android.contacts.views.GroupMetaData;
+import com.android.contacts.views.editor.SelectAccountDialogFragment;
+import com.android.internal.telephony.ITelephony;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.LoaderManager;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.content.ActivityNotFoundException;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Entity;
+import android.content.Entity.NamedContentValues;
+import android.content.Intent;
+import android.content.Loader;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.net.ParseException;
+import android.net.Uri;
+import android.net.WebAddress;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.provider.ContactsContract.CommonDataKinds;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Event;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.CommonDataKinds.Im;
+import android.provider.ContactsContract.CommonDataKinds.Nickname;
+import android.provider.ContactsContract.CommonDataKinds.Note;
+import android.provider.ContactsContract.CommonDataKinds.Organization;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.SipAddress;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.CommonDataKinds.Website;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.Directory;
+import android.provider.ContactsContract.DisplayNameSources;
+import android.provider.ContactsContract.PhoneLookup;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.ContactsContract.StatusUpdates;
+import android.telephony.PhoneNumberUtils;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.ContextMenu;
+import android.view.ContextMenu.ContextMenuInfo;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.View.OnCreateContextMenuListener;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.BaseAdapter;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+
+public class ContactDetailFragment extends Fragment implements OnCreateContextMenuListener,
+        OnItemClickListener, SelectAccountDialogFragment.Listener {
+    private static final String TAG = "ContactDetailFragment";
+
+    private static final int LOADER_DETAILS = 1;
+
+    private Context mContext;
+    private Uri mLookupUri;
+    private Listener mListener;
+
+    private ContactLoader.Result mContactData;
+    private ContactDetailHeaderView mHeaderView;
+    private ListView mListView;
+    private ViewAdapter mAdapter;
+    private Uri mPrimaryPhoneUri = null;
+
+    private Button mCopyGalToLocalButton;
+    private boolean mAllRestricted;
+    private final ArrayList<Long> mWritableRawContactIds = new ArrayList<Long>();
+    private int mNumPhoneNumbers = 0;
+    private String mDefaultCountryIso;
+
+    /**
+     * Device capability: Set during buildEntries and used in the long-press context menu
+     */
+    private boolean mHasPhone;
+
+    /**
+     * Device capability: Set during buildEntries and used in the long-press context menu
+     */
+    private boolean mHasSms;
+
+    /**
+     * The view shown if the detail list is empty.
+     * We set this to the list view when first bind the adapter, so that it won't be shown while
+     * we're loading data.
+     */
+    private View mEmptyView;
+
+    /**
+     * A list of distinct contact IDs included in the current contact.
+     */
+    private ArrayList<Long> mRawContactIds = new ArrayList<Long>();
+    private ArrayList<ViewEntry> mPhoneEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mSmsEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mEmailEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mPostalEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mImEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mNicknameEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mGroupEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ViewEntry> mOtherEntries = new ArrayList<ViewEntry>();
+    private ArrayList<ArrayList<ViewEntry>> mSections = new ArrayList<ArrayList<ViewEntry>>();
+    private LayoutInflater mInflater;
+
+    public ContactDetailFragment() {
+        // Explicit constructor for inflation
+
+        // Build the list of sections. The order they're added to mSections dictates the
+        // order they are displayed in the list.
+        mSections.add(mPhoneEntries);
+        mSections.add(mSmsEntries);
+        mSections.add(mEmailEntries);
+        mSections.add(mImEntries);
+        mSections.add(mPostalEntries);
+        mSections.add(mNicknameEntries);
+        mSections.add(mOtherEntries);
+        mSections.add(mGroupEntries);
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        mContext = activity;
+        mDefaultCountryIso = ContactsUtils.getCurrentCountryIso(mContext);
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
+        final View view = inflater.inflate(R.layout.contact_detail_fragment, container, false);
+
+        setHasOptionsMenu(true);
+
+        mInflater = inflater;
+
+        mHeaderView = (ContactDetailHeaderView) view.findViewById(R.id.contact_header_widget);
+        mHeaderView.setListener(mHeaderViewListener);
+
+        mListView = (ListView) view.findViewById(android.R.id.list);
+        mListView.setOnCreateContextMenuListener(this);
+        mListView.setScrollBarStyle(ListView.SCROLLBARS_OUTSIDE_OVERLAY);
+        mListView.setOnItemClickListener(this);
+        // Don't set it to mListView yet.  We do so later when we bind the adapter.
+        mEmptyView = view.findViewById(android.R.id.empty);
+
+        mCopyGalToLocalButton = (Button) view.findViewById(R.id.copyLocal);
+        mCopyGalToLocalButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                makePersonalCopy();
+            }
+        });
+
+        return view;
+    }
+
+    public void setListener(Listener value) {
+        mListener = value;
+    }
+
+    public Uri getUri() {
+        return mLookupUri;
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+
+        getLoaderManager().initLoader(LOADER_DETAILS, null, mDetailLoaderListener);
+    }
+
+    public void loadUri(Uri lookupUri) {
+        mLookupUri = lookupUri;
+        if (getActivity() != null) {
+            getLoaderManager().restartLoader(LOADER_DETAILS, null, mDetailLoaderListener);
+        }
+    }
+
+    private void bindData() {
+        // Set the header
+        mHeaderView.loadData(mContactData);
+
+        // Build up the contact entries
+        buildEntries();
+
+        // Collapse similar data items in select sections.
+        Collapser.collapseList(mPhoneEntries);
+        Collapser.collapseList(mSmsEntries);
+        Collapser.collapseList(mEmailEntries);
+        Collapser.collapseList(mPostalEntries);
+        Collapser.collapseList(mImEntries);
+
+        if (mAdapter == null) {
+            mAdapter = new ViewAdapter();
+            mListView.setAdapter(mAdapter);
+        } else {
+            mAdapter.notifyDataSetChanged();
+        }
+        mListView.setEmptyView(mEmptyView);
+
+        // Configure copy gal button
+        if (mContactData.isDirectoryEntry()) {
+            final int exportSupport = mContactData.getDirectoryExportSupport();
+            if (exportSupport == Directory.EXPORT_SUPPORT_ANY_ACCOUNT
+                    || exportSupport == Directory.EXPORT_SUPPORT_SAME_ACCOUNT_ONLY) {
+                mCopyGalToLocalButton.setVisibility(View.VISIBLE);
+            } else {
+                mCopyGalToLocalButton.setVisibility(View.GONE);
+            }
+        } else {
+            mCopyGalToLocalButton.setVisibility(View.GONE);
+        }
+
+        getActivity().invalidateOptionsMenu();
+    }
+
+    /**
+     * Build up the entries to display on the screen.
+     */
+    private final void buildEntries() {
+        mHasPhone = PhoneCapabilityTester.isPhone(mContext);
+        mHasSms = PhoneCapabilityTester.isSmsIntentRegistered(mContext);
+
+        // Clear out the old entries
+        final int numSections = mSections.size();
+        for (int i = 0; i < numSections; i++) {
+            mSections.get(i).clear();
+        }
+
+        mRawContactIds.clear();
+
+        mAllRestricted = true;
+        mPrimaryPhoneUri = null;
+        mNumPhoneNumbers = 0;
+
+        mWritableRawContactIds.clear();
+
+        final AccountTypes sources = AccountTypes.getInstance(mContext);
+
+        // Build up method entries
+        if (mContactData == null) {
+            return;
+        }
+
+        ArrayList<String> groups = new ArrayList<String>();
+        for (Entity entity: mContactData.getEntities()) {
+            final ContentValues entValues = entity.getEntityValues();
+            final String accountType = entValues.getAsString(RawContacts.ACCOUNT_TYPE);
+            final long rawContactId = entValues.getAsLong(RawContacts._ID);
+
+            // Mark when this contact has any unrestricted components
+            Integer restricted = entValues.getAsInteger(RawContacts.IS_RESTRICTED);
+            final boolean isRestricted = restricted != null && restricted != 0;
+            if (!isRestricted) mAllRestricted = false;
+
+            if (!mRawContactIds.contains(rawContactId)) {
+                mRawContactIds.add(rawContactId);
+            }
+            BaseAccountType contactsSource = sources.getInflatedSource(accountType,
+                    BaseAccountType.LEVEL_SUMMARY);
+            if (contactsSource == null || !contactsSource.readOnly) {
+                mWritableRawContactIds.add(rawContactId);
+            }
+
+            for (NamedContentValues subValue : entity.getSubValues()) {
+                final ContentValues entryValues = subValue.values;
+                entryValues.put(Data.RAW_CONTACT_ID, rawContactId);
+
+                final long dataId = entryValues.getAsLong(Data._ID);
+                final String mimeType = entryValues.getAsString(Data.MIMETYPE);
+                if (mimeType == null) continue;
+
+                if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                    Long groupId = entryValues.getAsLong(GroupMembership.GROUP_ROW_ID);
+                    if (groupId != null) {
+                        handleGroupMembership(groups, mContactData.getGroupMetaData(), groupId);
+                    }
+                    continue;
+                }
+
+                final DataKind kind = sources.getKindOrFallback(accountType, mimeType, mContext,
+                        BaseAccountType.LEVEL_CONSTRAINTS);
+                if (kind == null) continue;
+
+                final ViewEntry entry = ViewEntry.fromValues(mContext, mimeType, kind, dataId,
+                        entryValues);
+
+                final boolean hasData = !TextUtils.isEmpty(entry.data);
+                Integer superPrimary = entryValues.getAsInteger(Data.IS_SUPER_PRIMARY);
+                final boolean isSuperPrimary = superPrimary != null && superPrimary != 0;
+
+                if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                    // Always ignore the name. It is shown in the header if set
+                } else if (Phone.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build phone entries
+                    mNumPhoneNumbers++;
+                    String phoneNumberE164 =
+                            entryValues.getAsString(PhoneLookup.NORMALIZED_NUMBER);
+                    entry.data = PhoneNumberUtils.formatNumber(
+                            entry.data, phoneNumberE164, mDefaultCountryIso);
+                    final Intent phoneIntent = mHasPhone ? new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                            Uri.fromParts(Constants.SCHEME_TEL, entry.data, null)) : null;
+                    final Intent smsIntent = mHasSms ? new Intent(Intent.ACTION_SENDTO,
+                            Uri.fromParts(Constants.SCHEME_SMSTO, entry.data, null)) : null;
+
+                    // Configure Icons and Intents. Notice actionIcon is already set to the phone
+                    if (mHasPhone && mHasSms) {
+                        entry.intent = phoneIntent;
+                        entry.secondaryIntent = smsIntent;
+                        entry.secondaryActionIcon = kind.iconAltRes;
+                    } else if (mHasPhone) {
+                        entry.intent = phoneIntent;
+                    } else if (mHasSms) {
+                        entry.intent = smsIntent;
+                        entry.actionIcon = kind.iconAltRes;
+                    } else {
+                        entry.intent = null;
+                        entry.actionIcon = -1;
+                    }
+
+
+                    // Remember super-primary phone
+                    if (isSuperPrimary) mPrimaryPhoneUri = entry.uri;
+
+                    entry.isPrimary = isSuperPrimary;
+                    mPhoneEntries.add(entry);
+                } else if (Email.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build email entries
+                    entry.intent = new Intent(Intent.ACTION_SENDTO,
+                            Uri.fromParts(Constants.SCHEME_MAILTO, entry.data, null));
+                    entry.isPrimary = isSuperPrimary;
+                    mEmailEntries.add(entry);
+
+                    // When Email rows have status, create additional Im row
+                    final DataStatus status = mContactData.getStatuses().get(entry.id);
+                    if (status != null) {
+                        final String imMime = Im.CONTENT_ITEM_TYPE;
+                        final DataKind imKind = sources.getKindOrFallback(accountType,
+                                imMime, mContext, BaseAccountType.LEVEL_MIMETYPES);
+                        final ViewEntry imEntry = ViewEntry.fromValues(mContext,
+                                imMime, imKind, dataId, entryValues);
+                        final ImActions imActions = ContactsUtils.buildImActions(entryValues);
+                        if (imActions != null) {
+                            imEntry.actionIcon = imActions.getPrimaryActionIcon();
+                            imEntry.secondaryActionIcon = imActions.getSecondaryActionIcon();
+                            imEntry.intent = imActions.getPrimaryIntent();
+                            imEntry.secondaryIntent = imActions.getSecondaryIntent();
+                        }
+                        imEntry.applyStatus(status, false);
+                        mImEntries.add(imEntry);
+                    }
+                } else if (StructuredPostal.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build postal entries
+                    entry.maxLines = 4;
+                    entry.intent = new Intent(Intent.ACTION_VIEW, entry.uri);
+                    mPostalEntries.add(entry);
+                } else if (Im.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build IM entries
+                    final ImActions imActions = ContactsUtils.buildImActions(entryValues);
+                    if (imActions != null) {
+                        entry.actionIcon = imActions.getPrimaryActionIcon();
+                        entry.secondaryActionIcon = imActions.getSecondaryActionIcon();
+                        entry.intent = imActions.getPrimaryIntent();
+                        entry.secondaryIntent = imActions.getSecondaryIntent();
+                    }
+                    if (TextUtils.isEmpty(entry.kindAndType)) {
+                        entry.kindAndType = mContext.getString(R.string.chat).toLowerCase();
+                    }
+
+                    // Apply presence and status details when available
+                    final DataStatus status = mContactData.getStatuses().get(entry.id);
+                    if (status != null) {
+                        entry.applyStatus(status, false);
+                    }
+                    mImEntries.add(entry);
+                } else if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                    // Organizations are not shown. The first one is shown in the header
+                    // and subsequent ones are not supported anymore
+                } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build nickname entries
+                    final boolean isNameRawContact =
+                        (mContactData.getNameRawContactId() == rawContactId);
+
+                    final boolean duplicatesTitle =
+                        isNameRawContact
+                        && mContactData.getDisplayNameSource() == DisplayNameSources.NICKNAME;
+
+                    if (!duplicatesTitle) {
+                        entry.uri = null;
+                        mNicknameEntries.add(entry);
+                    }
+                } else if (Note.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build note entries
+                    entry.uri = null;
+                    entry.maxLines = 100;
+                    mOtherEntries.add(entry);
+                } else if (Website.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build Website entries
+                    entry.uri = null;
+                    entry.maxLines = 10;
+                    try {
+                        WebAddress webAddress = new WebAddress(entry.data);
+                        entry.intent = new Intent(Intent.ACTION_VIEW,
+                                Uri.parse(webAddress.toString()));
+                    } catch (ParseException e) {
+                        Log.e(TAG, "Couldn't parse website: " + entry.data);
+                    }
+                    mOtherEntries.add(entry);
+                } else if (SipAddress.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    // Build SipAddress entries
+                    entry.uri = null;
+                    entry.maxLines = 1;
+                    entry.intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                            Uri.fromParts(Constants.SCHEME_SIP, entry.data, null));
+                    mOtherEntries.add(entry);
+                    // TODO: Consider moving the SipAddress into its own
+                    // section (rather than lumping it in with mOtherEntries)
+                    // so that we can reposition it right under the phone number.
+                    // (Then, we'd also update FallbackAccountType.java to set
+                    // secondary=false for this field, and tweak the weight
+                    // of its DataKind.)
+                } else if (Event.CONTENT_ITEM_TYPE.equals(mimeType) && hasData) {
+                    entry.data = DateUtils.formatDate(mContext, entry.data);
+                    entry.uri = null;
+                    mOtherEntries.add(entry);
+                } else {
+                    // Handle showing custom rows
+                    entry.intent = new Intent(Intent.ACTION_VIEW, entry.uri);
+
+                    // Use social summary when requested by external source
+                    final DataStatus status = mContactData.getStatuses().get(entry.id);
+                    final boolean hasSocial = kind.actionBodySocial && status != null;
+                    if (hasSocial) {
+                        entry.applyStatus(status, true);
+                    }
+
+                    if (hasSocial || hasData) {
+                        mOtherEntries.add(entry);
+                    }
+                }
+            }
+        }
+
+        if (!groups.isEmpty()) {
+            ViewEntry entry = new ViewEntry();
+            Collections.sort(groups);
+            StringBuilder sb = new StringBuilder();
+            int size = groups.size();
+            for (int i = 0; i < size; i++) {
+                if (i != 0) {
+                    sb.append(", ");
+                }
+                sb.append(groups.get(i));
+            }
+            entry.mimetype = GroupMembership.MIMETYPE;
+            entry.kind = mContext.getString(R.string.groupsLabel);
+            entry.data = sb.toString();
+            mGroupEntries.add(entry);
+        }
+    }
+
+    /**
+     * Maps group ID to the corresponding group name, collapses all synonymous groups.
+     * Ignores default groups (e.g. My Contacts) and favorites groups.
+     */
+    private void handleGroupMembership(
+            ArrayList<String> groups, List<GroupMetaData> groupMetaData, long groupId) {
+        if (groupMetaData == null) {
+            return;
+        }
+
+        for (GroupMetaData group : groupMetaData) {
+            if (group.getGroupId() == groupId) {
+                if (!group.isDefaultGroup() && !group.isFavorites()) {
+                    String title = group.getTitle();
+                    if (!groups.contains(title)) {
+                        groups.add(title);
+                    }
+                }
+                break;
+            }
+        }
+    }
+
+    private static String buildActionString(DataKind kind, ContentValues values, Context context) {
+        if (kind.actionHeader == null) {
+            return null;
+        }
+        CharSequence actionHeader = kind.actionHeader.inflateUsing(context, values);
+        if (actionHeader == null) {
+            return null;
+        }
+        return actionHeader.toString();
+    }
+
+    private static String buildDataString(DataKind kind, ContentValues values,
+            Context context) {
+        if (kind.actionBody == null) {
+            return null;
+        }
+        CharSequence actionBody = kind.actionBody.inflateUsing(context, values);
+        return actionBody == null ? null : actionBody.toString();
+    }
+
+    /**
+     * A basic structure with the data for a contact entry in the list.
+     */
+    private static class ViewEntry implements Collapsible<ViewEntry> {
+        public int type = -1;
+        public String kindAndType;
+        public String kind;
+        public String typeString;
+        public String data;
+        public Uri uri;
+        public long id = 0;
+        public int maxLines = 1;
+        public String mimetype;
+
+        public Context context = null;
+        public String resPackageName = null;
+        public int actionIcon = -1;
+        public boolean isPrimary = false;
+        public int secondaryActionIcon = -1;
+        public Intent intent;
+        public Intent secondaryIntent = null;
+        public ArrayList<Long> ids = new ArrayList<Long>();
+        public int collapseCount = 0;
+
+        public int presence = -1;
+
+        public CharSequence footerLine = null;
+
+        private ViewEntry() {
+        }
+
+        /**
+         * Build new {@link ViewEntry} and populate from the given values.
+         */
+        public static ViewEntry fromValues(Context context, String mimeType, DataKind kind,
+                long dataId, ContentValues values) {
+            final ViewEntry entry = new ViewEntry();
+            entry.context = context;
+            entry.id = dataId;
+            entry.uri = ContentUris.withAppendedId(Data.CONTENT_URI, entry.id);
+            entry.mimetype = mimeType;
+            entry.kindAndType = buildActionString(kind, values, context);
+            entry.kind = (kind.titleRes == -1 || kind.titleRes == 0) ? ""
+                    : context.getString(kind.titleRes).toUpperCase();
+            entry.data = buildDataString(kind, values, context);
+
+            if (kind.typeColumn != null && values.containsKey(kind.typeColumn)) {
+                entry.type = values.getAsInteger(kind.typeColumn);
+
+                // get type string
+                entry.typeString = "";
+                for (EditType type : kind.typeList) {
+                    if (type.rawValue == entry.type) {
+                        if (type.customColumn == null) {
+                            // Non-custom type. Get its description from the resource
+                            entry.typeString = context.getString(type.labelRes);
+                        } else {
+                            // Custom type. Read it from the database
+                            entry.typeString = values.getAsString(type.customColumn);
+                        }
+                        break;
+                    }
+                }
+            } else {
+                entry.typeString = "";
+            }
+
+            if (kind.iconRes > 0) {
+                entry.resPackageName = kind.resPackageName;
+                entry.actionIcon = kind.iconRes;
+            }
+
+            return entry;
+        }
+
+        /**
+         * Apply given {@link DataStatus} values over this {@link ViewEntry}
+         *
+         * @param fillData When true, the given status replaces {@link #data}
+         *            and {@link #footerLine}. Otherwise only {@link #presence}
+         *            is updated.
+         */
+        public ViewEntry applyStatus(DataStatus status, boolean fillData) {
+            presence = status.getPresence();
+            if (fillData && status.isValid()) {
+                this.data = status.getStatus().toString();
+                this.footerLine = status.getTimestampLabel(context);
+            }
+
+            return this;
+        }
+
+        @Override
+        public boolean collapseWith(ViewEntry entry) {
+            // assert equal collapse keys
+            if (!shouldCollapseWith(entry)) {
+                return false;
+            }
+
+            // Choose the label associated with the highest type precedence.
+            if (TypePrecedence.getTypePrecedence(mimetype, type)
+                    > TypePrecedence.getTypePrecedence(entry.mimetype, entry.type)) {
+                type = entry.type;
+                kindAndType = entry.kindAndType;
+                kind = entry.kind;
+                typeString = entry.typeString;
+            }
+
+            // Choose the max of the maxLines and maxLabelLines values.
+            maxLines = Math.max(maxLines, entry.maxLines);
+
+            // Choose the presence with the highest precedence.
+            if (StatusUpdates.getPresencePrecedence(presence)
+                    < StatusUpdates.getPresencePrecedence(entry.presence)) {
+                presence = entry.presence;
+            }
+
+            // If any of the collapsed entries are primary make the whole thing primary.
+            isPrimary = entry.isPrimary ? true : isPrimary;
+
+            // uri, and contactdId, shouldn't make a difference. Just keep the original.
+
+            // Keep track of all the ids that have been collapsed with this one.
+            ids.add(entry.id);
+            collapseCount++;
+            return true;
+        }
+
+        @Override
+        public boolean shouldCollapseWith(ViewEntry entry) {
+            if (entry == null) {
+                return false;
+            }
+
+            if (!ContactsUtils.shouldCollapse(context, mimetype, data, entry.mimetype,
+                    entry.data)) {
+                return false;
+            }
+
+            if (!TextUtils.equals(mimetype, entry.mimetype)
+                    || !ContactsUtils.areIntentActionEqual(intent, entry.intent)
+                    || !ContactsUtils.areIntentActionEqual(secondaryIntent, entry.secondaryIntent)
+                    || actionIcon != entry.actionIcon) {
+                return false;
+            }
+
+            return true;
+        }
+    }
+
+    /** Cache of the children views of a row */
+    private static class ViewCache {
+        public TextView kindAndType;
+        public TextView kind;
+        public TextView type;
+        public TextView data;
+        public TextView footer;
+        public ImageView actionIcon;
+        public ImageView presenceIcon;
+        public ImageView primaryIcon;
+        public ImageView secondaryActionButton;
+        public View secondaryActionDivider;
+    }
+
+    private final class ViewAdapter extends BaseAdapter {
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            final ViewEntry entry = getEntry(position);
+            final View v;
+            final ViewCache viewCache;
+
+            // Check to see if we can reuse convertView
+            if (convertView != null) {
+                v = convertView;
+                viewCache = (ViewCache) v.getTag();
+            } else {
+                // Create a new view if needed
+                v = mInflater.inflate(R.layout.contact_detail_list_item, parent, false);
+
+                // Cache the children
+                viewCache = new ViewCache();
+                viewCache.kindAndType = (TextView) v.findViewById(R.id.kind_and_type);
+                viewCache.kind = (TextView) v.findViewById(R.id.kind);
+                viewCache.type = (TextView) v.findViewById(R.id.type);
+                viewCache.data = (TextView) v.findViewById(R.id.data);
+                viewCache.footer = (TextView) v.findViewById(R.id.footer);
+                viewCache.actionIcon = (ImageView) v.findViewById(R.id.action_icon);
+                viewCache.primaryIcon = (ImageView) v.findViewById(R.id.primary_icon);
+                viewCache.presenceIcon = (ImageView) v.findViewById(R.id.presence_icon);
+                viewCache.secondaryActionButton = (ImageView) v.findViewById(
+                        R.id.secondary_action_button);
+                viewCache.secondaryActionButton.setOnClickListener(mSecondaryActionClickListener);
+                viewCache.secondaryActionDivider = v.findViewById(R.id.divider);
+                v.setTag(viewCache);
+            }
+
+            final ViewEntry previousEntry = position == 0 ? null : getEntry(position - 1);
+            final boolean isFirstOfItsKind =
+                    previousEntry == null ? true : !previousEntry.kind.equals(entry.kind);
+
+            // Bind the data to the view
+            bindView(v, entry, isFirstOfItsKind);
+            return v;
+        }
+
+        protected void bindView(View view, ViewEntry entry, boolean isFirstOfItsKind) {
+            final Resources resources = mContext.getResources();
+            ViewCache views = (ViewCache) view.getTag();
+
+            // Set the label. This is either a combination field or separate fields for kind of type
+            if (views.kindAndType != null) views.kindAndType.setText(entry.kindAndType);
+            if (views.kind != null) views.kind.setText(isFirstOfItsKind ? entry.kind : "");
+            if (views.type != null) views.type.setText(entry.typeString);
+
+            // Set the content
+            final TextView content = views.data;
+            if (content != null) {
+                content.setText(entry.data);
+                setMaxLines(content, entry.maxLines);
+            }
+
+            // Set the footer
+            if (!TextUtils.isEmpty(entry.footerLine)) {
+                views.footer.setText(entry.footerLine);
+                views.footer.setVisibility(View.VISIBLE);
+            } else {
+                views.footer.setVisibility(View.GONE);
+            }
+
+            // Set the primary icon
+            views.primaryIcon.setVisibility(entry.isPrimary ? View.VISIBLE : View.GONE);
+
+            // Set the action icon
+            final ImageView action = views.actionIcon;
+            if (entry.actionIcon != -1) {
+                Drawable actionIcon;
+                if (entry.resPackageName != null) {
+                    // Load external resources through PackageManager
+                    actionIcon = mContext.getPackageManager().getDrawable(entry.resPackageName,
+                            entry.actionIcon, null);
+                } else {
+                    actionIcon = resources.getDrawable(entry.actionIcon);
+                }
+                action.setImageDrawable(actionIcon);
+                action.setVisibility(View.VISIBLE);
+            } else {
+                // Things should still line up as if there was an icon, so make it invisible
+                action.setVisibility(View.INVISIBLE);
+            }
+
+            // Set the presence icon
+            final Drawable presenceIcon = ContactPresenceIconUtil.getPresenceIcon(
+                    mContext, entry.presence);
+            final ImageView presenceIconView = views.presenceIcon;
+            if (presenceIcon != null) {
+                presenceIconView.setImageDrawable(presenceIcon);
+                presenceIconView.setVisibility(View.VISIBLE);
+            } else {
+                presenceIconView.setVisibility(View.GONE);
+            }
+
+            // Set the secondary action button
+            final ImageView secondaryActionView = views.secondaryActionButton;
+            Drawable secondaryActionIcon = null;
+            if (entry.secondaryActionIcon != -1) {
+                secondaryActionIcon = resources.getDrawable(entry.secondaryActionIcon);
+            }
+            if (entry.secondaryIntent != null && secondaryActionIcon != null) {
+                secondaryActionView.setImageDrawable(secondaryActionIcon);
+                secondaryActionView.setTag(entry);
+                secondaryActionView.setVisibility(View.VISIBLE);
+                views.secondaryActionDivider.setVisibility(View.VISIBLE);
+            } else {
+                secondaryActionView.setVisibility(View.GONE);
+                views.secondaryActionDivider.setVisibility(View.GONE);
+            }
+        }
+
+        private void setMaxLines(TextView textView, int maxLines) {
+            if (maxLines == 1) {
+                textView.setSingleLine(true);
+                textView.setEllipsize(TextUtils.TruncateAt.END);
+            } else {
+                textView.setSingleLine(false);
+                textView.setMaxLines(maxLines);
+                textView.setEllipsize(null);
+            }
+        }
+
+        private OnClickListener mSecondaryActionClickListener = new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (mListener == null) return;
+                if (v == null) return;
+                final ViewEntry entry = (ViewEntry) v.getTag();
+                if (entry == null) return;
+                final Intent intent = entry.secondaryIntent;
+                if (intent == null) return;
+                mListener.onItemClicked(intent);
+            }
+        };
+
+        @Override
+        public int getCount() {
+            int count = 0;
+            final int numSections = mSections.size();
+            for (int i = 0; i < numSections; i++) {
+                final ArrayList<ViewEntry> section = mSections.get(i);
+                count += section.size();
+            }
+            return count;
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return getEntry(position);
+        }
+
+        @Override
+        public long getItemId(int position) {
+            final ViewEntry entry = getEntry(position);
+            if (entry != null) {
+                return entry.id;
+            }
+            return -1;
+        }
+
+        private ViewEntry getEntry(int position) {
+            final int numSections = mSections.size();
+            for (int i = 0; i < numSections; i++) {
+                final ArrayList<ViewEntry> section = mSections.get(i);
+                final int sectionSize = section.size();
+                if (position < sectionSize) {
+                    return section.get(position);
+                }
+                position -= sectionSize;
+            }
+            return null;
+        }
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, final MenuInflater inflater) {
+        inflater.inflate(R.menu.view, menu);
+    }
+
+    @Override
+    public void onPrepareOptionsMenu(Menu menu) {
+        boolean isDirectoryEntry = mContactData != null && mContactData.isDirectoryEntry();
+
+        // Options only shows telephony-related settings (ringtone, send to voicemail).
+        // ==> Hide if we don't have a telephone
+        final MenuItem optionsMenu = menu.findItem(R.id.menu_options);
+        final boolean deviceHasPhone = PhoneCapabilityTester.isPhone(mContext);
+        optionsMenu.setVisible(!isDirectoryEntry && deviceHasPhone);
+
+        final MenuItem editMenu = menu.findItem(R.id.menu_edit);
+        editMenu.setVisible(!isDirectoryEntry);
+
+        final MenuItem deleteMenu = menu.findItem(R.id.menu_delete);
+        deleteMenu.setVisible(!isDirectoryEntry);
+
+        final MenuItem shareMenu = menu.findItem(R.id.menu_share);
+        shareMenu.setVisible(!isDirectoryEntry && !mAllRestricted);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_edit: {
+                if (mListener != null) mListener.onEditRequested(mLookupUri);
+                break;
+            }
+            case R.id.menu_delete: {
+                if (mListener != null) mListener.onDeleteRequested(mLookupUri);
+                return true;
+            }
+            case R.id.menu_options: {
+                if (mContactData == null) return false;
+                final Intent intent = new Intent(mContext, ContactOptionsActivity.class);
+                intent.setData(mContactData.getLookupUri());
+                mContext.startActivity(intent);
+                return true;
+            }
+            case R.id.menu_share: {
+                if (mAllRestricted) return false;
+                if (mContactData == null) return false;
+
+                final String lookupKey = mContactData.getLookupKey();
+                final Uri shareUri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
+
+                final Intent intent = new Intent(Intent.ACTION_SEND);
+                intent.setType(Contacts.CONTENT_VCARD_TYPE);
+                intent.putExtra(Intent.EXTRA_STREAM, shareUri);
+
+                // Launch chooser to share contact via
+                final CharSequence chooseTitle = mContext.getText(R.string.share_via);
+                final Intent chooseIntent = Intent.createChooser(intent, chooseTitle);
+
+                try {
+                    mContext.startActivity(chooseIntent);
+                } catch (ActivityNotFoundException ex) {
+                    Toast.makeText(mContext, R.string.share_error, Toast.LENGTH_SHORT).show();
+                }
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private void makePersonalCopy() {
+        if (mListener == null) {
+            return;
+        }
+
+        int exportSupport = mContactData.getDirectoryExportSupport();
+        switch (exportSupport) {
+            case Directory.EXPORT_SUPPORT_SAME_ACCOUNT_ONLY: {
+                createCopy(new Account(mContactData.getDirectoryAccountName(),
+                                mContactData.getDirectoryAccountType()));
+                break;
+            }
+            case Directory.EXPORT_SUPPORT_ANY_ACCOUNT: {
+                final ArrayList<Account> accounts = AccountTypes.getInstance(mContext).getAccounts(true);
+                if (accounts.isEmpty()) {
+                    createCopy(null);
+                    return;  // Don't show a dialog.
+                }
+
+                // In the common case of a single writable account, auto-select
+                // it without showing a dialog.
+                if (accounts.size() == 1) {
+                    createCopy(accounts.get(0));
+                    return;  // Don't show a dialog.
+                }
+
+                final SelectAccountDialogFragment dialog = new SelectAccountDialogFragment(true);
+                dialog.setTargetFragment(this, 0);
+                dialog.show(getFragmentManager(), SelectAccountDialogFragment.TAG);
+                break;
+            }
+        }
+    }
+
+    @Override
+    public void onAccountSelectorCancelled() {
+    }
+
+    @Override
+    public void onAccountChosen(Account account, boolean isNewContact) {
+        createCopy(account);
+    }
+
+    private void createCopy(Account account) {
+        if (mListener != null) {
+            mListener.onCreateRawContactRequested(mContactData.getContentValues(), account);
+        }
+    }
+
+    @Override
+    public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+        AdapterView.AdapterContextMenuInfo info;
+        try {
+             info = (AdapterView.AdapterContextMenuInfo) menuInfo;
+        } catch (ClassCastException e) {
+            Log.e(TAG, "bad menuInfo", e);
+            return;
+        }
+
+        // This can be null sometimes, don't crash...
+        if (info == null) {
+            Log.e(TAG, "bad menuInfo");
+            return;
+        }
+
+        final ViewEntry entry = mAdapter.getEntry(info.position);
+        menu.setHeaderTitle(R.string.contactOptionsTitle);
+        if (entry.mimetype.equals(CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
+            if (mHasPhone) {
+                menu.add(0, 0, 0, R.string.menu_call).setIntent(entry.intent);
+            }
+            if (mHasSms) {
+                // If there is no Phone, SMS is the primary intent
+                final Intent intent = mHasPhone ? entry.secondaryIntent : entry.intent;
+                menu.add(0, 0, 0, R.string.menu_sendSMS).setIntent(intent);
+            }
+            if (!entry.isPrimary && mHasPhone) {
+                menu.add(0, R.id.menu_detail_makeDefault, 0, R.string.menu_makeDefaultNumber);
+            }
+        } else if (entry.mimetype.equals(CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {
+            menu.add(0, 0, 0, R.string.menu_sendEmail).setIntent(entry.intent);
+            if (!entry.isPrimary) {
+                menu.add(0, R.id.menu_detail_makeDefault, 0, R.string.menu_makeDefaultEmail);
+            }
+        } else if (entry.mimetype.equals(CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE)) {
+            menu.add(0, 0, 0, R.string.menu_viewAddress).setIntent(entry.intent);
+        }
+    }
+
+    @Override
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        if (mListener == null) return;
+        final ViewEntry entry = mAdapter.getEntry(position);
+        if (entry == null) return;
+        final Intent intent = entry.intent;
+        if (intent == null) return;
+        mListener.onItemClicked(intent);
+    }
+
+    @Override
+    public boolean onContextItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_detail_makeDefault: {
+                if (makeItemDefault(item)) {
+                    return true;
+                }
+                break;
+            }
+        }
+
+        return false;
+    }
+
+    private boolean makeItemDefault(MenuItem item) {
+        ViewEntry entry = getViewEntryForMenuItem(item);
+        if (entry == null) {
+            return false;
+        }
+
+        // Update the primary values in the data record.
+        ContentValues values = new ContentValues(1);
+        values.put(Data.IS_SUPER_PRIMARY, 1);
+
+        mContext.getContentResolver().update(ContentUris.withAppendedId(Data.CONTENT_URI, entry.id),
+                values, null, null);
+        return true;
+    }
+
+    private ViewEntry getViewEntryForMenuItem(MenuItem item) {
+        AdapterView.AdapterContextMenuInfo info;
+        try {
+             info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
+        } catch (ClassCastException e) {
+            Log.e(TAG, "bad menuInfo", e);
+            return null;
+        }
+
+        return mAdapter.getEntry(info.position);
+    }
+
+    public boolean handleKeyDown(int keyCode) {
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_CALL: {
+                try {
+                    ITelephony phone = ITelephony.Stub.asInterface(
+                            ServiceManager.checkService("phone"));
+                    if (phone != null && !phone.isIdle()) {
+                        // Skip out and let the key be handled at a higher level
+                        break;
+                    }
+                } catch (RemoteException re) {
+                    // Fall through and try to call the contact
+                }
+
+                int index = mListView.getSelectedItemPosition();
+                if (index != -1) {
+                    final ViewEntry entry = mAdapter.getEntry(index);
+                    if (entry != null && entry.intent != null &&
+                            entry.intent.getAction() == Intent.ACTION_CALL_PRIVILEGED) {
+                        mContext.startActivity(entry.intent);
+                        return true;
+                    }
+                } else if (mPrimaryPhoneUri != null) {
+                    // There isn't anything selected, call the default number
+                    final Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+                            mPrimaryPhoneUri);
+                    mContext.startActivity(intent);
+                    return true;
+                }
+                return false;
+            }
+
+            case KeyEvent.KEYCODE_DEL: {
+                if (mListener != null) mListener.onDeleteRequested(mLookupUri);
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * The listener for the detail loader
+     */
+    private final LoaderManager.LoaderCallbacks<ContactLoader.Result> mDetailLoaderListener =
+            new LoaderCallbacks<ContactLoader.Result>() {
+        @Override
+        public Loader<ContactLoader.Result> onCreateLoader(int id, Bundle args) {
+            return new ContactLoader(mContext, mLookupUri, true /* loadGroupMetaData */);
+        }
+
+        @Override
+        public void onLoadFinished(Loader<ContactLoader.Result> loader, ContactLoader.Result data) {
+            if (data == ContactLoader.Result.NOT_FOUND || data == ContactLoader.Result.ERROR) {
+                // Item has been deleted
+                Log.i(TAG, "No contact found. Closing activity");
+                if (mListener != null) mListener.onContactNotFound();
+                return;
+            }
+            mContactData = data;
+            bindData();
+        }
+    };
+
+    private ContactDetailHeaderView.Listener mHeaderViewListener =
+            new ContactDetailHeaderView.Listener() {
+        @Override
+        public void onDisplayNameClick(View view) {
+        }
+
+        @Override
+        public void onPhotoClick(View view) {
+        }
+    };
+
+
+    public static interface Listener {
+        /**
+         * Contact was not found, so somehow close this fragment. This is raised after a contact
+         * is removed via Menu/Delete
+         */
+        public void onContactNotFound();
+
+        /**
+         * User decided to go to Edit-Mode
+         */
+        public void onEditRequested(Uri lookupUri);
+
+        /**
+         * User clicked a single item (e.g. mail)
+         */
+        public void onItemClicked(Intent intent);
+
+        /**
+         * User decided to delete the contact
+         */
+        public void onDeleteRequested(Uri lookupUri);
+
+        /**
+         * User requested creation of a new contact with the specified values.
+         *
+         * @param values ContentValues containing data rows for the new contact.
+         * @param account Account where the new contact should be created
+         */
+        public void onCreateRawContactRequested(ArrayList<ContentValues> values, Account account);
+    }
+}
diff --git a/src/com/android/contacts/views/detail/ContactDetailHeaderView.java b/src/com/android/contacts/views/detail/ContactDetailHeaderView.java
new file mode 100644
index 0000000..7d1e9ec
--- /dev/null
+++ b/src/com/android/contacts/views/detail/ContactDetailHeaderView.java
@@ -0,0 +1,365 @@
+/*
+ * 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.views.detail;
+
+import com.android.contacts.R;
+import com.android.contacts.util.ContactBadgeUtil;
+import com.android.contacts.views.ContactLoader;
+import com.android.contacts.views.ContactLoader.Result;
+
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.Entity;
+import android.content.Entity.NamedContentValues;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.provider.ContactsContract.CommonDataKinds.Organization;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.DisplayNameSources;
+import android.provider.ContactsContract.StatusUpdates;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.CheckBox;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Header for displaying a title bar with contact info. You
+ * can bind specific values by calling
+ * {@link ContactDetailHeaderView#loadData(com.android.contacts.views.ContactLoader.Result)}
+ */
+public class ContactDetailHeaderView extends FrameLayout implements View.OnClickListener {
+    private static final String TAG = "ContactDetailHeaderView";
+
+    private TextView mDisplayNameView;
+    private TextView mPhoneticNameView;
+    private TextView mOrganizationTextView;
+    private CheckBox mStarredView;
+    private ImageView mPhotoView;
+    private ImageView mPresenceView;
+    private View mStatusContainerView;
+    private TextView mStatusView;
+    private TextView mStatusDateView;
+    private TextView mDirectoryNameView;
+
+    private Uri mContactUri;
+    private Listener mListener;
+
+    /**
+     * Interface for callbacks invoked when the user interacts with a header.
+     */
+    public interface Listener {
+        public void onPhotoClick(View view);
+        public void onDisplayNameClick(View view);
+    }
+
+    public ContactDetailHeaderView(Context context) {
+        this(context, null);
+    }
+
+    public ContactDetailHeaderView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public ContactDetailHeaderView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+
+        final LayoutInflater inflater =
+            (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        inflater.inflate(R.layout.contact_detail_header_view, this);
+
+        mDisplayNameView = (TextView) findViewById(R.id.name);
+
+        mPhoneticNameView = (TextView) findViewById(R.id.phonetic_name);
+
+        mOrganizationTextView = (TextView) findViewById(R.id.organization);
+
+        mStarredView = (CheckBox)findViewById(R.id.star);
+        mStarredView.setOnClickListener(this);
+
+        mPhotoView = (ImageView) findViewById(R.id.photo);
+
+        mPresenceView = (ImageView) findViewById(R.id.presence);
+        mStatusContainerView = findViewById(R.id.status_container);
+        mStatusView = (TextView)findViewById(R.id.status);
+        mStatusDateView = (TextView)findViewById(R.id.status_date);
+
+        mDirectoryNameView = (TextView) findViewById(R.id.directory_name);
+    }
+
+    /**
+     * Loads the data from the Loader-Result. This is the only function that has to be called
+     * from the outside to fully setup the View
+     */
+    public void loadData(ContactLoader.Result contactData) {
+        mContactUri = contactData.getLookupUri();
+
+        setDisplayName(contactData.getDisplayName(), contactData.getPhoneticName());
+        setCompany(contactData);
+        Bitmap photo = ContactBadgeUtil.getPhoto(contactData);
+        if (photo != null) {
+            setPhoto(photo);
+        } else if (contactData.getPhotoUri() != null) {
+            setPhoto(null);
+            new AsyncPhotoLoader().execute(contactData.getPhotoUri());
+        } else {
+            setPhoto(ContactBadgeUtil.loadPlaceholderPhoto(mContext));
+        }
+        setStared(contactData.getStarred());
+        setPresence(contactData.getPresence());
+        setSocialSnippet(contactData.getSocialSnippet());
+        setSocialDate(ContactBadgeUtil.getSocialDate(contactData, getContext()));
+        setDirectoryName(contactData.isDirectoryEntry(), contactData.getDirectoryDisplayName(),
+                contactData.getDirectoryType(), contactData.getDirectoryAccountName());
+    }
+
+    /**
+     * Set the given {@link Listener} to handle header events.
+     */
+    public void setListener(Listener listener) {
+        mListener = listener;
+    }
+
+    private void performPhotoClick() {
+        if (mListener != null) {
+            mListener.onPhotoClick(mPhotoView);
+        }
+    }
+
+    private void performDisplayNameClick() {
+        if (mListener != null) {
+            mListener.onDisplayNameClick(mDisplayNameView);
+        }
+    }
+
+    /**
+     * Set the starred state of this header widget.
+     */
+    private void setStared(boolean starred) {
+        mStarredView.setChecked(starred);
+    }
+
+    /**
+     * Set the presence. If presence is null, it is hidden.
+     */
+    private void setPresence(Integer presence) {
+        if (presence == null) {
+            mPresenceView.setVisibility(View.GONE);
+        } else {
+            mPresenceView.setVisibility(View.VISIBLE);
+            mPresenceView.setImageResource(StatusUpdates.getPresenceIconResourceId(
+                    presence.intValue()));
+        }
+    }
+
+    /**
+     * Set the photo to display in the header. If bitmap is null, the default placeholder
+     * image is shown
+     */
+    private void setPhoto(Bitmap bitmap) {
+        mPhotoView.setImageBitmap(
+                bitmap == null ? ContactBadgeUtil.loadPlaceholderPhoto(mContext) : bitmap);
+    }
+
+    /**
+     * Set the display name and phonetic name to show in the header.
+     */
+    private void setDisplayName(CharSequence displayName, CharSequence phoneticName) {
+        mDisplayNameView.setText(displayName);
+        if (TextUtils.isEmpty(phoneticName)) {
+            mPhoneticNameView.setVisibility(View.GONE);
+        } else {
+            mPhoneticNameView.setText(phoneticName);
+            mPhoneticNameView.setVisibility(View.VISIBLE);
+        }
+    }
+
+    /**
+     * Sets the organization info. If several organizations are given, the first one is used
+     */
+    private void setCompany(Result contactData) {
+        final boolean displayNameIsOrganization =
+            contactData.getDisplayNameSource() == DisplayNameSources.ORGANIZATION;
+        for (Entity entity : contactData.getEntities()) {
+            for (NamedContentValues subValue : entity.getSubValues()) {
+                final ContentValues entryValues = subValue.values;
+                final String mimeType = entryValues.getAsString(Data.MIMETYPE);
+
+                if (Organization.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                    final String company = entryValues.getAsString(Organization.COMPANY);
+                    final String title = entryValues.getAsString(Organization.TITLE);
+                    final String combined;
+                    // We need to show company and title in a combined string. However, if the
+                    // DisplayName is already the organization, it mirrors company or (if company
+                    // is empty title). Make sure we don't show what's already shown as DisplayName
+                    if (TextUtils.isEmpty(company)) {
+                        combined = displayNameIsOrganization ? null : title;
+                    } else {
+                        if (TextUtils.isEmpty(title)) {
+                            combined = displayNameIsOrganization ? null : company;
+                        } else {
+                            if (displayNameIsOrganization) {
+                                combined = title;
+                            } else {
+                                combined = getResources().getString(
+                                        R.string.organization_company_and_title,
+                                        company, title);
+                            }
+                        }
+                    }
+
+                    if (TextUtils.isEmpty(combined)) {
+                        mOrganizationTextView.setVisibility(GONE);
+                    } else {
+                        mOrganizationTextView.setVisibility(VISIBLE);
+                        mOrganizationTextView.setText(combined);
+                    }
+
+                    return;
+                }
+            }
+        }
+        mOrganizationTextView.setVisibility(GONE);
+    }
+
+    /**
+     * Set the social snippet text to display in the header.
+     */
+    private void setSocialSnippet(CharSequence snippet) {
+        if (TextUtils.isEmpty(snippet)) {
+            // No status info. Hide everything
+            if (mStatusContainerView != null) mStatusContainerView.setVisibility(View.GONE);
+            mStatusView.setVisibility(View.GONE);
+            mStatusDateView.setVisibility(View.GONE);
+        } else {
+            // We have status info. Show the bubble
+            if (mStatusContainerView != null) mStatusContainerView.setVisibility(View.VISIBLE);
+            mStatusView.setVisibility(View.VISIBLE);
+            mStatusView.setText(snippet);
+        }
+    }
+
+    /**
+     * Set the status attribution text to display in the header.
+     */
+
+    private void setSocialDate(CharSequence dateText) {
+        if (TextUtils.isEmpty(dateText)) {
+            mStatusDateView.setVisibility(View.GONE);
+        } else {
+            mStatusDateView.setText(dateText);
+            mStatusDateView.setVisibility(View.VISIBLE);
+        }
+    }
+
+    private void setDirectoryName(boolean isDirectoryEntry, String directoryDisplayName,
+            String directoryType, String directoryAccountName) {
+        if (isDirectoryEntry) {
+            String name = TextUtils.isEmpty(directoryDisplayName)
+                    ? directoryAccountName
+                    : directoryDisplayName;
+            String text;
+            if (TextUtils.isEmpty(name)) {
+                text = getContext().getString(
+                        R.string.contact_directory_description, directoryType);
+            } else {
+                text = getContext().getString(
+                        R.string.contact_directory_account_description, directoryType, name);
+            }
+            mDirectoryNameView.setText(text);
+            mDirectoryNameView.setVisibility(View.VISIBLE);
+        } else {
+            mDirectoryNameView.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void onClick(View view) {
+        switch (view.getId()) {
+            case R.id.star: {
+                // Toggle "starred" state
+                // Make sure there is a contact
+                if (mContactUri != null) {
+                    // TODO: This should be done in the background
+                    final ContentValues values = new ContentValues(1);
+                    values.put(Contacts.STARRED, mStarredView.isChecked());
+                    mContext.getContentResolver().update(mContactUri, values, null, null);
+                }
+                break;
+            }
+            case R.id.photo: {
+                performPhotoClick();
+                break;
+            }
+            case R.id.name: {
+                performDisplayNameClick();
+                break;
+            }
+        }
+    }
+
+    private class AsyncPhotoLoader extends AsyncTask<String, Void, Bitmap> {
+
+        private static final int BUFFER_SIZE = 1024*16;
+
+        @Override
+        protected Bitmap doInBackground(String... params) {
+            Uri uri = Uri.parse(params[0]);
+            Bitmap bitmap = null;
+            try {
+                InputStream is = getContext().getContentResolver().openInputStream(uri);
+                if (is != null) {
+                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                    try {
+                        byte[] mBuffer = new byte[BUFFER_SIZE];
+
+                        int size;
+                        while ((size = is.read(mBuffer)) != -1) {
+                            baos.write(mBuffer, 0, size);
+                        }
+                        byte[] bytes = baos.toByteArray();
+                        bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, null);
+                    } finally {
+                        is.close();
+                    }
+                } else {
+                    Log.v(TAG, "Cannot load photo " + uri);
+                }
+            } catch (IOException e) {
+                Log.e(TAG, "Cannot load photo " + uri, e);
+            }
+
+            return bitmap;
+        }
+
+        @Override
+        protected void onPostExecute(Bitmap bitmap) {
+            setPhoto(bitmap);
+        }
+    }
+}
diff --git a/src/com/android/contacts/views/detail/ContactNoneFragment.java b/src/com/android/contacts/views/detail/ContactNoneFragment.java
new file mode 100644
index 0000000..8d5794e
--- /dev/null
+++ b/src/com/android/contacts/views/detail/ContactNoneFragment.java
@@ -0,0 +1,33 @@
+/*
+ * 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.views.detail;
+
+import com.android.contacts.R;
+
+import android.app.Fragment;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class ContactNoneFragment extends Fragment {
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
+        return inflater.inflate(R.layout.contact_none_fragment, container, false);
+    }
+}
diff --git a/src/com/android/contacts/views/editor/AggregationSuggestionEngine.java b/src/com/android/contacts/views/editor/AggregationSuggestionEngine.java
new file mode 100644
index 0000000..79131d6
--- /dev/null
+++ b/src/com/android/contacts/views/editor/AggregationSuggestionEngine.java
@@ -0,0 +1,407 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.google.android.collect.Lists;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.Message;
+import android.os.Process;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Nickname;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Contacts.AggregationSuggestions;
+import android.provider.ContactsContract.Contacts.AggregationSuggestions.Builder;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.text.TextUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Runs asynchronous queries to obtain aggregation suggestions in the as-you-type mode.
+ */
+public class AggregationSuggestionEngine extends HandlerThread {
+    public static final String TAG = "AggregationSuggestionEngine";
+
+    private static final int MESSAGE_RESET = 0;
+    private static final int MESSAGE_NAME_CHANGE = 1;
+    private static final int MESSAGE_DATA_CURSOR = 2;
+
+    private static final long SUGGESTION_LOOKUP_DELAY_MILLIS = 300;
+
+    private static final int MAX_SUGGESTION_COUNT = 3;
+
+    private final Context mContext;
+
+    private long[] mSuggestedContactIds = new long[0];
+
+    private Handler mMainHandler;
+    private Handler mHandler;
+    private long mContactId;
+    private Listener mListener;
+    private Cursor mDataCursor;
+
+    public interface Listener {
+        void onAggregationSuggestionChange();
+    }
+
+    public static final class RawContact {
+        public long rawContactId;
+        public String accountType;
+        public String accountName;
+
+        @Override
+        public String toString() {
+            return "ID: " + rawContactId + " account: " + accountType + "/" + accountName;
+        }
+    }
+
+    public static final class Suggestion {
+
+        public long contactId;
+        public String lookupKey;
+        public String name;
+        public String phoneNumber;
+        public String emailAddress;
+        public String nickname;
+        public byte[] photo;
+        public List<RawContact> rawContacts;
+
+        @Override
+        public String toString() {
+            return "ID: " + contactId + " rawContacts: " + rawContacts + " name: " + name
+                    + " phone: " + phoneNumber + " email: " + emailAddress + " nickname: "
+                    + nickname + (photo != null ? " [has photo]" : "");
+        }
+    }
+
+    public AggregationSuggestionEngine(Context context) {
+        super("AggregationSuggestions", Process.THREAD_PRIORITY_BACKGROUND);
+        mContext = context;
+        mMainHandler = new Handler() {
+            @Override
+            public void handleMessage(Message msg) {
+                AggregationSuggestionEngine.this.deliverNotification((Cursor) msg.obj);
+            }
+        };
+    }
+
+    protected Handler getHandler() {
+        if (mHandler == null) {
+            mHandler = new Handler(getLooper()) {
+                @Override
+                public void handleMessage(Message msg) {
+                    AggregationSuggestionEngine.this.handleMessage(msg);
+                }
+            };
+        }
+        return mHandler;
+    }
+
+    public void setContactId(long contactId) {
+        if (contactId != mContactId) {
+            mContactId = contactId;
+            reset();
+        }
+    }
+
+    public void setListener(Listener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    public boolean quit() {
+        if (mDataCursor != null) {
+            mDataCursor.close();
+        }
+        mDataCursor = null;
+        return super.quit();
+    }
+
+    public void reset() {
+        Handler handler = getHandler();
+        handler.removeMessages(MESSAGE_NAME_CHANGE);
+        handler.sendEmptyMessage(MESSAGE_RESET);
+    }
+
+    public void onNameChange(ValuesDelta values) {
+        Handler handler = getHandler();
+        handler.removeMessages(MESSAGE_NAME_CHANGE);
+
+        Uri uri = buildAggregationSuggestionUri(values);
+        if (uri == null) {
+            return;
+        }
+
+        Message msg = handler.obtainMessage(MESSAGE_NAME_CHANGE, uri);
+        handler.sendMessageDelayed(msg, SUGGESTION_LOOKUP_DELAY_MILLIS);
+    }
+
+    private Uri buildAggregationSuggestionUri(ValuesDelta values) {
+        StringBuilder nameSb = new StringBuilder();
+        appendValue(nameSb, values, StructuredName.PREFIX);
+        appendValue(nameSb, values, StructuredName.GIVEN_NAME);
+        appendValue(nameSb, values, StructuredName.MIDDLE_NAME);
+        appendValue(nameSb, values, StructuredName.FAMILY_NAME);
+        appendValue(nameSb, values, StructuredName.SUFFIX);
+
+        if (nameSb.length() == 0) {
+            appendValue(nameSb, values, StructuredName.DISPLAY_NAME);
+        }
+
+        StringBuilder phoneticNameSb = new StringBuilder();
+        appendValue(phoneticNameSb, values, StructuredName.PHONETIC_FAMILY_NAME);
+        appendValue(phoneticNameSb, values, StructuredName.PHONETIC_MIDDLE_NAME);
+        appendValue(phoneticNameSb, values, StructuredName.PHONETIC_GIVEN_NAME);
+
+        if (nameSb.length() == 0 && phoneticNameSb.length() == 0) {
+            return null;
+        }
+
+        Builder builder = AggregationSuggestions.builder()
+                .setLimit(MAX_SUGGESTION_COUNT)
+                .setContactId(mContactId);
+
+        if (nameSb.length() != 0) {
+            builder.addParameter(AggregationSuggestions.PARAMETER_MATCH_NAME, nameSb.toString());
+        }
+
+        if (phoneticNameSb.length() != 0) {
+            builder.addParameter(
+                    AggregationSuggestions.PARAMETER_MATCH_NAME, phoneticNameSb.toString());
+        }
+
+        return builder.build();
+    }
+
+    private void appendValue(StringBuilder sb, ValuesDelta values, String column) {
+        String value = values.getAsString(column);
+        if (!TextUtils.isEmpty(value)) {
+            if (sb.length() > 0) {
+                sb.append(' ');
+            }
+            sb.append(value);
+        }
+    }
+
+    protected void handleMessage(Message msg) {
+        switch (msg.what) {
+            case MESSAGE_RESET:
+                mSuggestedContactIds = new long[0];
+                break;
+            case MESSAGE_NAME_CHANGE:
+                loadAggregationSuggestions((Uri) msg.obj);
+                break;
+        }
+    }
+
+    private static final class DataQuery {
+
+        public static final String SELECTION_PREFIX =
+                Data.MIMETYPE + " IN ('"
+                    + Phone.CONTENT_ITEM_TYPE + "','"
+                    + Email.CONTENT_ITEM_TYPE + "','"
+                    + StructuredName.CONTENT_ITEM_TYPE + "','"
+                    + Nickname.CONTENT_ITEM_TYPE + "','"
+                    + Photo.CONTENT_ITEM_TYPE + "')"
+                + " AND " + Data.CONTACT_ID + " IN (";
+
+        public static final String[] COLUMNS = {
+            Data._ID,
+            Data.CONTACT_ID,
+            Data.LOOKUP_KEY,
+            Data.PHOTO_ID,
+            Data.DISPLAY_NAME,
+            Data.RAW_CONTACT_ID,
+            Data.MIMETYPE,
+            Data.DATA1,
+            Data.IS_SUPER_PRIMARY,
+            Photo.PHOTO,
+            RawContacts.ACCOUNT_TYPE,
+            RawContacts.ACCOUNT_NAME,
+        };
+
+        public static final int ID = 0;
+        public static final int CONTACT_ID = 1;
+        public static final int LOOKUP_KEY = 2;
+        public static final int PHOTO_ID = 3;
+        public static final int DISPLAY_NAME = 4;
+        public static final int RAW_CONTACT_ID = 5;
+        public static final int MIMETYPE = 6;
+        public static final int DATA1 = 7;
+        public static final int IS_SUPERPRIMARY = 8;
+        public static final int PHOTO = 9;
+        public static final int ACCOUNT_TYPE = 10;
+        public static final int ACCOUNT_NAME = 11;
+    }
+
+    private void loadAggregationSuggestions(Uri uri) {
+        ContentResolver contentResolver = mContext.getContentResolver();
+        Cursor cursor = contentResolver.query(uri, new String[]{Contacts._ID}, null, null, null);
+        try {
+            // If a new request is pending, chuck the result of the previous request
+            if (getHandler().hasMessages(MESSAGE_NAME_CHANGE)) {
+                return;
+            }
+
+            boolean changed = updateSuggestedContactIds(cursor);
+            if (!changed) {
+                return;
+            }
+
+            StringBuilder sb = new StringBuilder(DataQuery.SELECTION_PREFIX);
+            int count = mSuggestedContactIds.length;
+            for (int i = 0; i < count; i++) {
+                if (i > 0) {
+                    sb.append(',');
+                }
+                sb.append(mSuggestedContactIds[i]);
+            }
+            sb.append(')');
+            sb.toString();
+
+            Cursor dataCursor = contentResolver.query(Data.CONTENT_URI,
+                    DataQuery.COLUMNS, sb.toString(), null, Data.CONTACT_ID);
+            mMainHandler.sendMessage(mMainHandler.obtainMessage(MESSAGE_DATA_CURSOR, dataCursor));
+        } finally {
+            cursor.close();
+        }
+    }
+
+    private boolean updateSuggestedContactIds(Cursor cursor) {
+        int count = cursor.getCount();
+        boolean changed = count != mSuggestedContactIds.length;
+        if (!changed) {
+            while (cursor.moveToNext()) {
+                long contactId = cursor.getLong(0);
+                if (Arrays.binarySearch(mSuggestedContactIds, contactId) < 0) {
+                    changed = true;
+                    break;
+                }
+            }
+        }
+
+        if (changed) {
+            mSuggestedContactIds = new long[count];
+            cursor.moveToPosition(-1);
+            for (int i = 0; i < count; i++) {
+                cursor.moveToNext();
+                mSuggestedContactIds[i] = cursor.getLong(0);
+            }
+            Arrays.sort(mSuggestedContactIds);
+        }
+
+        return changed;
+    }
+
+    protected void deliverNotification(Cursor dataCursor) {
+        if (mDataCursor != null) {
+            mDataCursor.close();
+        }
+        mDataCursor = dataCursor;
+        if (mListener != null) {
+            mListener.onAggregationSuggestionChange();
+        }
+    }
+
+    public int getSuggestedContactCount() {
+        return mDataCursor != null ? mDataCursor.getCount() : 0;
+    }
+
+    public List<Suggestion> getSuggestions() {
+        ArrayList<Suggestion> list = Lists.newArrayList();
+        if (mDataCursor != null) {
+            Suggestion suggestion = null;
+            long currentContactId = -1;
+            mDataCursor.moveToPosition(-1);
+            while (mDataCursor.moveToNext()) {
+                long contactId = mDataCursor.getLong(DataQuery.CONTACT_ID);
+                if (contactId != currentContactId) {
+                    suggestion = new Suggestion();
+                    suggestion.contactId = contactId;
+                    suggestion.name = mDataCursor.getString(DataQuery.DISPLAY_NAME);
+                    suggestion.lookupKey = mDataCursor.getString(DataQuery.LOOKUP_KEY);
+                    suggestion.rawContacts = Lists.newArrayList();
+                    list.add(suggestion);
+                    currentContactId = contactId;
+                }
+
+                long rawContactId = mDataCursor.getLong(DataQuery.RAW_CONTACT_ID);
+                if (!containsRawContact(suggestion, rawContactId)) {
+                    RawContact rawContact = new RawContact();
+                    rawContact.rawContactId = rawContactId;
+                    rawContact.accountName = mDataCursor.getString(DataQuery.ACCOUNT_NAME);
+                    rawContact.accountType = mDataCursor.getString(DataQuery.ACCOUNT_TYPE);
+                    suggestion.rawContacts.add(rawContact);
+                }
+
+                String mimetype = mDataCursor.getString(DataQuery.MIMETYPE);
+                if (Phone.CONTENT_ITEM_TYPE.equals(mimetype)) {
+                    String data = mDataCursor.getString(DataQuery.DATA1);
+                    int superprimary = mDataCursor.getInt(DataQuery.IS_SUPERPRIMARY);
+                    if (!TextUtils.isEmpty(data)
+                            && (superprimary != 0 || suggestion.phoneNumber == null)) {
+                        suggestion.phoneNumber = data;
+                    }
+                } else if (Email.CONTENT_ITEM_TYPE.equals(mimetype)) {
+                    String data = mDataCursor.getString(DataQuery.DATA1);
+                    int superprimary = mDataCursor.getInt(DataQuery.IS_SUPERPRIMARY);
+                    if (!TextUtils.isEmpty(data)
+                            && (superprimary != 0 || suggestion.emailAddress == null)) {
+                        suggestion.emailAddress = data;
+                    }
+                } else if (Nickname.CONTENT_ITEM_TYPE.equals(mimetype)) {
+                    String data = mDataCursor.getString(DataQuery.DATA1);
+                    if (!TextUtils.isEmpty(data)) {
+                        suggestion.nickname = data;
+                    }
+                } else if (Photo.CONTENT_ITEM_TYPE.equals(mimetype)) {
+                    long dataId = mDataCursor.getLong(DataQuery.ID);
+                    long photoId = mDataCursor.getLong(DataQuery.PHOTO_ID);
+                    if (dataId == photoId && !mDataCursor.isNull(DataQuery.PHOTO)) {
+                        suggestion.photo = mDataCursor.getBlob(DataQuery.PHOTO);
+                    }
+                }
+            }
+        }
+        return list;
+    }
+
+    public boolean containsRawContact(Suggestion suggestion, long rawContactId) {
+        if (suggestion.rawContacts != null) {
+            int count = suggestion.rawContacts.size();
+            for (int i = 0; i < count; i++) {
+                if (suggestion.rawContacts.get(i).rawContactId == rawContactId) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/views/editor/AggregationSuggestionView.java b/src/com/android/contacts/views/editor/AggregationSuggestionView.java
new file mode 100644
index 0000000..8c8adf7
--- /dev/null
+++ b/src/com/android/contacts/views/editor/AggregationSuggestionView.java
@@ -0,0 +1,162 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.views.editor.AggregationSuggestionEngine.RawContact;
+import com.android.contacts.views.editor.AggregationSuggestionEngine.Suggestion;
+import com.google.android.collect.Lists;
+
+import android.content.ContentUris;
+import android.content.Context;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.provider.ContactsContract.Contacts;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A view that contains a name, picture and other data for a contact aggregation suggestion.
+ */
+public class AggregationSuggestionView extends RelativeLayout implements OnClickListener {
+
+    public interface Listener {
+
+        /**
+         * Callback that passes the contact ID to join with and, for convenience,
+         * also the list of constituent raw contact IDs to avoid a separate query
+         * for those.
+         */
+        public void onJoinAction(long contactId, List<Long> rawContacIds);
+
+        /**
+         * Callback that passes the contact ID to edit instead of the current contact.
+         */
+        public void onEditAction(Uri contactLookupUri);
+    }
+
+    private Listener mListener;
+    private long mContactId;
+    private String mLookupKey;
+    private List<RawContact> mRawContacts = Lists.newArrayList();
+    private boolean mNewContact;
+
+    public AggregationSuggestionView(Context context) {
+        super(context);
+    }
+
+    public AggregationSuggestionView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public AggregationSuggestionView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    public void setNewContact(boolean flag) {
+        mNewContact = flag;
+    }
+
+    public void bindSuggestion(Suggestion suggestion) {
+        mContactId = suggestion.contactId;
+        mLookupKey = suggestion.lookupKey;
+        mRawContacts = suggestion.rawContacts;
+        ImageView photo = (ImageView) findViewById(R.id.aggregation_suggestion_photo);
+        if (suggestion.photo != null) {
+            photo.setImageBitmap(BitmapFactory.decodeByteArray(
+                    suggestion.photo, 0, suggestion.photo.length));
+        } else {
+            photo.setImageResource(R.drawable.ic_contact_picture_2);
+        }
+
+        TextView name = (TextView) findViewById(R.id.aggregation_suggestion_name);
+        name.setText(suggestion.name);
+
+        TextView data = (TextView) findViewById(R.id.aggregation_suggestion_data);
+        String dataText = null;
+        if (suggestion.nickname != null) {
+            dataText = suggestion.nickname;
+        } else if (suggestion.emailAddress != null) {
+            dataText = suggestion.emailAddress;
+        } else if (suggestion.phoneNumber != null) {
+            dataText = suggestion.phoneNumber;
+        }
+        data.setText(dataText);
+
+        boolean canEdit = canEditSuggestedContact();
+        Button join = (Button) findViewById(R.id.aggregation_suggestion_join_button);
+        join.setOnClickListener(this);
+        join.setVisibility(canEdit ? View.GONE : View.VISIBLE);
+
+        Button edit = (Button) findViewById(R.id.aggregation_suggestion_edit_button);
+        edit.setOnClickListener(this);
+        edit.setVisibility(canEdit ? View.VISIBLE : View.GONE);
+    }
+
+    /**
+     * Returns true if the suggested contact can be edited.
+     */
+    private boolean canEditSuggestedContact() {
+        if (!mNewContact) {
+            return false;
+        }
+
+        AccountTypes sources = AccountTypes.getInstance(getContext());
+        for (RawContact rawContact : mRawContacts) {
+            String accountType = rawContact.accountType;
+            if (accountType == null) {
+                return true;
+            }
+            BaseAccountType source = sources.getInflatedSource(
+                    accountType, BaseAccountType.LEVEL_SUMMARY);
+            if (!source.readOnly) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    public void setListener(Listener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (mListener != null) {
+            if (v.getId() == R.id.aggregation_suggestion_join_button) {
+                ArrayList<Long> rawContactIds = Lists.newArrayList();
+                for (RawContact rawContact : mRawContacts) {
+                    rawContactIds.add(rawContact.rawContactId);
+                }
+                mListener.onJoinAction(mContactId, rawContactIds);
+            } else {
+                mListener.onEditAction(Contacts.getLookupUri(mContactId, mLookupKey));
+            }
+        }
+    }
+}
diff --git a/src/com/android/contacts/views/editor/BaseRawContactEditorView.java b/src/com/android/contacts/views/editor/BaseRawContactEditorView.java
new file mode 100644
index 0000000..76c37d7
--- /dev/null
+++ b/src/com/android/contacts/views/editor/BaseRawContactEditorView.java
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.BaseAccountType.EditType;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.EntityModifier;
+
+import android.content.Context;
+import android.content.Entity;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.widget.LinearLayout;
+
+/**
+ * Base view that provides common code for the editor interaction for a specific
+ * RawContact represented through an {@link EntityDelta}. Callers can
+ * reuse this view and quickly rebuild its contents through
+ * {@link #setState(EntityDelta, BaseAccountType)}.
+ * <p>
+ * Internal updates are performed against {@link ValuesDelta} so that the
+ * source {@link Entity} can be swapped out. Any state-based changes, such as
+ * adding {@link Data} rows or changing {@link EditType}, are performed through
+ * {@link EntityModifier} to ensure that {@link BaseAccountType} are enforced.
+ */
+public abstract class BaseRawContactEditorView extends LinearLayout {
+    protected LayoutInflater mInflater;
+
+    protected PhotoEditorView mPhoto;
+    protected boolean mHasPhotoEditor = false;
+
+    public BaseRawContactEditorView(Context context) {
+        super(context);
+    }
+
+    public BaseRawContactEditorView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public void setGroupMetaData(Cursor groupMetaData) {
+    }
+
+    /**
+     * Assign the given {@link Bitmap} to the internal {@link PhotoEditorView}
+     * for the {@link EntityDelta} currently being edited.
+     */
+    public void setPhotoBitmap(Bitmap bitmap) {
+        mPhoto.setPhotoBitmap(bitmap);
+    }
+
+    /**
+     * Return true if the current {@link RawContacts} supports {@link Photo},
+     * which means that {@link PhotoEditorView} is enabled.
+     */
+    public boolean hasPhotoEditor() {
+        return mHasPhotoEditor;
+    }
+
+    /**
+     * Return true if internal {@link PhotoEditorView} has a {@link Photo} set.
+     */
+    public boolean hasSetPhoto() {
+        return mPhoto.hasSetPhoto();
+    }
+
+    public PhotoEditorView getPhotoEditor() {
+        return mPhoto;
+    }
+
+    /**
+     * @return the RawContact ID that this editor is editing.
+     */
+    public abstract long getRawContactId();
+
+    /**
+     * Set the internal state for this view, given a current
+     * {@link EntityDelta} state and the {@link BaseAccountType} that
+     * apply to that state.
+     */
+    public abstract void setState(EntityDelta state, BaseAccountType source, ViewIdGenerator vig);
+}
diff --git a/src/com/android/contacts/views/editor/ContactEditorFragment.java b/src/com/android/contacts/views/editor/ContactEditorFragment.java
new file mode 100644
index 0000000..64980a8
--- /dev/null
+++ b/src/com/android/contacts/views/editor/ContactEditorFragment.java
@@ -0,0 +1,1657 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.JoinContactActivity;
+import com.android.contacts.R;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.EntityDeltaList;
+import com.android.contacts.model.EntityModifier;
+import com.android.contacts.model.GoogleAccountType;
+import com.android.contacts.util.EmptyService;
+import com.android.contacts.util.WeakAsyncTask;
+import com.android.contacts.views.ContactLoader;
+import com.android.contacts.views.GroupMetaDataLoader;
+import com.android.contacts.views.editor.AggregationSuggestionEngine.Suggestion;
+import com.android.contacts.views.editor.Editor.EditorListener;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.Fragment;
+import android.app.LoaderManager;
+import android.app.LoaderManager.LoaderCallbacks;
+import android.app.ProgressDialog;
+import android.content.ActivityNotFoundException;
+import android.content.ContentProviderOperation;
+import android.content.ContentProviderOperation.Builder;
+import android.content.ContentProviderResult;
+import android.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.content.Entity;
+import android.content.Intent;
+import android.content.Loader;
+import android.content.OperationApplicationException;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.Rect;
+import android.media.MediaScannerConnection;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Environment;
+import android.os.RemoteException;
+import android.os.SystemClock;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.AggregationExceptions;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.MediaStore;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
+import android.view.ViewStub;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.io.File;
+import java.lang.ref.WeakReference;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.List;
+
+public class ContactEditorFragment extends Fragment implements
+        SplitContactConfirmationDialogFragment.Listener, PickPhotoDialogFragment.Listener,
+        SelectAccountDialogFragment.Listener, ModifyPhotoDialogFragment.Listener,
+        AggregationSuggestionEngine.Listener {
+
+    private static final String TAG = "ContactEditorFragment";
+
+    private static final int LOADER_DATA = 1;
+    private static final int LOADER_GROUPS = 2;
+
+    private static final String KEY_URI = "uri";
+    private static final String KEY_ACTION = "action";
+    private static final String KEY_EDIT_STATE = "state";
+    private static final String KEY_RAW_CONTACT_ID_REQUESTING_PHOTO = "photorequester";
+    private static final String KEY_VIEW_ID_GENERATOR = "viewidgenerator";
+    private static final String KEY_CURRENT_PHOTO_FILE = "currentphotofile";
+    private static final String KEY_QUERY_SELECTION = "queryselection";
+    private static final String KEY_CONTACT_ID_FOR_JOIN = "contactidforjoin";
+    private static final String KEY_SHOW_JOIN_SUGGESTIONS = "showJoinSuggestions";
+
+    /**
+     * Modes that specify what the AsyncTask has to perform after saving
+     */
+    private interface SaveMode {
+        /**
+         * Close the editor after saving
+         */
+        public static final int CLOSE = 0;
+
+        /**
+         * Reload the data so that the user can continue editing
+         */
+        public static final int RELOAD = 1;
+
+        /**
+         * Split the contact after saving
+         */
+        public static final int SPLIT = 2;
+
+        /**
+         * Join another contact after saving
+         */
+        public static final int JOIN = 3;
+    }
+
+    private interface Status {
+        /**
+         * The loader is fetching data
+         */
+        public static final int LOADING = 0;
+
+        /**
+         * Not currently busy. We are waiting for the user to enter data
+         */
+        public static final int EDITING = 1;
+
+        /**
+         * The data is currently being saved. This is used to prevent more auto-saves (they shouldn't
+         * overlap)
+         */
+        public static final int SAVING = 2;
+
+        /**
+         * Prevents any more savings (this is used if Save/Close or Revert was executed by the user)
+         */
+        public static final int CLOSING = 3;
+    }
+
+    private static final int REQUEST_CODE_JOIN = 0;
+    private static final int REQUEST_CODE_CAMERA_WITH_DATA = 1;
+    private static final int REQUEST_CODE_PHOTO_PICKED_WITH_DATA = 2;
+
+    private Bitmap mPhoto = null;
+    private long mRawContactIdRequestingPhoto = -1;
+    private long mRawContactIdRequestingPhotoAfterLoad = -1;
+
+    private final EntityDeltaComparator mComparator = new EntityDeltaComparator();
+
+    private static final int ICON_SIZE = 96;
+
+    private static final File PHOTO_DIR = new File(
+            Environment.getExternalStorageDirectory() + "/DCIM/Camera");
+
+    private Cursor mGroupMetaData;
+
+    /**
+     * A delay in milliseconds used for bringing aggregation suggestions to
+     * the visible part of the screen. The reason this has to be done after
+     * a delay is a race condition with the soft keyboard.  The keyboard
+     * may expand to display its own autocomplete suggestions, which will
+     * reduce the visible area of the screen.  We will yield to the keyboard
+     * hoping that the delay is sufficient.  If not - part of the
+     * suggestion will be hidden, which is not fatal.
+     */
+    private static final int AGGREGATION_SUGGESTION_SCROLL_DELAY = 200;
+
+    private File mCurrentPhotoFile;
+
+    private Context mContext;
+    private String mAction;
+    private Uri mLookupUri;
+    private String mMimeType;
+    private Bundle mIntentExtras;
+    private Listener mListener;
+
+    private String mQuerySelection;
+
+    private long mContactIdForJoin;
+
+    private LinearLayout mContent;
+    private EntityDeltaList mState;
+
+    private ViewIdGenerator mViewIdGenerator;
+
+    private long mLoaderStartTime;
+
+    private int mStatus;
+
+    private AggregationSuggestionEngine mAggregationSuggestionEngine;
+    private long mAggregationSuggestionsRawContactId;
+    private View mAggregationSuggestionView;
+
+    public ContactEditorFragment() {
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        mContext = activity;
+    }
+
+    @Override
+    public void onStop() {
+        super.onStop();
+        if (mAggregationSuggestionEngine != null) {
+            mAggregationSuggestionEngine.quit();
+        }
+        // If anything was left unsaved, save it now but keep the editor open.
+        if (!getActivity().isChangingConfigurations() && mStatus == Status.EDITING) {
+            save(false);
+        }
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) {
+        final View view = inflater.inflate(R.layout.contact_editor_fragment, container, false);
+
+        mContent = (LinearLayout) view.findViewById(R.id.editors);
+
+        setHasOptionsMenu(true);
+
+        // If we are in an orientation change, we already have mState (it was loaded by onCreate)
+        if (mState != null) {
+            bindEditors();
+        }
+
+        return view;
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+
+        Log.d(TAG, "onActivityCreated(" + savedInstanceState + ")");
+
+        // Handle initial actions only when existing state missing
+        final boolean hasIncomingState = savedInstanceState != null;
+
+        if (!hasIncomingState) {
+            if (Intent.ACTION_EDIT.equals(mAction)) {
+                if (mListener != null) mListener.setTitleTo(R.string.editContact_title_edit);
+                getLoaderManager().initLoader(LOADER_DATA, null, mDataLoaderListener);
+            } else if (Intent.ACTION_INSERT.equals(mAction)) {
+                if (mListener != null) mListener.setTitleTo(R.string.editContact_title_insert);
+
+                doAddAction(true);
+            } else throw new IllegalArgumentException("Unknown Action String " + mAction +
+                    ". Only support " + Intent.ACTION_EDIT + " or " + Intent.ACTION_INSERT);
+        }
+    }
+
+    @Override
+    public void onStart() {
+        getLoaderManager().initLoader(LOADER_GROUPS, null, mGroupLoaderListener);
+        super.onStart();
+    }
+
+    public void load(String action, Uri lookupUri, String mimeType, Bundle intentExtras) {
+        mAction = action;
+        mLookupUri = lookupUri;
+        mMimeType = mimeType;
+        mIntentExtras = intentExtras;
+    }
+
+    public void setListener(Listener value) {
+        mListener = value;
+    }
+
+    @Override
+    public void onCreate(Bundle savedState) {
+        if (savedState != null) {
+            // Restore mUri before calling super.onCreate so that onInitializeLoaders
+            // would already have a uri and an action to work with
+            mLookupUri = savedState.getParcelable(KEY_URI);
+            mAction = savedState.getString(KEY_ACTION);
+        }
+
+        super.onCreate(savedState);
+
+        if (savedState == null) {
+            // If savedState is non-null, onRestoreInstanceState() will restore the generator.
+            mViewIdGenerator = new ViewIdGenerator();
+        } else {
+            // Read state from savedState. No loading involved here
+            mState = savedState.<EntityDeltaList> getParcelable(KEY_EDIT_STATE);
+            mRawContactIdRequestingPhoto = savedState.getLong(
+                    KEY_RAW_CONTACT_ID_REQUESTING_PHOTO);
+            mViewIdGenerator = savedState.getParcelable(KEY_VIEW_ID_GENERATOR);
+            String fileName = savedState.getString(KEY_CURRENT_PHOTO_FILE);
+            if (fileName != null) {
+                mCurrentPhotoFile = new File(fileName);
+            }
+            mQuerySelection = savedState.getString(KEY_QUERY_SELECTION);
+            mContactIdForJoin = savedState.getLong(KEY_CONTACT_ID_FOR_JOIN);
+            mAggregationSuggestionsRawContactId = savedState.getLong(KEY_SHOW_JOIN_SUGGESTIONS);
+            mStatus = Status.EDITING;
+        }
+    }
+
+    public void setData(ContactLoader.Result data) {
+        // If we have already loaded data, we do not want to change it here to not confuse the user
+        if (mState != null) {
+            Log.v(TAG, "Ignoring background change. This will have to be rebased later");
+            return;
+        }
+
+        // Build Filter mQuerySelection
+        final ArrayList<Entity> entities = data.getEntities();
+        final StringBuilder sb = new StringBuilder(RawContacts._ID + " IN(");
+        final int count = entities.size();
+        for (int i = 0; i < count; i++) {
+            if (i > 0) {
+                sb.append(',');
+            }
+            sb.append(entities.get(i).getEntityValues().get(RawContacts._ID));
+        }
+        sb.append(")");
+        mQuerySelection = sb.toString();
+        mState = EntityDeltaList.fromIterator(entities.iterator());
+
+        // Merge in Extras from Intent
+        if (mIntentExtras != null && mIntentExtras.size() > 0) {
+            final AccountTypes sources = AccountTypes.getInstance(mContext);
+            for (EntityDelta state : mState) {
+                final String accountType = state.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
+                final BaseAccountType source = sources.getInflatedSource(accountType,
+                        BaseAccountType.LEVEL_CONSTRAINTS);
+                if (!source.readOnly) {
+                    // Apply extras to the first writable raw contact only
+                    EntityModifier.parseExtras(mContext, source, state, mIntentExtras);
+                    mIntentExtras = null;
+                    break;
+                }
+            }
+        }
+
+        bindEditors();
+    }
+
+    private void selectAccountAndCreateContact(boolean isNewContact) {
+        final ArrayList<Account> accounts = AccountTypes.getInstance(mContext).getAccounts(true);
+        // No Accounts available.  Create a phone-local contact.
+        if (accounts.isEmpty()) {
+            createContact(null, isNewContact);
+            return;  // Don't show a dialog.
+        }
+
+        // In the common case of a single account being writable, auto-select
+        // it without showing a dialog.
+        if (accounts.size() == 1) {
+            createContact(accounts.get(0), isNewContact);
+            return;  // Don't show a dialog.
+        }
+
+        final SelectAccountDialogFragment dialog = new SelectAccountDialogFragment(isNewContact);
+        dialog.setTargetFragment(this, 0);
+        dialog.show(getFragmentManager(), SelectAccountDialogFragment.TAG);
+    }
+
+    /**
+     * @param account may be null to signal a device-local contact should
+     *     be created.
+     * @param prefillFromIntent If this is set, the intent extras will be used to prefill the fields
+     */
+    private void createContact(Account account, boolean prefillFromIntent) {
+        final AccountTypes sources = AccountTypes.getInstance(mContext);
+        final ContentValues values = new ContentValues();
+        if (account != null) {
+            values.put(RawContacts.ACCOUNT_NAME, account.name);
+            values.put(RawContacts.ACCOUNT_TYPE, account.type);
+        } else {
+            values.putNull(RawContacts.ACCOUNT_NAME);
+            values.putNull(RawContacts.ACCOUNT_TYPE);
+        }
+
+        // Parse any values from incoming intent
+        EntityDelta insert = new EntityDelta(ValuesDelta.fromAfter(values));
+        final BaseAccountType source = sources.getInflatedSource(
+                account != null ? account.type : null,
+                BaseAccountType.LEVEL_CONSTRAINTS);
+        EntityModifier.parseExtras(mContext, source, insert,
+                prefillFromIntent ? mIntentExtras : null);
+
+        // Ensure we have some default fields
+        EntityModifier.ensureKindExists(insert, source, Phone.CONTENT_ITEM_TYPE);
+        EntityModifier.ensureKindExists(insert, source, Email.CONTENT_ITEM_TYPE);
+
+        if (mState == null) {
+            // Create state if none exists yet
+            mState = EntityDeltaList.fromSingle(insert);
+        } else {
+            // Add contact onto end of existing state
+            mState.add(insert);
+        }
+
+        bindEditors();
+    }
+
+    private void bindEditors() {
+        // Sort the editors
+        Collections.sort(mState, mComparator);
+
+        // Remove any existing editors and rebuild any visible
+        mContent.removeAllViews();
+
+        final LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(
+                Context.LAYOUT_INFLATER_SERVICE);
+        final AccountTypes sources = AccountTypes.getInstance(mContext);
+        int size = mState.size();
+        for (int i = 0; i < size; i++) {
+            // TODO ensure proper ordering of entities in the list
+            final EntityDelta entity = mState.get(i);
+            final ValuesDelta values = entity.getValues();
+            if (!values.isVisible()) continue;
+
+            final String accountType = values.getAsString(RawContacts.ACCOUNT_TYPE);
+            final BaseAccountType source = sources.getInflatedSource(accountType,
+                    BaseAccountType.LEVEL_CONSTRAINTS);
+            final long rawContactId = values.getAsLong(RawContacts._ID);
+
+            final BaseRawContactEditorView editor;
+            if (!source.readOnly) {
+                editor = (BaseRawContactEditorView) inflater.inflate(R.layout.item_contact_editor,
+                        mContent, false);
+            } else {
+                editor = (BaseRawContactEditorView) inflater.inflate(
+                        R.layout.item_read_only_contact_editor, mContent, false);
+            }
+            final PhotoEditorView photoEditor = editor.getPhotoEditor();
+            final boolean sourceReadOnly = source.readOnly;
+            photoEditor.setEditorListener(new EditorListener() {
+                @Override
+                public void onRequest(int request) {
+                    if (!hasValidState()) return;
+
+                    if (request == EditorListener.REQUEST_PICK_PHOTO) {
+                        if (editor.hasSetPhoto()) {
+                            // There is an existing photo, offer to remove, replace, or promote to
+                            // primary
+                            final ModifyPhotoDialogFragment fragment =
+                                    new ModifyPhotoDialogFragment(sourceReadOnly, rawContactId);
+                            fragment.setTargetFragment(ContactEditorFragment.this, 0);
+                            fragment.show(getFragmentManager(), ModifyPhotoDialogFragment.TAG);
+                        } else if (!sourceReadOnly) {
+                            // No photo set and not read-only, try to set the photo
+                            doPickPhotoAction(rawContactId);
+                        }
+                    }
+                }
+
+                @Override
+                public void onDeleted(Editor removedEditor) {
+                }
+            });
+
+            mContent.addView(editor);
+            editor.setState(entity, source, mViewIdGenerator);
+
+            if (editor instanceof RawContactEditorView) {
+                final RawContactEditorView rawContactEditor = (RawContactEditorView) editor;
+                final FieldEditorView nameEditor = rawContactEditor.getNameEditor();
+                nameEditor.setEditorListener(new EditorListener() {
+
+                    @Override
+                    public void onRequest(int request) {
+                        onContactNameChange(request, rawContactEditor, nameEditor);
+                    }
+
+                    @Override
+                    public void onDeleted(Editor removedEditor) {
+                    }
+                });
+
+                if (rawContactId == mAggregationSuggestionsRawContactId) {
+                    acquireAggregationSuggestions(rawContactEditor);
+                }
+            }
+        }
+
+        bindGroupMetaData();
+
+        // Show editor now that we've loaded state
+        mContent.setVisibility(View.VISIBLE);
+
+        // Refresh Action Bar as the visibility of the join command
+        // Activity can be null if we have been detached from the Activity
+        final Activity activity = getActivity();
+        if (activity != null) activity.invalidateOptionsMenu();
+    }
+
+    private void bindGroupMetaData() {
+        if (mGroupMetaData == null) {
+            return;
+        }
+
+        int editorCount = mContent.getChildCount();
+        for (int i = 0; i < editorCount; i++) {
+            BaseRawContactEditorView editor = (BaseRawContactEditorView) mContent.getChildAt(i);
+            editor.setGroupMetaData(mGroupMetaData);
+        }
+    }
+
+    @Override
+    public void onCreateOptionsMenu(Menu menu, final MenuInflater inflater) {
+        inflater.inflate(R.menu.edit, menu);
+    }
+
+    @Override
+    public void onPrepareOptionsMenu(Menu menu) {
+        menu.findItem(R.id.menu_split).setVisible(mState != null && mState.size() > 1);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_done:
+                return doSaveAction(SaveMode.CLOSE);
+            case R.id.menu_discard:
+                return doRevertAction();
+            case R.id.menu_add_raw_contact:
+                return doAddAction(false);
+            case R.id.menu_delete:
+                return doDeleteAction();
+            case R.id.menu_split:
+                return doSplitContactAction();
+            case R.id.menu_join:
+                return doJoinContactAction();
+        }
+        return false;
+    }
+
+    private boolean doAddAction(boolean isNewContact) {
+        // Load Accounts async so that we can present them
+        selectAccountAndCreateContact(isNewContact);
+
+        return true;
+    }
+
+    /**
+     * Delete the entire contact currently being edited, which usually asks for
+     * user confirmation before continuing.
+     */
+    private boolean doDeleteAction() {
+        if (!hasValidState())
+            return false;
+
+        // TODO: Make sure Insert turns into Edit if/once it is autosaved
+        if (Intent.ACTION_INSERT.equals(mAction)) {
+            if (mListener != null) mListener.onReverted();
+        } else {
+            if (mListener != null) mListener.onDeleteRequested(mLookupUri);
+        }
+        return true;
+    }
+
+    /**
+     * Pick a specific photo to be added under the currently selected tab.
+     */
+    /* package */ boolean doPickPhotoAction(long rawContactId) {
+        if (!hasValidState()) return false;
+
+        mRawContactIdRequestingPhoto = rawContactId;
+        final PickPhotoDialogFragment dialogFragment = new PickPhotoDialogFragment();
+        dialogFragment.setTargetFragment(this, 0);
+        dialogFragment.show(getFragmentManager(), PickPhotoDialogFragment.TAG);
+
+        return true;
+    }
+
+    private boolean doSplitContactAction() {
+        if (!hasValidState()) return false;
+
+        final SplitContactConfirmationDialogFragment dialog =
+                new SplitContactConfirmationDialogFragment();
+        dialog.setTargetFragment(this, 0);
+        dialog.show(getFragmentManager(), SplitContactConfirmationDialogFragment.TAG);
+        return true;
+    }
+
+    private boolean doJoinContactAction() {
+        return doSaveAction(SaveMode.JOIN);
+    }
+
+    /**
+     * Constructs an intent for picking a photo from Gallery, cropping it and returning the bitmap.
+     */
+    public static Intent getPhotoPickIntent() {
+        Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
+        intent.setType("image/*");
+        intent.putExtra("crop", "true");
+        intent.putExtra("aspectX", 1);
+        intent.putExtra("aspectY", 1);
+        intent.putExtra("outputX", ICON_SIZE);
+        intent.putExtra("outputY", ICON_SIZE);
+        intent.putExtra("return-data", true);
+        return intent;
+    }
+
+    /**
+     * Check if our internal {@link #mState} is valid, usually checked before
+     * performing user actions.
+     */
+    private boolean hasValidState() {
+        return mState != null && mState.size() > 0;
+    }
+
+    /**
+     * Create a file name for the icon photo using current time.
+     */
+    private String getPhotoFileName() {
+        Date date = new Date(System.currentTimeMillis());
+        SimpleDateFormat dateFormat = new SimpleDateFormat("'IMG'_yyyyMMdd_HHmmss");
+        return dateFormat.format(date) + ".jpg";
+    }
+
+    /**
+     * Constructs an intent for capturing a photo and storing it in a temporary file.
+     */
+    public static Intent getTakePickIntent(File f) {
+        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE, null);
+        intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));
+        return intent;
+    }
+
+    /**
+     * Sends a newly acquired photo to Gallery for cropping
+     */
+    protected void doCropPhoto(File f) {
+        try {
+            // Add the image to the media store
+            MediaScannerConnection.scanFile(
+                    mContext,
+                    new String[] { f.getAbsolutePath() },
+                    new String[] { null },
+                    null);
+
+            // Launch gallery to crop the photo
+            final Intent intent = getCropImageIntent(Uri.fromFile(f));
+            startActivityForResult(intent, REQUEST_CODE_PHOTO_PICKED_WITH_DATA);
+        } catch (Exception e) {
+            Log.e(TAG, "Cannot crop image", e);
+            Toast.makeText(mContext, R.string.photoPickerNotFoundText, Toast.LENGTH_LONG).show();
+        }
+    }
+
+    /**
+     * Constructs an intent for image cropping.
+     */
+    public static Intent getCropImageIntent(Uri photoUri) {
+        Intent intent = new Intent("com.android.camera.action.CROP");
+        intent.setDataAndType(photoUri, "image/*");
+        intent.putExtra("crop", "true");
+        intent.putExtra("aspectX", 1);
+        intent.putExtra("aspectY", 1);
+        intent.putExtra("outputX", ICON_SIZE);
+        intent.putExtra("outputY", ICON_SIZE);
+        intent.putExtra("return-data", true);
+        return intent;
+    }
+
+    /**
+     * Saves or creates the contact based on the mode, and if successful
+     * finishes the activity.
+     */
+    private boolean doSaveAction(int saveMode) {
+        if (!hasValidState()) {
+            return false;
+        }
+
+        // If we are about to close the editor - there is no need to refresh the data
+        if (saveMode == SaveMode.CLOSE) {
+            getLoaderManager().stopLoader(LOADER_DATA);
+        }
+
+        mStatus = Status.SAVING;
+
+        // Trim any empty fields, and RawContacts, before persisting
+        final AccountTypes sources = AccountTypes.getInstance(mContext);
+        EntityModifier.trimEmpty(mState, sources);
+
+        if (mState.buildDiff().isEmpty()) {
+            onSaveCompleted(true, saveMode, mLookupUri);
+            return true;
+        }
+
+        final PersistTask task = new PersistTask(this, saveMode);
+        task.execute(mState);
+
+        return true;
+    }
+
+    /**
+     * Asynchronously saves the changes made by the user. This can be called even if nothing
+     * has changed
+     */
+    public void save(boolean closeAfterSave) {
+        doSaveAction(closeAfterSave ? SaveMode.CLOSE : SaveMode.RELOAD);
+    }
+
+    private boolean doRevertAction() {
+        // When this Fragment is closed we don't want it to auto-save
+        mStatus = Status.CLOSING;
+        if (mListener != null) mListener.onReverted();
+
+        return true;
+    }
+
+    private void onSaveCompleted(boolean success, int saveMode, Uri contactLookupUri) {
+        Log.d(TAG, "onSaveCompleted(" + success + ", " + saveMode + ", " + contactLookupUri);
+        switch (saveMode) {
+            case SaveMode.CLOSE:
+                final Intent resultIntent;
+                final int resultCode;
+                if (success && contactLookupUri != null) {
+                    final String requestAuthority =
+                            mLookupUri == null ? null : mLookupUri.getAuthority();
+
+                    final String legacyAuthority = "contacts";
+
+                    resultIntent = new Intent();
+                    if (legacyAuthority.equals(requestAuthority)) {
+                        // Build legacy Uri when requested by caller
+                        final long contactId = ContentUris.parseId(Contacts.lookupContact(
+                                mContext.getContentResolver(), contactLookupUri));
+                        final Uri legacyContentUri = Uri.parse("content://contacts/people");
+                        final Uri legacyUri = ContentUris.withAppendedId(
+                                legacyContentUri, contactId);
+                        resultIntent.setData(legacyUri);
+                    } else {
+                        // Otherwise pass back a lookup-style Uri
+                        resultIntent.setData(contactLookupUri);
+                    }
+
+                    resultCode = Activity.RESULT_OK;
+                } else {
+                    resultCode = Activity.RESULT_CANCELED;
+                    resultIntent = null;
+                }
+                // It is already saved, so prevent that it is saved again
+                mStatus = Status.CLOSING;
+                if (mListener != null) mListener.onSaveFinished(resultCode, resultIntent);
+                break;
+            case SaveMode.RELOAD:
+                if (success && contactLookupUri != null) {
+                    // If this was in INSERT, we are changing into an EDIT now.
+                    // If it already was an EDIT, we are changing to the new Uri now
+                    mState = null;
+                    load(Intent.ACTION_EDIT, contactLookupUri, mMimeType, null);
+                    mStatus = Status.LOADING;
+                    getLoaderManager().restartLoader(LOADER_DATA, null, mDataLoaderListener);
+                }
+                break;
+            case SaveMode.SPLIT:
+                if (mListener != null) {
+                    mListener.onContactSplit(contactLookupUri);
+                } else {
+                    Log.d(TAG, "No listener registered, can not call onSplitFinished");
+                }
+                mStatus = Status.EDITING;
+                break;
+
+            case SaveMode.JOIN:
+                if (success) {
+                    showJoinAggregateActivity(contactLookupUri);
+                }
+                mStatus = Status.EDITING;
+                break;
+        }
+    }
+
+    /**
+     * Shows a list of aggregates that can be joined into the currently viewed aggregate.
+     *
+     * @param contactLookupUri the fresh URI for the currently edited contact (after saving it)
+     */
+    private void showJoinAggregateActivity(Uri contactLookupUri) {
+        if (contactLookupUri == null) {
+            return;
+        }
+
+        mContactIdForJoin = ContentUris.parseId(contactLookupUri);
+        final Intent intent = new Intent(JoinContactActivity.JOIN_CONTACT);
+        intent.putExtra(JoinContactActivity.EXTRA_TARGET_CONTACT_ID, mContactIdForJoin);
+        startActivityForResult(intent, REQUEST_CODE_JOIN);
+    }
+
+    private interface JoinContactQuery {
+        String[] PROJECTION = {
+                RawContacts._ID,
+                RawContacts.CONTACT_ID,
+                RawContacts.NAME_VERIFIED,
+        };
+
+        String SELECTION = RawContacts.CONTACT_ID + "=? OR " + RawContacts.CONTACT_ID + "=?";
+
+        int _ID = 0;
+        int CONTACT_ID = 1;
+        int NAME_VERIFIED = 2;
+    }
+
+    /**
+     * Performs aggregation with the contact selected by the user from suggestions or A-Z list.
+     */
+    private void joinAggregate(final long contactId) {
+        final ContentResolver resolver = mContext.getContentResolver();
+
+        // Load raw contact IDs for all raw contacts involved - currently edited and selected
+        // in the join UIs
+        Cursor c = resolver.query(RawContacts.CONTENT_URI,
+                JoinContactQuery.PROJECTION,
+                JoinContactQuery.SELECTION,
+                new String[]{String.valueOf(contactId), String.valueOf(mContactIdForJoin)}, null);
+
+        long rawContactIds[];
+        long verifiedNameRawContactId = -1;
+        try {
+            rawContactIds = new long[c.getCount()];
+            for (int i = 0; i < rawContactIds.length; i++) {
+                c.moveToNext();
+                long rawContactId = c.getLong(JoinContactQuery._ID);
+                rawContactIds[i] = rawContactId;
+                if (c.getLong(JoinContactQuery.CONTACT_ID) == mContactIdForJoin) {
+                    if (verifiedNameRawContactId == -1
+                            || c.getInt(JoinContactQuery.NAME_VERIFIED) != 0) {
+                        verifiedNameRawContactId = rawContactId;
+                    }
+                }
+            }
+        } finally {
+            c.close();
+        }
+
+        // For each pair of raw contacts, insert an aggregation exception
+        ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
+        for (int i = 0; i < rawContactIds.length; i++) {
+            for (int j = 0; j < rawContactIds.length; j++) {
+                if (i != j) {
+                    buildJoinContactDiff(operations, rawContactIds[i], rawContactIds[j]);
+                }
+            }
+        }
+
+        // Mark the original contact as "name verified" to make sure that the contact
+        // display name does not change as a result of the join
+        Builder builder = ContentProviderOperation.newUpdate(
+                    ContentUris.withAppendedId(RawContacts.CONTENT_URI, verifiedNameRawContactId));
+        builder.withValue(RawContacts.NAME_VERIFIED, 1);
+        operations.add(builder.build());
+
+        boolean success = false;
+        // Apply all aggregation exceptions as one batch
+        try {
+            resolver.applyBatch(ContactsContract.AUTHORITY, operations);
+            Toast.makeText(mContext, R.string.contactsJoinedMessage, Toast.LENGTH_LONG).show();
+            success = true;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Failed to apply aggregation exception batch", e);
+            Toast.makeText(mContext, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
+        } catch (OperationApplicationException e) {
+            Log.e(TAG, "Failed to apply aggregation exception batch", e);
+            Toast.makeText(mContext, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
+        }
+
+        if (success) {
+            onSaveCompleted(true, SaveMode.RELOAD, mLookupUri);
+        }
+    }
+
+    /**
+     * Construct a {@link AggregationExceptions#TYPE_KEEP_TOGETHER} ContentProviderOperation.
+     */
+    private void buildJoinContactDiff(ArrayList<ContentProviderOperation> operations,
+            long rawContactId1, long rawContactId2) {
+        Builder builder =
+                ContentProviderOperation.newUpdate(AggregationExceptions.CONTENT_URI);
+        builder.withValue(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_TOGETHER);
+        builder.withValue(AggregationExceptions.RAW_CONTACT_ID1, rawContactId1);
+        builder.withValue(AggregationExceptions.RAW_CONTACT_ID2, rawContactId2);
+        operations.add(builder.build());
+    }
+
+    public static interface Listener {
+        /**
+         * Contact was not found, so somehow close this fragment. This is raised after a contact
+         * is removed via Menu/Delete (unless it was a new contact)
+         */
+        void onContactNotFound();
+
+        /**
+         * Contact was split, so we can close now.
+         * @param newLookupUri The lookup uri of the new contact that should be shown to the user.
+         * The editor tries best to chose the most natural contact here.
+         */
+        void onContactSplit(Uri newLookupUri);
+
+        /**
+         * User was presented with an account selection and couldn't decide.
+         */
+        void onAccountSelectorAborted();
+
+        /**
+         * User has tapped Revert, close the fragment now.
+         */
+        void onReverted();
+
+        /**
+         * Set the Title (e.g. of the Activity)
+         */
+        void setTitleTo(int resourceId);
+
+        /**
+         * Contact was saved and the Fragment can now be closed safely.
+         */
+        void onSaveFinished(int resultCode, Intent resultIntent);
+
+        /**
+         * User decided to delete the contact.
+         */
+        void onDeleteRequested(Uri lookupUri);
+
+        /**
+         * User switched to editing a different contact (a suggestion from the
+         * aggregation engine).
+         */
+        void onEditOtherContactRequested(
+                Uri contactLookupUri, ArrayList<ContentValues> contentValues);
+    }
+
+    private class EntityDeltaComparator implements Comparator<EntityDelta> {
+        /**
+         * Compare EntityDeltas for sorting the stack of editors.
+         */
+        @Override
+        public int compare(EntityDelta one, EntityDelta two) {
+            // Check direct equality
+            if (one.equals(two)) {
+                return 0;
+            }
+
+            final AccountTypes sources = AccountTypes.getInstance(mContext);
+            String accountType = one.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
+            final BaseAccountType oneSource = sources.getInflatedSource(accountType,
+                    BaseAccountType.LEVEL_SUMMARY);
+            accountType = two.getValues().getAsString(RawContacts.ACCOUNT_TYPE);
+            final BaseAccountType twoSource = sources.getInflatedSource(accountType,
+                    BaseAccountType.LEVEL_SUMMARY);
+
+            // Check read-only
+            if (oneSource.readOnly && !twoSource.readOnly) {
+                return 1;
+            } else if (twoSource.readOnly && !oneSource.readOnly) {
+                return -1;
+            }
+
+            // Check account type
+            boolean skipAccountTypeCheck = false;
+            boolean oneIsGoogle = oneSource instanceof GoogleAccountType;
+            boolean twoIsGoogle = twoSource instanceof GoogleAccountType;
+            if (oneIsGoogle && !twoIsGoogle) {
+                return -1;
+            } else if (twoIsGoogle && !oneIsGoogle) {
+                return 1;
+            } else if (oneIsGoogle && twoIsGoogle){
+                skipAccountTypeCheck = true;
+            }
+
+            int value;
+            if (!skipAccountTypeCheck) {
+                if (oneSource.accountType == null) {
+                    return 1;
+                }
+                value = oneSource.accountType.compareTo(twoSource.accountType);
+                if (value != 0) {
+                    return value;
+                }
+            }
+
+            // Check account name
+            ValuesDelta oneValues = one.getValues();
+            String oneAccount = oneValues.getAsString(RawContacts.ACCOUNT_NAME);
+            if (oneAccount == null) oneAccount = "";
+            ValuesDelta twoValues = two.getValues();
+            String twoAccount = twoValues.getAsString(RawContacts.ACCOUNT_NAME);
+            if (twoAccount == null) twoAccount = "";
+            value = oneAccount.compareTo(twoAccount);
+            if (value != 0) {
+                return value;
+            }
+
+            // Both are in the same account, fall back to contact ID
+            Long oneId = oneValues.getAsLong(RawContacts._ID);
+            Long twoId = twoValues.getAsLong(RawContacts._ID);
+            if (oneId == null) {
+                return -1;
+            } else if (twoId == null) {
+                return 1;
+            }
+
+            return (int)(oneId - twoId);
+        }
+    }
+
+    /**
+     * Returns the contact ID for the currently edited contact or 0 if the contact is new.
+     */
+    protected long getContactId() {
+        for (EntityDelta rawContact : mState) {
+            Long contactId = rawContact.getValues().getAsLong(RawContacts.CONTACT_ID);
+            if (contactId != null) {
+                return contactId;
+            }
+        }
+        return 0;
+    }
+
+
+    private void onContactNameChange(int request, final RawContactEditorView rawContactEditor,
+            FieldEditorView nameEditor) {
+
+        switch (request) {
+            case EditorListener.EDITOR_FORM_CHANGED:
+                if (nameEditor.hasShortAndLongForms()) {
+                    if (nameEditor.areOptionalFieldsVisible()) {
+                        switchFromFullNameToStructuredName(nameEditor);
+                    } else {
+                        switchFromStructuredNameToFullName(nameEditor);
+                    }
+                }
+                break;
+
+            case EditorListener.FIELD_CHANGED:
+                if (nameEditor.hasShortAndLongForms()) {
+                    if (nameEditor.areOptionalFieldsVisible()) {
+                        eraseFullName(nameEditor.getValues());
+                    } else {
+                        eraseStructuredName(nameEditor.getValues());
+                    }
+                }
+                acquireAggregationSuggestions(rawContactEditor);
+                break;
+        }
+    }
+
+    private void switchFromFullNameToStructuredName(FieldEditorView nameEditor) {
+        ValuesDelta values = nameEditor.getValues();
+
+        String displayName = values.getAsString(StructuredName.DISPLAY_NAME);
+        if (displayName == null) {
+            displayName = "";
+        }
+
+        Uri uri = ContactsContract.AUTHORITY_URI.buildUpon().appendPath("complete_name")
+                .appendQueryParameter(StructuredName.DISPLAY_NAME, displayName).build();
+        Cursor cursor = getActivity().getContentResolver().query(uri, new String[]{
+                StructuredName.PREFIX,
+                StructuredName.GIVEN_NAME,
+                StructuredName.MIDDLE_NAME,
+                StructuredName.FAMILY_NAME,
+                StructuredName.SUFFIX,
+        }, null, null, null);
+
+        try {
+            if (cursor.moveToFirst()) {
+                eraseFullName(values);
+                values.put(StructuredName.PREFIX, cursor.getString(0));
+                values.put(StructuredName.GIVEN_NAME, cursor.getString(1));
+                values.put(StructuredName.MIDDLE_NAME, cursor.getString(2));
+                values.put(StructuredName.FAMILY_NAME, cursor.getString(3));
+                values.put(StructuredName.SUFFIX, cursor.getString(4));
+            }
+        } finally {
+            cursor.close();
+        }
+    }
+
+    private void switchFromStructuredNameToFullName(FieldEditorView nameEditor) {
+        ValuesDelta values = nameEditor.getValues();
+
+        Uri.Builder builder = ContactsContract.AUTHORITY_URI.buildUpon().appendPath(
+                "complete_name");
+        appendQueryParameter(builder, values, StructuredName.PREFIX);
+        appendQueryParameter(builder, values, StructuredName.GIVEN_NAME);
+        appendQueryParameter(builder, values, StructuredName.MIDDLE_NAME);
+        appendQueryParameter(builder, values, StructuredName.FAMILY_NAME);
+        appendQueryParameter(builder, values, StructuredName.SUFFIX);
+        Uri uri = builder.build();
+        Cursor cursor = getActivity().getContentResolver().query(uri, new String[]{
+                StructuredName.DISPLAY_NAME,
+        }, null, null, null);
+
+        try {
+            if (cursor.moveToFirst()) {
+                eraseStructuredName(values);
+                values.put(StructuredName.DISPLAY_NAME, cursor.getString(0));
+            }
+        } finally {
+            cursor.close();
+        }
+    }
+
+    private void eraseFullName(ValuesDelta values) {
+        values.putNull(StructuredName.DISPLAY_NAME);
+    }
+
+    private void eraseStructuredName(ValuesDelta values) {
+        values.putNull(StructuredName.PREFIX);
+        values.putNull(StructuredName.GIVEN_NAME);
+        values.putNull(StructuredName.MIDDLE_NAME);
+        values.putNull(StructuredName.FAMILY_NAME);
+        values.putNull(StructuredName.SUFFIX);
+    }
+
+    private void appendQueryParameter(Uri.Builder builder, ValuesDelta values, String field) {
+        String value = values.getAsString(field);
+        if (!TextUtils.isEmpty(value)) {
+            builder.appendQueryParameter(field, value);
+        }
+    }
+
+    /**
+     * Triggers an asynchronous search for aggregation suggestions.
+     */
+    public void acquireAggregationSuggestions(RawContactEditorView rawContactEditor) {
+        long rawContactId = rawContactEditor.getRawContactId();
+        if (mAggregationSuggestionsRawContactId != rawContactId
+                && mAggregationSuggestionView != null) {
+            mAggregationSuggestionView.setVisibility(View.GONE);
+            mAggregationSuggestionView = null;
+            mAggregationSuggestionEngine.reset();
+        }
+
+        mAggregationSuggestionsRawContactId = rawContactId;
+
+        if (mAggregationSuggestionEngine == null) {
+            mAggregationSuggestionEngine = new AggregationSuggestionEngine(getActivity());
+            mAggregationSuggestionEngine.setListener(this);
+            mAggregationSuggestionEngine.start();
+        }
+
+        mAggregationSuggestionEngine.setContactId(getContactId());
+
+        FieldEditorView nameEditor = rawContactEditor.getNameEditor();
+        mAggregationSuggestionEngine.onNameChange(nameEditor.getValues());
+    }
+
+    @Override
+    public void onAggregationSuggestionChange() {
+        View rawContactView = getContactEditorView(mAggregationSuggestionsRawContactId);
+        if (rawContactView == null) {
+            return;
+        }
+
+        ViewStub stub = (ViewStub)rawContactView.findViewById(R.id.aggregation_suggestion_stub);
+        if (stub != null) {
+            stub.inflate();
+        }
+
+        // Only request the view on screen when it is first displayed
+        boolean requestOnScreen = mAggregationSuggestionView == null;
+        mAggregationSuggestionView = rawContactView.findViewById(R.id.aggregation_suggestion);
+
+        int count = mAggregationSuggestionEngine.getSuggestedContactCount();
+        if (count == 0) {
+            mAggregationSuggestionView.setVisibility(View.GONE);
+            return;
+        }
+
+        List<Suggestion> suggestions = mAggregationSuggestionEngine.getSuggestions();
+
+        TextView title = (TextView) mAggregationSuggestionView.findViewById(
+                R.id.aggregation_suggestion_title);
+        title.setText(getActivity().getResources().getQuantityString(
+                R.plurals.aggregation_suggestion_title, count));
+
+        LinearLayout itemList = (LinearLayout) mAggregationSuggestionView.findViewById(
+                R.id.aggregation_suggestions);
+        itemList.removeAllViews();
+
+        LayoutInflater inflater = getActivity().getLayoutInflater();
+
+        for (Suggestion suggestion : suggestions) {
+            AggregationSuggestionView suggestionView =
+                    (AggregationSuggestionView) inflater.inflate(
+                            R.layout.aggregation_suggestions_item, null);
+            suggestionView.setLayoutParams(
+                    new LinearLayout.LayoutParams(
+                            LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
+            suggestionView.setNewContact(mState.size() == 1 && mState.get(0).isContactInsert());
+            suggestionView.setListener(new AggregationSuggestionView.Listener() {
+
+                @Override
+                public void onJoinAction(long contactId, List<Long> rawContactIds) {
+                    mState.setJoinWithRawContacts(rawContactIds);
+                    // If we are in the edit mode (indicated by a non-zero contact ID),
+                    // join the suggested contact, save all changes, and stay in the editor.
+                    doSaveAction(SaveMode.RELOAD);
+                }
+
+                @Override
+                public void onEditAction(Uri contactLookupUri) {
+                    // Abandon the currently edited contact and switch to editing
+                    // the suggested one, transferring all the data there
+                    if (mListener != null) {
+                        mListener.onEditOtherContactRequested(
+                                contactLookupUri, mState.get(0).getContentValues());
+                    }
+                }
+            });
+            suggestionView.bindSuggestion(suggestion);
+            itemList.addView(suggestionView);
+        }
+
+        mAggregationSuggestionView.setVisibility(View.VISIBLE);
+
+        if (requestOnScreen) {
+            mContent.postDelayed(new Runnable() {
+
+                @Override
+                public void run() {
+                    requestAggregationSuggestionOnScreen(mAggregationSuggestionView);
+                }
+            }, AGGREGATION_SUGGESTION_SCROLL_DELAY);
+        }
+    }
+
+    /**
+     * Scrolls the editor if necessary to reveal the aggregation suggestion that is
+     * shown below the name editor. Makes sure that the currently focused field
+     * remains visible.
+     */
+    private void requestAggregationSuggestionOnScreen(final View view) {
+        Rect rect = getRelativeBounds(mContent, view);
+        View focused = mContent.findFocus();
+        if (focused != null) {
+            rect.union(getRelativeBounds(mContent, focused));
+        }
+        mContent.requestRectangleOnScreen(rect);
+    }
+
+    /**
+     * Computes bounds of the supplied view relative to its ascendant.
+     */
+    private Rect getRelativeBounds(View ascendant, View view) {
+        Rect rect = new Rect();
+        rect.set(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
+
+        View parent = (View) view.getParent();
+        while (parent != ascendant) {
+            rect.offset(parent.getLeft(), parent.getTop());
+            parent = (View) parent.getParent();
+        }
+        return rect;
+    }
+
+    // TODO: There has to be a nicer way than this WeakAsyncTask...? Maybe call a service?
+    /**
+     * Background task for persisting edited contact data, using the changes
+     * defined by a set of {@link EntityDelta}. This task starts
+     * {@link EmptyService} to make sure the background thread can finish
+     * persisting in cases where the system wants to reclaim our process.
+     */
+    public static class PersistTask extends
+            WeakAsyncTask<EntityDeltaList, Void, Integer, ContactEditorFragment> {
+        private static final int PERSIST_TRIES = 3;
+
+        private static final int RESULT_UNCHANGED = 0;
+        private static final int RESULT_SUCCESS = 1;
+        private static final int RESULT_FAILURE = 2;
+
+        private final Context mContext;
+
+        private WeakReference<ProgressDialog> mProgress;
+
+        private int mSaveMode;
+        private Uri mContactLookupUri = null;
+
+        public PersistTask(ContactEditorFragment target, int saveMode) {
+            super(target);
+            mSaveMode = saveMode;
+            mContext = target.mContext;
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        protected void onPreExecute(ContactEditorFragment target) {
+            mProgress = new WeakReference<ProgressDialog>(ProgressDialog.show(target.getActivity(),
+                    null, target.getActivity().getText(R.string.savingContact)));
+
+            // Before starting this task, start an empty service to protect our
+            // process from being reclaimed by the system.
+            mContext.startService(new Intent(mContext, EmptyService.class));
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        protected Integer doInBackground(ContactEditorFragment target, EntityDeltaList... params) {
+            final ContentResolver resolver = mContext.getContentResolver();
+
+            EntityDeltaList state = params[0];
+
+            // Attempt to persist changes
+            int tries = 0;
+            Integer result = RESULT_FAILURE;
+            while (tries++ < PERSIST_TRIES) {
+                try {
+                    // Build operations and try applying
+                    final ArrayList<ContentProviderOperation> diff = state.buildDiff();
+                    ContentProviderResult[] results = null;
+                    if (!diff.isEmpty()) {
+                        results = resolver.applyBatch(ContactsContract.AUTHORITY, diff);
+                    }
+
+                    final long rawContactId = getRawContactId(state, diff, results);
+                    if (rawContactId != -1) {
+                        final Uri rawContactUri = ContentUris.withAppendedId(
+                                RawContacts.CONTENT_URI, rawContactId);
+
+                        // convert the raw contact URI to a contact URI
+                        mContactLookupUri = RawContacts.getContactLookupUri(resolver,
+                                rawContactUri);
+                        Log.d(TAG, "Looked up RawContact Uri " + rawContactUri +
+                                " into ContactLookupUri " + mContactLookupUri);
+                    } else {
+                        Log.w(TAG, "Could not determine RawContact ID after save");
+                    }
+                    result = (diff.size() > 0) ? RESULT_SUCCESS : RESULT_UNCHANGED;
+                    break;
+
+                } catch (RemoteException e) {
+                    // Something went wrong, bail without success
+                    Log.e(TAG, "Problem persisting user edits", e);
+                    break;
+
+                } catch (OperationApplicationException e) {
+                    // Version consistency failed, re-parent change and try again
+                    Log.w(TAG, "Version consistency failed, re-parenting: " + e.toString());
+                    final EntityDeltaList newState = EntityDeltaList.fromQuery(resolver,
+                            target.mQuerySelection, null, null);
+                    state = EntityDeltaList.mergeAfter(newState, state);
+                }
+            }
+
+            return result;
+        }
+
+        private long getRawContactId(EntityDeltaList state,
+                final ArrayList<ContentProviderOperation> diff,
+                final ContentProviderResult[] results) {
+            long rawContactId = state.findRawContactId();
+            if (rawContactId != -1) {
+                return rawContactId;
+            }
+
+
+            // we gotta do some searching for the id
+            final int diffSize = diff.size();
+            for (int i = 0; i < diffSize; i++) {
+                ContentProviderOperation operation = diff.get(i);
+                if (operation.getType() == ContentProviderOperation.TYPE_INSERT
+                        && operation.getUri().getEncodedPath().contains(
+                                RawContacts.CONTENT_URI.getEncodedPath())) {
+                    return ContentUris.parseId(results[i].uri);
+                }
+            }
+            return -1;
+        }
+
+        /** {@inheritDoc} */
+        @Override
+        protected void onPostExecute(ContactEditorFragment target, Integer result) {
+            Log.d(TAG, "onPostExecute(something," + result + "). mSaveMode=" + mSaveMode);
+            if (result == RESULT_SUCCESS && mSaveMode != SaveMode.JOIN) {
+                Toast.makeText(mContext, R.string.contactSavedToast, Toast.LENGTH_SHORT).show();
+            } else if (result == RESULT_FAILURE) {
+                Toast.makeText(mContext, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
+            }
+
+            final ProgressDialog progress = mProgress.get();
+            if (progress != null && progress.isShowing()) {
+                try {
+                    progress.dismiss();
+                } catch (Exception e) {
+                    // this can happen if our view has already been closed. this can safely be
+                    // ignored
+                }
+            }
+
+            // Stop the service that was protecting us
+            mContext.stopService(new Intent(mContext, EmptyService.class));
+
+            target.onSaveCompleted(result != RESULT_FAILURE, mSaveMode, mContactLookupUri);
+        }
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        outState.putParcelable(KEY_URI, mLookupUri);
+        outState.putString(KEY_ACTION, mAction);
+
+        if (hasValidState()) {
+            // Store entities with modifications
+            outState.putParcelable(KEY_EDIT_STATE, mState);
+        }
+
+        outState.putLong(KEY_RAW_CONTACT_ID_REQUESTING_PHOTO, mRawContactIdRequestingPhoto);
+        outState.putParcelable(KEY_VIEW_ID_GENERATOR, mViewIdGenerator);
+        if (mCurrentPhotoFile != null) {
+            outState.putString(KEY_CURRENT_PHOTO_FILE, mCurrentPhotoFile.toString());
+        }
+        outState.putString(KEY_QUERY_SELECTION, mQuerySelection);
+        outState.putLong(KEY_CONTACT_ID_FOR_JOIN, mContactIdForJoin);
+        outState.putLong(KEY_SHOW_JOIN_SUGGESTIONS, mAggregationSuggestionsRawContactId);
+        super.onSaveInstanceState(outState);
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        // Ignore failed requests
+        if (resultCode != Activity.RESULT_OK) return;
+        switch (requestCode) {
+            case REQUEST_CODE_PHOTO_PICKED_WITH_DATA: {
+                // As we are coming back to this view, the editor will be reloaded automatically,
+                // which will cause the photo that is set here to disappear. To prevent this,
+                // we remember to set a flag which is interpreted after loading.
+                // This photo is set here already to reduce flickering.
+                mPhoto = data.getParcelableExtra("data");
+                setPhoto(mRawContactIdRequestingPhoto, mPhoto);
+                mRawContactIdRequestingPhotoAfterLoad = mRawContactIdRequestingPhoto;
+                mRawContactIdRequestingPhoto = -1;
+
+                break;
+            }
+            case REQUEST_CODE_CAMERA_WITH_DATA: {
+                doCropPhoto(mCurrentPhotoFile);
+                break;
+            }
+            case REQUEST_CODE_JOIN: {
+                if (data != null) {
+                    final long contactId = ContentUris.parseId(data.getData());
+                    joinAggregate(contactId);
+                }
+                break;
+            }
+        }
+    }
+
+    /**
+     * Sets the photo stored in mPhoto and writes it to the RawContact with the given id
+     */
+    private void setPhoto(long rawContact, Bitmap photo) {
+        BaseRawContactEditorView requestingEditor = getContactEditorView(rawContact);
+        if (requestingEditor != null) {
+            requestingEditor.setPhotoBitmap(photo);
+        } else {
+            Log.w(TAG, "The contact that requested the photo is no longer present.");
+        }
+    }
+
+    /**
+     * Finds raw contact editor view for the given rawContactId.
+     */
+    public BaseRawContactEditorView getContactEditorView(long rawContactId) {
+        for (int i = 0; i < mContent.getChildCount(); i++) {
+            final View childView = mContent.getChildAt(i);
+            if (childView instanceof BaseRawContactEditorView) {
+                final BaseRawContactEditorView editor = (BaseRawContactEditorView) childView;
+                if (editor.getRawContactId() == rawContactId) {
+                    return editor;
+                }
+            }
+        }
+        return null;
+    }
+
+    public Uri getLookupUri() {
+        return mLookupUri;
+    }
+
+    /**
+     * The listener for the data loader
+     */
+    private final LoaderManager.LoaderCallbacks<ContactLoader.Result> mDataLoaderListener =
+            new LoaderCallbacks<ContactLoader.Result>() {
+        @Override
+        public Loader<ContactLoader.Result> onCreateLoader(int id, Bundle args) {
+            mLoaderStartTime = SystemClock.elapsedRealtime();
+            return new ContactLoader(mContext, mLookupUri);
+        }
+
+        @Override
+        public void onLoadFinished(Loader<ContactLoader.Result> loader, ContactLoader.Result data) {
+            final long loaderCurrentTime = SystemClock.elapsedRealtime();
+            Log.v(TAG, "Time needed for loading: " + (loaderCurrentTime-mLoaderStartTime));
+            if (data == ContactLoader.Result.NOT_FOUND || data == ContactLoader.Result.ERROR) {
+                // Item has been deleted
+                Log.i(TAG, "No contact found. Closing activity");
+                if (mListener != null) mListener.onContactNotFound();
+                return;
+            }
+
+            mStatus = Status.EDITING;
+            final long setDataStartTime = SystemClock.elapsedRealtime();
+            setData(data);
+            final long setDataEndTime = SystemClock.elapsedRealtime();
+
+            // If we are coming back from the photo trimmer, this will be set.
+            if (mRawContactIdRequestingPhotoAfterLoad != -1) {
+                setPhoto(mRawContactIdRequestingPhotoAfterLoad, mPhoto);
+                mRawContactIdRequestingPhotoAfterLoad = -1;
+                mPhoto = null;
+            }
+            Log.v(TAG, "Time needed for setting UI: " + (setDataEndTime-setDataStartTime));
+        }
+    };
+
+    /**
+     * The listener for the group meta data loader
+     */
+    private final LoaderManager.LoaderCallbacks<Cursor> mGroupLoaderListener =
+            new LoaderCallbacks<Cursor>() {
+
+        @Override
+        public CursorLoader onCreateLoader(int id, Bundle args) {
+            return new GroupMetaDataLoader(mContext);
+        }
+
+        @Override
+        public void onLoadFinished(Loader<Cursor> loader, Cursor data) {
+            mGroupMetaData = data;
+            bindGroupMetaData();
+        }
+    };
+
+    @Override
+    public void onSplitContactConfirmed() {
+        mState.markRawContactsForSplitting();
+        doSaveAction(SaveMode.SPLIT);
+    }
+
+    /**
+     * Launches Camera to take a picture and store it in a file.
+     */
+    @Override
+    public void onTakePhotoChosen() {
+        try {
+            // Launch camera to take photo for selected contact
+            PHOTO_DIR.mkdirs();
+            mCurrentPhotoFile = new File(PHOTO_DIR, getPhotoFileName());
+            final Intent intent = getTakePickIntent(mCurrentPhotoFile);
+
+            startActivityForResult(intent, REQUEST_CODE_CAMERA_WITH_DATA);
+        } catch (ActivityNotFoundException e) {
+            Toast.makeText(mContext, R.string.photoPickerNotFoundText, Toast.LENGTH_LONG).show();
+        }
+    }
+
+    /**
+     * Launches Gallery to pick a photo.
+     */
+    @Override
+    public void onPickFromGalleryChosen() {
+        try {
+            // Launch picker to choose photo for selected contact
+            final Intent intent = getPhotoPickIntent();
+            startActivityForResult(intent, REQUEST_CODE_PHOTO_PICKED_WITH_DATA);
+        } catch (ActivityNotFoundException e) {
+            Toast.makeText(mContext, R.string.photoPickerNotFoundText, Toast.LENGTH_LONG).show();
+        }
+    }
+
+    /**
+     * Account was chosen in the selector. Create a RawContact for this account now
+     */
+    @Override
+    public void onAccountChosen(Account account, boolean isNewContact) {
+        createContact(account, isNewContact);
+    }
+
+    /**
+     * The account selector has been aborted. If we are in "New" mode, we have to close now
+     */
+    @Override
+    public void onAccountSelectorCancelled() {
+        if (!hasValidState() && mListener != null) {
+            mListener.onAccountSelectorAborted();
+        }
+    }
+
+    /**
+     * User has chosen to set the selected photo as the (super) primary photo
+     */
+    @Override
+    public void onUseAsPrimaryChosen(long rawContactId) {
+        // Set the IsSuperPrimary for each editor
+        int count = mContent.getChildCount();
+        for (int i = 0; i < count; i++) {
+            final View childView = mContent.getChildAt(i);
+            if (childView instanceof BaseRawContactEditorView) {
+                final BaseRawContactEditorView editor = (BaseRawContactEditorView) childView;
+                final PhotoEditorView photoEditor = editor.getPhotoEditor();
+                photoEditor.setSuperPrimary(editor.getRawContactId() == rawContactId);
+            }
+        }
+    }
+
+    /**
+     * User has chosen to remove a picture
+     */
+    @Override
+    public void onRemovePictureChose(long rawContactId) {
+        // find the correct editor and remove it's photo
+        final int editorCount = mContent.getChildCount();
+        for (int i = 0; i < editorCount; i++) {
+            final View child = mContent.getChildAt(i);
+            if (child instanceof BaseRawContactEditorView) {
+                final BaseRawContactEditorView editor =
+                    (BaseRawContactEditorView) child;
+                if (editor.getRawContactId() == rawContactId) {
+                    editor.setPhotoBitmap(null);
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * User has chosen to change a picture
+     */
+    @Override
+    public void onChangePictureChosen(long rawContactId) {
+        // Pick a new photo for the contact
+        doPickPhotoAction(rawContactId);
+    }
+}
diff --git a/src/com/android/contacts/views/editor/Editor.java b/src/com/android/contacts/views/editor/Editor.java
new file mode 100644
index 0000000..00d1d62
--- /dev/null
+++ b/src/com/android/contacts/views/editor/Editor.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+
+import android.provider.ContactsContract.Data;
+
+/**
+ * Generic definition of something that edits a {@link Data} row through an
+ * {@link ValuesDelta} object.
+ */
+public interface Editor {
+    /**
+     * Listener for an {@link Editor}, usually to handle deleted items.
+     */
+    public interface EditorListener {
+        /**
+         * Called when the given {@link Editor} has been deleted.
+         */
+        public void onDeleted(Editor editor);
+
+        /**
+         * Called when the given {@link Editor} has a request, for example it
+         * wants to select a photo.
+         */
+        public void onRequest(int request);
+
+        public static final int REQUEST_PICK_PHOTO = 1;
+        public static final int FIELD_CHANGED = 2;
+
+        // The editor has switched between different representations of the same
+        // data, e.g. from full name to structured name
+        public static final int EDITOR_FORM_CHANGED = 3;
+    }
+
+    /**
+     * Prepare this editor for the given {@link ValuesDelta}, which
+     * builds any needed views. Any changes performed by the user will be
+     * written back to that same object.
+     */
+    public void setValues(DataKind kind, ValuesDelta values, EntityDelta state, boolean readOnly,
+            ViewIdGenerator vig);
+
+    public void setDeletable(boolean deletable);
+
+    /**
+     * Add a specific {@link EditorListener} to this {@link Editor}.
+     */
+    public void setEditorListener(EditorListener listener);
+
+    /**
+     * Called internally when the contents of a specific field have changed,
+     * allowing advanced editors to persist data in a specific way.
+     */
+    public void onFieldChanged(String column, String value);
+}
diff --git a/src/com/android/contacts/views/editor/FieldEditorView.java b/src/com/android/contacts/views/editor/FieldEditorView.java
new file mode 100644
index 0000000..785363c
--- /dev/null
+++ b/src/com/android/contacts/views/editor/FieldEditorView.java
@@ -0,0 +1,688 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.ContactsUtils;
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.BaseAccountType.EditField;
+import com.android.contacts.model.BaseAccountType.EditType;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.EntityModifier;
+import com.android.contacts.util.DialogManager;
+import com.android.contacts.util.DialogManager.DialogShowingView;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Entity;
+import android.content.res.Resources;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.telephony.PhoneNumberFormattingTextWatcher;
+import android.text.Editable;
+import android.text.InputType;
+import android.text.TextWatcher;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.inputmethod.EditorInfo;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.ImageButton;
+import android.widget.LinearLayout;
+import android.widget.PopupMenu;
+
+import java.util.List;
+
+/**
+ * Simple editor that handles labels and any {@link EditField} defined for
+ * the entry. Uses {@link ValuesDelta} to read any existing
+ * {@link Entity} values, and to correctly write any changes values.
+ */
+public class FieldEditorView extends ViewGroup implements Editor, DialogShowingView {
+    private static final String DIALOG_ID_KEY = "dialog_id";
+    private static final int DIALOG_ID_CUSTOM = 1;
+
+    private static final int INPUT_TYPE_CUSTOM = EditorInfo.TYPE_CLASS_TEXT
+            | EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS;
+
+    private Button mLabel;
+    private ImageButton mDelete;
+    private ImageButton mMoreOrLess;
+
+    private DataKind mKind;
+    private ValuesDelta mEntry;
+    private EntityDelta mState;
+    private boolean mReadOnly;
+    private EditText[] mFieldEditTexts = null;
+
+    private boolean mHasShortAndLongForms;
+    private boolean mHideOptional = true;
+
+    private EditType mType;
+    // Used only when a user tries to use custom label.
+    private EditType mPendingType;
+
+    private ViewIdGenerator mViewIdGenerator;
+    private DialogManager mDialogManager = null;
+    private EditorListener mListener;
+
+
+
+    public FieldEditorView(Context context) {
+        super(context);
+    }
+
+    public FieldEditorView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public FieldEditorView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        // Subtract padding from the borders ==> x1 variables
+        int l1 = getPaddingLeft();
+        int t1 = getPaddingTop();
+        int r1 = getMeasuredWidth() - getPaddingRight();
+        int b1 = getMeasuredHeight() - getPaddingBottom();
+
+        // Label Button
+        final boolean hasLabel = mLabel != null;
+
+        if (hasLabel) {
+            mLabel.layout(
+                    l1, t1,
+                    l1 + mLabel.getMeasuredWidth(), t1 + mLabel.getMeasuredHeight());
+        }
+
+        // Delete Button
+        final boolean hasDelete = mDelete != null;
+        if (hasDelete) {
+            mDelete.layout(
+                    r1 - mDelete.getMeasuredWidth(), b1 - mDelete.getMeasuredHeight(),
+                    r1, b1);
+        }
+
+        // MoreOrLess Button
+        final boolean hasMoreOrLess = mMoreOrLess != null;
+        if (hasMoreOrLess) {
+            mMoreOrLess.layout(
+                    r1 - mMoreOrLess.getMeasuredWidth(), b1 - mMoreOrLess.getMeasuredHeight(),
+                    r1, b1);
+        }
+
+        // Fields
+        // Subtract buttons left and right if necessary
+        final int l2 = hasLabel ? l1 + mLabel.getMeasuredWidth() : l1;
+        final int r2 = r1 - Math.max(
+                hasDelete ? mDelete.getMeasuredWidth() : 0,
+                hasMoreOrLess ? mMoreOrLess.getMeasuredWidth() : 0);
+        int y = t1;
+        if (mFieldEditTexts != null) {
+            for (EditText editText : mFieldEditTexts) {
+                if (editText.getVisibility() != View.GONE) {
+                    int height = editText.getMeasuredHeight();
+                    editText.layout(
+                            l2, t1 + y,
+                            r2, t1 + y + height);
+                    y += height;
+                }
+            }
+        }
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        measureChildren(widthMeasureSpec, heightMeasureSpec);
+
+        // summarize the EditText heights
+        int totalHeight = 0;
+        int visibleFieldCount = 0;
+        EditText firstVisibleField = null;
+        if (mFieldEditTexts != null) {
+            for (EditText editText : mFieldEditTexts) {
+                if (editText.getVisibility() != View.GONE) {
+                    visibleFieldCount ++;
+                    if (firstVisibleField == null) {
+                        firstVisibleField = editText;
+                    }
+                    totalHeight += editText.getMeasuredHeight();
+                }
+            }
+        }
+
+        int padding = getPaddingTop() + getPaddingBottom();
+        int minHeight = padding;
+
+        if (mMoreOrLess != null) {
+            minHeight += mMoreOrLess.getMeasuredHeight();
+        }
+
+        if (mDelete != null) {
+            minHeight += mDelete.getMeasuredHeight();
+        }
+
+        totalHeight = Math.max(minHeight, totalHeight);
+
+        setMeasuredDimension(getDefaultSize(getSuggestedMinimumWidth(), widthMeasureSpec),
+                resolveSize(totalHeight, heightMeasureSpec));
+    }
+
+    /**
+     * Creates or removes the type/label button. Doesn't do anything if already correctly configured
+     */
+    private void setupLabelButton(boolean shouldExist) {
+        if (shouldExist && mLabel == null) {
+            mLabel = new Button(mContext);
+            mLabel.setBackgroundResource(R.drawable.temp_type_selector_background);
+            final int width =
+                    mContext.getResources().getDimensionPixelSize(R.dimen.editor_type_label_width);
+            mLabel.setLayoutParams(new LayoutParams(width, LayoutParams.WRAP_CONTENT));
+            mLabel.setOnClickListener(new OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    showLabelPopupMenu();
+                }
+            });
+            addView(mLabel);
+        } else if (!shouldExist && mLabel != null) {
+            removeView(mLabel);
+            mLabel = null;
+        }
+    }
+
+    /**
+     * Creates or removes the remove button. Doesn't do anything if already correctly configured
+     */
+    private void setupDeleteButton(boolean shouldExist) {
+        if (shouldExist && mDelete == null) {
+            mDelete = new ImageButton(mContext);
+            mDelete.setBackgroundDrawable(null);
+            mDelete.setImageResource(R.drawable.btn_minus);
+            final Resources resources = mContext.getResources();
+            mDelete.setPadding(
+                    resources.getDimensionPixelOffset(R.dimen.editor_round_button_padding_left),
+                    resources.getDimensionPixelOffset(R.dimen.editor_round_button_padding_top),
+                    resources.getDimensionPixelOffset(R.dimen.editor_round_button_padding_right),
+                    resources.getDimensionPixelOffset(R.dimen.editor_round_button_padding_bottom));
+            mDelete.setContentDescription(
+                    getResources().getText(R.string.description_minus_button));
+            mDelete.setLayoutParams(
+                    new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+            mDelete.setOnClickListener(new OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    // Keep around in model, but mark as deleted
+                    mEntry.markDeleted();
+
+                    ((ViewGroup) getParent()).removeView(FieldEditorView.this);
+
+                    if (mListener != null) {
+                        // Notify listener when present
+                        mListener.onDeleted(FieldEditorView.this);
+                    }
+                }
+            });
+            addView(mDelete);
+        } else if (!shouldExist && mDelete != null) {
+            removeView(mDelete);
+            mDelete = null;
+        }
+    }
+
+    /**
+     * Creates or removes the type/label button. Doesn't do anything if already correctly configured
+     */
+    private void setupMoreOrLessButton(boolean shouldExist, boolean collapsed) {
+        if (shouldExist) {
+            if (mMoreOrLess == null) {
+                // Unfortunately, the style passed as constructor-parameter is mostly ignored,
+                // so we have to set the Background and Image seperately. However, if it is not
+                // given, the size of the control is wrong
+                mMoreOrLess = new ImageButton(mContext, null, R.style.EmptyButton);
+                mMoreOrLess.setLayoutParams(
+                        new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+                mMoreOrLess.setBackgroundResource(R.drawable.btn_circle);
+                mMoreOrLess.setOnClickListener(new OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        // Save focus
+                        final View focusedChild = getFocusedChild();
+                        final int focusedViewId = focusedChild == null ? -1 : focusedChild.getId();
+
+                        // Reconfigure GUI
+                        mHideOptional = !mHideOptional;
+                        onOptionalFieldVisibilityChange();
+                        rebuildValues();
+
+                        // Restore focus
+                        View newFocusView = findViewById(focusedViewId);
+                        if (newFocusView == null || newFocusView.getVisibility() == GONE) {
+                            // find first visible child
+                            newFocusView = FieldEditorView.this;
+                        }
+                        if (newFocusView != null) {
+                            newFocusView.requestFocus();
+                        }
+                    }
+                });
+                addView(mMoreOrLess);
+            }
+            mMoreOrLess.setImageResource(
+                    collapsed ? R.drawable.ic_btn_round_more : R.drawable.ic_btn_round_less);
+        } else if (mMoreOrLess != null) {
+            removeView(mMoreOrLess);
+            mMoreOrLess = null;
+        }
+    }
+
+    protected void onOptionalFieldVisibilityChange() {
+        if (mListener != null) {
+            mListener.onRequest(EditorListener.EDITOR_FORM_CHANGED);
+        }
+    }
+
+    @Override
+    public void setEditorListener(EditorListener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    public void setDeletable(boolean deletable) {
+        setupDeleteButton(deletable);
+    }
+
+    @Override
+    public void setEnabled(boolean enabled) {
+        if (mLabel != null) mLabel.setEnabled(enabled);
+
+        if (mFieldEditTexts != null) {
+            for (int index = 0; index < mFieldEditTexts.length; index++) {
+                mFieldEditTexts[index].setEnabled(enabled);
+            }
+        }
+        if (mDelete != null) mDelete.setEnabled(enabled);
+        if (mMoreOrLess != null) mMoreOrLess.setEnabled(enabled);
+    }
+
+    /**
+     * Returns true if the editor is currently configured to show optional fields.
+     */
+    public boolean areOptionalFieldsVisible() {
+        return !mHideOptional;
+    }
+
+    public boolean hasShortAndLongForms() {
+        return mHasShortAndLongForms;
+    }
+
+    /**
+     * Build the current label state based on selected {@link EditType} and
+     * possible custom label string.
+     */
+    private void rebuildLabel() {
+        if (mLabel == null) return;
+        // Handle undetected types
+        if (mType == null) {
+            mLabel.setText(R.string.unknown);
+            return;
+        }
+
+        if (mType.customColumn != null) {
+            // Use custom label string when present
+            final String customText = mEntry.getAsString(mType.customColumn);
+            if (customText != null) {
+                mLabel.setText(customText);
+                return;
+            }
+        }
+
+        // Otherwise fall back to using default label
+        mLabel.setText(mType.labelRes);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public void onFieldChanged(String column, String value) {
+        // Field changes are saved directly
+        mEntry.put(column, value);
+        if (mListener != null) {
+            mListener.onRequest(EditorListener.FIELD_CHANGED);
+        }
+    }
+
+    private void rebuildValues() {
+        setValues(mKind, mEntry, mState, mReadOnly, mViewIdGenerator);
+    }
+
+    /**
+     * Prepare this editor using the given {@link DataKind} for defining
+     * structure and {@link ValuesDelta} describing the content to edit.
+     */
+    @Override
+    public void setValues(DataKind kind, ValuesDelta entry, EntityDelta state, boolean readOnly,
+            ViewIdGenerator vig) {
+        mKind = kind;
+        mEntry = entry;
+        mState = state;
+        mReadOnly = readOnly;
+        mViewIdGenerator = vig;
+        setId(vig.getId(state, kind, entry, ViewIdGenerator.NO_VIEW_INDEX));
+
+        final boolean enabled = !readOnly;
+
+        if (!entry.isVisible()) {
+            // Hide ourselves entirely if deleted
+            setVisibility(View.GONE);
+            return;
+        }
+        setVisibility(View.VISIBLE);
+
+        // Display label selector if multiple types available
+        final boolean hasTypes = EntityModifier.hasEditTypes(kind);
+        setupLabelButton(hasTypes);
+        if (mLabel != null) mLabel.setEnabled(enabled);
+        if (hasTypes) {
+            mType = EntityModifier.getCurrentType(entry, kind);
+            rebuildLabel();
+        }
+
+        // Remove edit texts that we currently have
+        if (mFieldEditTexts != null) {
+            for (EditText fieldEditText : mFieldEditTexts) {
+                removeView(fieldEditText);
+            }
+        }
+        boolean hidePossible = false;
+
+        int fieldCount = kind.fieldList.size();
+        mFieldEditTexts = new EditText[fieldCount];
+        for (int index = 0; index < fieldCount; index++) {
+            final EditField field = kind.fieldList.get(index);
+            final EditText fieldView = new EditText(mContext);
+            fieldView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+                    LayoutParams.WRAP_CONTENT));
+            fieldView.setGravity(Gravity.TOP);
+            mFieldEditTexts[index] = fieldView;
+            fieldView.setId(vig.getId(state, kind, entry, index));
+            if (field.titleRes > 0) {
+                fieldView.setHint(field.titleRes);
+            }
+            int inputType = field.inputType;
+            fieldView.setInputType(inputType);
+            if (inputType == InputType.TYPE_CLASS_PHONE) {
+                fieldView.addTextChangedListener(new PhoneNumberFormattingTextWatcher(
+                        ContactsUtils.getCurrentCountryIso(mContext)));
+            }
+            fieldView.setMinLines(field.minLines);
+
+            // Read current value from state
+            final String column = field.column;
+            final String value = entry.getAsString(column);
+            fieldView.setText(value);
+
+            // Prepare listener for writing changes
+            fieldView.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void afterTextChanged(Editable s) {
+                    // Trigger event for newly changed value
+                    onFieldChanged(column, s.toString());
+                }
+
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+                }
+
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                }
+            });
+
+            fieldView.setEnabled(enabled);
+
+            if (field.shortForm) {
+                hidePossible = true;
+                mHasShortAndLongForms = true;
+                fieldView.setVisibility(mHideOptional ? View.VISIBLE : View.GONE);
+            } else if (field.longForm) {
+                hidePossible = true;
+                mHasShortAndLongForms = true;
+                fieldView.setVisibility(mHideOptional ? View.GONE : View.VISIBLE);
+            } else {
+                // Hide field when empty and optional value
+                final boolean couldHide = (!ContactsUtils.isGraphic(value) && field.optional);
+                final boolean willHide = (mHideOptional && couldHide);
+                fieldView.setVisibility(willHide ? View.GONE : View.VISIBLE);
+                hidePossible = hidePossible || couldHide;
+            }
+
+            addView(fieldView);
+        }
+
+        // When hiding fields, place expandable
+        setupMoreOrLessButton(hidePossible, mHideOptional);
+        if (mMoreOrLess != null) mMoreOrLess.setEnabled(enabled);
+    }
+
+    public ValuesDelta getValues() {
+        return mEntry;
+    }
+
+    /**
+     * Prepare dialog for entering a custom label. The input value is trimmed: white spaces before
+     * and after the input text is removed.
+     * <p>
+     * If the final value is empty, this change request is ignored;
+     * no empty text is allowed in any custom label.
+     */
+    private Dialog createCustomDialog() {
+        final EditText customType = new EditText(mContext);
+        customType.setInputType(INPUT_TYPE_CUSTOM);
+        customType.requestFocus();
+
+        final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
+        builder.setTitle(R.string.customLabelPickerTitle);
+        builder.setView(customType);
+
+        builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                final String customText = customType.getText().toString().trim();
+                if (ContactsUtils.isGraphic(customText)) {
+                    // Now we're sure it's ok to actually change the type value.
+                    mType = mPendingType;
+                    mPendingType = null;
+                    mEntry.put(mKind.typeColumn, mType.rawValue);
+                    mEntry.put(mType.customColumn, customText);
+                    rebuildLabel();
+                    requestFocusForFirstEditField();
+                }
+            }
+        });
+
+        builder.setNegativeButton(android.R.string.cancel, null);
+
+        return builder.create();
+    }
+
+    /**
+     * Show PopupMenu for picking a new {@link EditType} or entering a
+     * custom label. This dialog is limited to the valid types as determined
+     * by {@link EntityModifier}.
+     */
+    public void showLabelPopupMenu() {
+        // Build list of valid types, including the current value
+        final List<EditType> validTypes = EntityModifier.getValidTypes(mState, mKind, mType);
+
+        final PopupMenu popupMenu = new PopupMenu(getContext(), mLabel);
+        final Menu menu = popupMenu.getMenu();
+
+        for (int i = 0; i < validTypes.size(); i++) {
+            final EditType type = validTypes.get(i);
+            menu.add(Menu.NONE, i, Menu.NONE, type.labelRes);
+        }
+
+        popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+            @Override
+            public boolean onMenuItemClick(MenuItem item) {
+                final EditType selected = validTypes.get(item.getItemId());
+                if (selected.customColumn != null) {
+                    // Show custom label dialog if requested by type.
+                    //
+                    // Only when the custum value input in the next step is correct one.
+                    // this method also set the type value to what the user requested here.
+                    mPendingType = selected;
+                    showDialog(DIALOG_ID_CUSTOM);
+                } else {
+                    // User picked type, and we're sure it's ok to actually write the entry.
+                    mType = selected;
+                    mEntry.put(mKind.typeColumn, mType.rawValue);
+                    rebuildLabel();
+                    requestFocusForFirstEditField();
+                }
+                return true;
+            }
+        });
+
+        popupMenu.show();
+    }
+
+    /* package */
+    void showDialog(int bundleDialogId) {
+        Bundle bundle = new Bundle();
+        bundle.putInt(DIALOG_ID_KEY, bundleDialogId);
+        getDialogManager().showDialogInView(this, bundle);
+    }
+
+    private DialogManager getDialogManager() {
+        if (mDialogManager == null) {
+            Context context = getContext();
+            if (!(context instanceof DialogManager.DialogShowingViewActivity)) {
+                throw new IllegalStateException(
+                        "View must be hosted in an Activity that implements " +
+                        "DialogManager.DialogShowingViewActivity");
+            }
+            mDialogManager = ((DialogManager.DialogShowingViewActivity)context).getDialogManager();
+        }
+        return mDialogManager;
+    }
+
+    private static class SavedState extends BaseSavedState {
+        public boolean mHideOptional;
+        public int[] mVisibilities;
+
+        SavedState(Parcelable superState) {
+            super(superState);
+        }
+
+        private SavedState(Parcel in) {
+            super(in);
+            mVisibilities = new int[in.readInt()];
+            in.readIntArray(mVisibilities);
+        }
+
+        @Override
+        public void writeToParcel(Parcel out, int flags) {
+            super.writeToParcel(out, flags);
+            out.writeInt(mVisibilities.length);
+            out.writeIntArray(mVisibilities);
+        }
+
+        public static final Parcelable.Creator<SavedState> CREATOR
+                = new Parcelable.Creator<SavedState>() {
+            @Override
+            public SavedState createFromParcel(Parcel in) {
+                return new SavedState(in);
+            }
+
+            @Override
+            public SavedState[] newArray(int size) {
+                return new SavedState[size];
+            }
+        };
+    }
+
+    /**
+     * Saves the visibility of the child EditTexts, and mHideOptional.
+     */
+    @Override
+    protected Parcelable onSaveInstanceState() {
+        Parcelable superState = super.onSaveInstanceState();
+        SavedState ss = new SavedState(superState);
+
+        ss.mHideOptional = mHideOptional;
+
+        final int numChildren = mFieldEditTexts.length;
+        ss.mVisibilities = new int[numChildren];
+        for (int i = 0; i < numChildren; i++) {
+            ss.mVisibilities[i] = mFieldEditTexts[i].getVisibility();
+        }
+
+        return ss;
+    }
+
+    /**
+     * Restores the visibility of the child EditTexts, and mHideOptional.
+     */
+    @Override
+    protected void onRestoreInstanceState(Parcelable state) {
+        SavedState ss = (SavedState) state;
+        super.onRestoreInstanceState(ss.getSuperState());
+
+        mHideOptional = ss.mHideOptional;
+
+        int numChildren = Math.min(mFieldEditTexts.length, ss.mVisibilities.length);
+        for (int i = 0; i < numChildren; i++) {
+            mFieldEditTexts[i].setVisibility(ss.mVisibilities[i]);
+        }
+    }
+
+    @Override
+    public Dialog createDialog(Bundle bundle) {
+        if (bundle == null) throw new IllegalArgumentException("bundle must not be null");
+        int dialogId = bundle.getInt(DIALOG_ID_KEY);
+        switch (dialogId) {
+            case DIALOG_ID_CUSTOM:
+                return createCustomDialog();
+            default:
+                throw new IllegalArgumentException("Invalid dialogId: " + dialogId);
+        }
+    }
+
+    private void requestFocusForFirstEditField() {
+        if (mFieldEditTexts != null && mFieldEditTexts.length != 0) {
+            boolean anyFieldHasFocus = false;
+            for (EditText editText : mFieldEditTexts) {
+                if (editText.hasFocus()) {
+                    anyFieldHasFocus = true;
+                }
+            }
+            if (!anyFieldHasFocus)
+                mFieldEditTexts[0].requestFocus();
+        }
+    }
+}
diff --git a/src/com/android/contacts/views/editor/GroupMembershipView.java b/src/com/android/contacts/views/editor/GroupMembershipView.java
new file mode 100644
index 0000000..de505b6
--- /dev/null
+++ b/src/com/android/contacts/views/editor/GroupMembershipView.java
@@ -0,0 +1,294 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.EntityModifier;
+import com.android.contacts.views.GroupMetaDataLoader;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.RawContacts;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ArrayAdapter;
+import android.widget.LinearLayout;
+import android.widget.ListPopupWindow;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * An editor for group membership.  Displays the current group membership list and
+ * brings up a dialog to change it.
+ */
+public class GroupMembershipView extends LinearLayout
+        implements OnClickListener, OnItemClickListener {
+
+    public static final class GroupSelectionItem {
+        private final long mGroupId;
+        private final String mTitle;
+        private boolean mChecked;
+
+        public GroupSelectionItem(long groupId, String title, boolean checked) {
+            this.mGroupId = groupId;
+            this.mTitle = title;
+            mChecked = checked;
+        }
+
+        public long getGroupId() {
+            return mGroupId;
+        }
+
+        public boolean isChecked() {
+            return mChecked;
+        }
+
+        public void setChecked(boolean checked) {
+            mChecked = checked;
+        }
+
+        @Override
+        public String toString() {
+            return mTitle;
+        }
+    }
+
+    private EntityDelta mState;
+    private Cursor mGroupMetaData;
+    private String mAccountName;
+    private String mAccountType;
+    private TextView mGroupList;
+    private ArrayAdapter<GroupSelectionItem> mAdapter;
+    private long mDefaultGroupId;
+    private long mFavoritesGroupId;
+    private ListPopupWindow mPopup;
+    private DataKind mKind;
+    private boolean mDefaultGroupVisibilityKnown;
+    private boolean mDefaultGroupVisible;
+
+    public GroupMembershipView(Context context) {
+        super(context);
+    }
+
+    public GroupMembershipView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public void setKind(DataKind kind) {
+        mKind = kind;
+        TextView kindTitle = (TextView) findViewById(R.id.kind_title);
+        kindTitle.setText(kind.titleRes);
+    }
+
+    public void setGroupMetaData(Cursor groupMetaData) {
+        this.mGroupMetaData = groupMetaData;
+        updateView();
+    }
+
+    public void setState(EntityDelta state) {
+        mState = state;
+        ValuesDelta values = state.getValues();
+        mAccountType = values.getAsString(RawContacts.ACCOUNT_TYPE);
+        mAccountName = values.getAsString(RawContacts.ACCOUNT_NAME);
+        mDefaultGroupVisibilityKnown = false;
+        updateView();
+    }
+
+    private void updateView() {
+        if (mGroupMetaData == null || mGroupMetaData.isClosed() || mAccountType == null
+                || mAccountName == null) {
+            setVisibility(GONE);
+            return;
+        }
+
+        boolean accountHasGroups = false;
+        mFavoritesGroupId = 0;
+        mDefaultGroupId = 0;
+
+        StringBuilder sb = new StringBuilder();
+        mGroupMetaData.moveToPosition(-1);
+        while (mGroupMetaData.moveToNext()) {
+            String accountName = mGroupMetaData.getString(GroupMetaDataLoader.ACCOUNT_NAME);
+            String accountType = mGroupMetaData.getString(GroupMetaDataLoader.ACCOUNT_TYPE);
+            if (accountName.equals(mAccountName) && accountType.equals(mAccountType)) {
+                long groupId = mGroupMetaData.getLong(GroupMetaDataLoader.GROUP_ID);
+                if (!mGroupMetaData.isNull(GroupMetaDataLoader.FAVORITES)
+                        && mGroupMetaData.getInt(GroupMetaDataLoader.FAVORITES) != 0) {
+                    mFavoritesGroupId = groupId;
+                } else if (!mGroupMetaData.isNull(GroupMetaDataLoader.AUTO_ADD)
+                            && mGroupMetaData.getInt(GroupMetaDataLoader.AUTO_ADD) != 0) {
+                    mDefaultGroupId = groupId;
+                } else {
+                    accountHasGroups = true;
+                }
+
+                // Exclude favorites from the list - they are handled with special UI (star)
+                // Also exclude the default group.
+                if (groupId != mFavoritesGroupId && groupId != mDefaultGroupId
+                        && hasMembership(groupId)) {
+                    String title = mGroupMetaData.getString(GroupMetaDataLoader.TITLE);
+                    if (sb.length() != 0) {
+                        sb.append(", ");
+                    }
+                    sb.append(title);
+                }
+            }
+        }
+
+        if (!accountHasGroups) {
+            setVisibility(GONE);
+            return;
+        }
+
+        if (mGroupList == null) {
+            mGroupList = (TextView) findViewById(R.id.group_list);
+            setOnClickListener(this);
+        }
+
+        mGroupList.setText(sb);
+        setVisibility(VISIBLE);
+
+        if (!mDefaultGroupVisibilityKnown) {
+            // Only show the default group (My Contacts) if the contact is NOT in it
+            mDefaultGroupVisible = mDefaultGroupId != 0 && !hasMembership(mDefaultGroupId);
+            mDefaultGroupVisibilityKnown = true;
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (mPopup != null && mPopup.isShowing()) {
+            mPopup.dismiss();
+            return;
+        }
+
+        mAdapter = new ArrayAdapter<GroupSelectionItem>(
+                getContext(), android.R.layout.simple_list_item_multiple_choice);
+
+        mGroupMetaData.moveToPosition(-1);
+        while (mGroupMetaData.moveToNext()) {
+            String accountName = mGroupMetaData.getString(GroupMetaDataLoader.ACCOUNT_NAME);
+            String accountType = mGroupMetaData.getString(GroupMetaDataLoader.ACCOUNT_TYPE);
+            if (accountName.equals(mAccountName) && accountType.equals(mAccountType)) {
+                long groupId = mGroupMetaData.getLong(GroupMetaDataLoader.GROUP_ID);
+                if (groupId != mFavoritesGroupId
+                        && (groupId != mDefaultGroupId || mDefaultGroupVisible)) {
+                    String title = mGroupMetaData.getString(GroupMetaDataLoader.TITLE);
+                    boolean checked = hasMembership(groupId);
+                    mAdapter.add(new GroupSelectionItem(groupId, title, checked));
+                }
+            }
+        }
+
+        mPopup = new ListPopupWindow(getContext(), null);
+        mPopup.setAnchorView(mGroupList);
+        mPopup.setAdapter(mAdapter);
+        mPopup.setModal(true);
+        mPopup.show();
+
+        ListView listView = mPopup.getListView();
+        listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
+        int count = mAdapter.getCount();
+        for (int i = 0; i < count; i++) {
+            listView.setItemChecked(i, mAdapter.getItem(i).isChecked());
+        }
+
+        listView.setOnItemClickListener(this);
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mPopup != null) {
+            mPopup.dismiss();
+        }
+    }
+
+    @Override
+    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+        ListView list = (ListView) parent;
+        int count = mAdapter.getCount();
+        for (int i = 0; i < count; i++) {
+            mAdapter.getItem(i).setChecked(list.isItemChecked(i));
+        }
+
+        // First remove the memberships that have been unchecked
+        ArrayList<ValuesDelta> entries = mState.getMimeEntries(GroupMembership.CONTENT_ITEM_TYPE);
+        if (entries != null) {
+            for (ValuesDelta entry : entries) {
+                if (!entry.isDelete()) {
+                    Long groupId = entry.getAsLong(GroupMembership.GROUP_ROW_ID);
+                    if (groupId != null && groupId != mFavoritesGroupId
+                            && !isGroupChecked(groupId)) {
+                        entry.markDeleted();
+                    }
+                }
+            }
+        }
+
+        // Now add the newly selected items
+        for (int i = 0; i < count; i++) {
+            GroupSelectionItem item = mAdapter.getItem(i);
+            long groupId = item.getGroupId();
+            if (item.isChecked() && !hasMembership(groupId)) {
+                ValuesDelta entry = EntityModifier.insertChild(mState, mKind);
+                entry.put(GroupMembership.GROUP_ROW_ID, groupId);
+            }
+        }
+
+        updateView();
+    }
+
+    private boolean isGroupChecked(long groupId) {
+        int count = mAdapter.getCount();
+        for (int i = 0; i < count; i++) {
+            GroupSelectionItem item = mAdapter.getItem(i);
+            if (groupId == item.getGroupId()) {
+                return item.isChecked();
+            }
+        }
+        return false;
+    }
+
+    private boolean hasMembership(long groupId) {
+        if (groupId == mDefaultGroupId && mState.isContactInsert()) {
+            return true;
+        }
+
+        ArrayList<ValuesDelta> entries = mState.getMimeEntries(GroupMembership.CONTENT_ITEM_TYPE);
+        if (entries != null) {
+            for (ValuesDelta values : entries) {
+                if (!values.isDelete()) {
+                    Long id = values.getAsLong(GroupMembership.GROUP_ROW_ID);
+                    if (id != null && id == groupId) {
+                        return true;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/views/editor/KindSectionView.java b/src/com/android/contacts/views/editor/KindSectionView.java
new file mode 100644
index 0000000..de1919c
--- /dev/null
+++ b/src/com/android/contacts/views/editor/KindSectionView.java
@@ -0,0 +1,216 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.EntityModifier;
+import com.android.contacts.views.editor.Editor.EditorListener;
+
+import android.content.Context;
+import android.provider.ContactsContract.Data;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageButton;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+/**
+ * Custom view for an entire section of data as segmented by
+ * {@link DataKind} around a {@link Data#MIMETYPE}. This view shows a
+ * section header and a trigger for adding new {@link Data} rows.
+ */
+public class KindSectionView extends LinearLayout implements EditorListener {
+    private static final String TAG = "KindSectionView";
+
+    private ViewGroup mEditors;
+    private ImageButton mAddPlusButton;
+    private TextView mTitle;
+
+    private DataKind mKind;
+    private EntityDelta mState;
+    private boolean mReadOnly;
+
+    private ViewIdGenerator mViewIdGenerator;
+
+    public KindSectionView(Context context) {
+        super(context);
+    }
+
+    public KindSectionView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onFinishInflate() {
+        setDrawingCacheEnabled(true);
+        setAlwaysDrawnWithCacheEnabled(true);
+
+        mEditors = (ViewGroup)findViewById(R.id.kind_editors);
+
+        mAddPlusButton = (ImageButton) findViewById(R.id.kind_plus);
+        mAddPlusButton.setOnClickListener(new OnClickListener() {
+            public void onClick(View v) {
+                addItem();
+            }
+        });
+
+        mTitle = (TextView)findViewById(R.id.kind_title);
+    }
+
+    /** {@inheritDoc} */
+    public void onDeleted(Editor editor) {
+        updateAddEnabled();
+        updateVisible();
+    }
+
+    /** {@inheritDoc} */
+    public void onRequest(int request) {
+        // Ignore requests
+    }
+
+    public void setState(DataKind kind, EntityDelta state, boolean readOnly, ViewIdGenerator vig) {
+        mKind = kind;
+        mState = state;
+        mReadOnly = readOnly;
+        mViewIdGenerator = vig;
+
+        setId(mViewIdGenerator.getId(state, kind, null, ViewIdGenerator.NO_VIEW_INDEX));
+
+        // TODO: handle resources from remote packages
+        mTitle.setText(kind.titleRes);
+
+        // Only show the add button if this is a list
+        mAddPlusButton.setVisibility(mKind.isList ? View.VISIBLE : View.INVISIBLE);
+
+        rebuildFromState();
+        updateAddEnabled();
+        updateVisible();
+    }
+
+    public CharSequence getTitle() {
+        return mTitle.getText();
+    }
+
+    /**
+     * Build editors for all current {@link #mState} rows.
+     */
+    public void rebuildFromState() {
+        // Remove any existing editors
+        mEditors.removeAllViews();
+
+        // Check if we are displaying anything here
+        boolean hasEntries = mState.hasMimeEntries(mKind.mimeType);
+
+        if (hasEntries) {
+            for (ValuesDelta entry : mState.getMimeEntries(mKind.mimeType)) {
+                // Skip entries that aren't visible
+                if (!entry.isVisible()) continue;
+                if (isEmptyNoop(entry)) continue;
+
+                createEditorView(entry);
+            }
+        }
+    }
+
+
+    /**
+     * Creates an EditorView for the given entry. This function must be used while constructing
+     * the views corresponding to the the object-model. The resulting EditorView is also added
+     * to the end of mEditors
+     */
+    private View createEditorView(ValuesDelta entry) {
+        final View view;
+        if (mKind.editorClass == null) {
+            view = new FieldEditorView(mContext);
+        } else {
+            try {
+                view = mKind.editorClass.getConstructor(Context.class).newInstance(
+                        mContext);
+            } catch (Exception e) {
+                throw new RuntimeException(
+                        "Cannot allocate editor for " + mKind.editorClass);
+            }
+        }
+
+        if (view instanceof Editor) {
+            Editor editor = (Editor) view;
+            editor.setValues(mKind, entry, mState, mReadOnly, mViewIdGenerator);
+            editor.setEditorListener(this);
+            editor.setDeletable(true);
+        }
+        mEditors.addView(view);
+        return view;
+    }
+
+    /**
+     * Tests whether the given item has no changes (so it exists in the database) but is empty
+     */
+    private boolean isEmptyNoop(ValuesDelta item) {
+        if (!item.isNoop()) return false;
+        final int fieldCount = mKind.fieldList.size();
+        for (int i = 0; i < fieldCount; i++) {
+            final String column = mKind.fieldList.get(i).column;
+            final String value = item.getAsString(column);
+            if (!TextUtils.isEmpty(value)) return false;
+        }
+        return true;
+    }
+
+    private void updateVisible() {
+        setVisibility(getEditorCount() != 0 ? VISIBLE : GONE);
+    }
+
+
+    protected void updateAddEnabled() {
+        // Set enabled state on the "add" view
+        final boolean canInsert = EntityModifier.canInsert(mState, mKind);
+        final boolean isEnabled = !mReadOnly && canInsert;
+        mAddPlusButton.setEnabled(isEnabled);
+    }
+
+    public void addItem() {
+        // if this is a list, we can freely add. if not, only allow adding the first
+        if (!mKind.isList && getEditorCount() == 1)
+            return;
+
+        // Insert a new child, create its view and set its focus
+        final ValuesDelta newValues = EntityModifier.insertChild(mState, mKind);
+        final View newField = createEditorView(newValues);
+        newField.requestFocus();
+
+        // For non-lists (e.g. Notes we can only have one field. in that case we need to disable
+        // the add button
+        updateAddEnabled();
+
+        // Ensure we are visible
+        updateVisible();
+    }
+
+    public int getEditorCount() {
+        return mEditors.getChildCount();
+    }
+
+    public DataKind getKind() {
+        return mKind;
+    }
+}
diff --git a/src/com/android/contacts/views/editor/ModifyPhotoDialogFragment.java b/src/com/android/contacts/views/editor/ModifyPhotoDialogFragment.java
new file mode 100644
index 0000000..7c1d713
--- /dev/null
+++ b/src/com/android/contacts/views/editor/ModifyPhotoDialogFragment.java
@@ -0,0 +1,120 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.R;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.widget.ArrayAdapter;
+import android.widget.ListAdapter;
+
+/**
+ * Shows a dialog asking the user what to do with an existing photo.
+ * The result is passed back to the Fragment that is configured by
+ * {@link Fragment#setTargetFragment(Fragment, int)}, which
+ * has to implement {@link ModifyPhotoDialogFragment.Listener}.
+ * Does not perform any action by itself.
+ */
+public class ModifyPhotoDialogFragment extends DialogFragment {
+    public static final String TAG = "PhotoDialogFragment";
+    private static final String BUNDLE_IS_READ_ONLY = "IS_READ_ONLY";
+    private static final String BUNDLE_RAW_CONTACT_ID = "RAW_CONTACT_ID";
+
+    private boolean mIsReadOnly;
+    private long mRawContactId;
+
+    public ModifyPhotoDialogFragment() {
+    }
+
+    public ModifyPhotoDialogFragment(boolean isReadOnly, long rawContactId) {
+        mIsReadOnly = isReadOnly;
+        mRawContactId = rawContactId;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (savedInstanceState != null) {
+            mIsReadOnly = savedInstanceState.getBoolean(BUNDLE_IS_READ_ONLY);
+            mRawContactId = savedInstanceState.getLong(BUNDLE_RAW_CONTACT_ID);
+        }
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putBoolean(BUNDLE_IS_READ_ONLY, mIsReadOnly);
+        outState.putLong(BUNDLE_RAW_CONTACT_ID, mRawContactId);
+    }
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Wrap our context to inflate list items using correct theme
+        final Activity context = getActivity();
+
+        final String[] choices;
+        if (mIsReadOnly) {
+            choices = new String[1];
+            choices[0] = context.getString(R.string.use_photo_as_primary);
+        } else {
+            choices = new String[3];
+            choices[0] = context.getString(R.string.use_photo_as_primary);
+            choices[1] = context.getString(R.string.removePicture);
+            choices[2] = context.getString(R.string.changePicture);
+        }
+        final ListAdapter adapter = new ArrayAdapter<String>(context,
+                android.R.layout.select_dialog_item, choices);
+
+        final DialogInterface.OnClickListener clickListener =
+            new DialogInterface.OnClickListener() {
+                @Override
+                public void onClick(DialogInterface dialog, int which) {
+                    dialog.dismiss();
+
+                    final Listener target = (Listener) getTargetFragment();
+                    switch (which) {
+                        case 0:
+                            target.onUseAsPrimaryChosen(mRawContactId);
+                            break;
+                        case 1:
+                            target.onRemovePictureChose(mRawContactId);
+                            break;
+                        case 2:
+                            target.onChangePictureChosen(mRawContactId);
+                            break;
+                    }
+                }
+            };
+
+        final AlertDialog.Builder builder = new AlertDialog.Builder(context);
+        builder.setTitle(R.string.attachToContact);
+        builder.setSingleChoiceItems(adapter, -1, clickListener);
+        return builder.create();
+    }
+
+    public interface Listener {
+        void onUseAsPrimaryChosen(long rawContactId);
+        void onRemovePictureChose(long rawContactId);
+        void onChangePictureChosen(long rawContactId);
+    }
+}
diff --git a/src/com/android/contacts/views/editor/PhotoEditorView.java b/src/com/android/contacts/views/editor/PhotoEditorView.java
new file mode 100644
index 0000000..ba3372c
--- /dev/null
+++ b/src/com/android/contacts/views/editor/PhotoEditorView.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.R;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.ImageView;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+/**
+ * Simple editor for {@link Photo}.
+ */
+public class PhotoEditorView extends ImageView implements Editor, OnClickListener {
+    private static final String TAG = "PhotoEditorView";
+
+    private ValuesDelta mEntry;
+    private EditorListener mListener;
+
+    private boolean mHasSetPhoto = false;
+    private boolean mReadOnly;
+
+    public PhotoEditorView(Context context) {
+        super(context);
+    }
+
+    public PhotoEditorView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+        this.setOnClickListener(this);
+    }
+
+    /** {@inheritDoc} */
+    public void onClick(View v) {
+        if (mListener != null) {
+            mListener.onRequest(EditorListener.REQUEST_PICK_PHOTO);
+        }
+    }
+
+    /** {@inheritDoc} */
+    public void onFieldChanged(String column, String value) {
+        throw new UnsupportedOperationException("Photos don't support direct field changes");
+    }
+
+    /** {@inheritDoc} */
+    public void setValues(DataKind kind, ValuesDelta values, EntityDelta state, boolean readOnly,
+            ViewIdGenerator vig) {
+        mEntry = values;
+        mReadOnly = readOnly;
+
+        setId(vig.getId(state, kind, values, 0));
+
+        if (values != null) {
+            // Try decoding photo if actual entry
+            final byte[] photoBytes = values.getAsByteArray(Photo.PHOTO);
+            if (photoBytes != null) {
+                final Bitmap photo = BitmapFactory.decodeByteArray(photoBytes, 0,
+                        photoBytes.length);
+
+                setScaleType(ImageView.ScaleType.CENTER_CROP);
+                setImageBitmap(photo);
+                setEnabled(true);
+                mHasSetPhoto = true;
+                mEntry.setFromTemplate(false);
+            } else {
+                resetDefault();
+            }
+        } else {
+            resetDefault();
+        }
+    }
+
+    /**
+     * Return true if a valid {@link Photo} has been set.
+     */
+    public boolean hasSetPhoto() {
+        return mHasSetPhoto;
+    }
+
+    /**
+     * Assign the given {@link Bitmap} as the new value, updating UI and
+     * readying for persisting through {@link ValuesDelta}.
+     */
+    public void setPhotoBitmap(Bitmap photo) {
+        if (photo == null) {
+            // Clear any existing photo and return
+            mEntry.put(Photo.PHOTO, (byte[])null);
+            resetDefault();
+            return;
+        }
+
+        final int size = photo.getWidth() * photo.getHeight() * 4;
+        final ByteArrayOutputStream out = new ByteArrayOutputStream(size);
+
+        try {
+            photo.compress(Bitmap.CompressFormat.PNG, 100, out);
+            out.flush();
+            out.close();
+
+            mEntry.put(Photo.PHOTO, out.toByteArray());
+            setImageBitmap(photo);
+            setEnabled(true);
+            mHasSetPhoto = true;
+            mEntry.setFromTemplate(false);
+
+            // When the user chooses a new photo mark it as super primary
+            mEntry.put(Photo.IS_SUPER_PRIMARY, 1);
+        } catch (IOException e) {
+            Log.w(TAG, "Unable to serialize photo: " + e.toString());
+        }
+    }
+
+    /**
+     * Set the super primary bit on the photo.
+     */
+    public void setSuperPrimary(boolean superPrimary) {
+        mEntry.put(Photo.IS_SUPER_PRIMARY, superPrimary ? 1 : 0);
+    }
+
+    protected void resetDefault() {
+        // Invalid photo, show default "add photo" place-holder
+        setScaleType(ImageView.ScaleType.CENTER);
+        if (mReadOnly) {
+            setImageResource(R.drawable.ic_contact_picture);
+            setEnabled(false);
+        } else {
+            setImageResource(R.drawable.ic_menu_add_picture);
+            setEnabled(true);
+        }
+        mHasSetPhoto = false;
+        mEntry.setFromTemplate(true);
+    }
+
+    /** {@inheritDoc} */
+    public void setEditorListener(EditorListener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    public void setDeletable(boolean deletable) {
+        // Photo is not deletable
+    }
+}
diff --git a/src/com/android/contacts/views/editor/PickPhotoDialogFragment.java b/src/com/android/contacts/views/editor/PickPhotoDialogFragment.java
new file mode 100644
index 0000000..5f3dfd1
--- /dev/null
+++ b/src/com/android/contacts/views/editor/PickPhotoDialogFragment.java
@@ -0,0 +1,75 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.R;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.widget.ArrayAdapter;
+import android.widget.ListAdapter;
+
+/**
+ * Shows a dialog asking the user whether to take a photo or pick a photo from the gallery.
+ * The result is passed back to the Fragment that is configured by
+ * {@link Fragment#setTargetFragment(Fragment, int)}, which
+ * has to implement {@link PickPhotoDialogFragment.Listener}.
+ * Does not perform any action by itself.
+ */
+public class PickPhotoDialogFragment extends DialogFragment {
+    public static final String TAG = "PickPhotoDialogFragment";
+
+    public PickPhotoDialogFragment() {
+    }
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        String[] choices = new String[2];
+        choices[0] = getActivity().getString(R.string.take_photo);
+        choices[1] = getActivity().getString(R.string.pick_photo);
+        final ListAdapter adapter = new ArrayAdapter<String>(getActivity(),
+                android.R.layout.select_dialog_item, choices);
+
+        final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        builder.setTitle(R.string.attachToContact);
+        builder.setSingleChoiceItems(adapter, -1, new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.dismiss();
+                final Listener targetListener = (Listener) getTargetFragment();
+                switch(which) {
+                    case 0:
+                        targetListener.onTakePhotoChosen();
+                        break;
+                    case 1:
+                        targetListener.onPickFromGalleryChosen();
+                        break;
+                }
+            }
+        });
+        return builder.create();
+    }
+
+    public interface Listener {
+        void onTakePhotoChosen();
+        void onPickFromGalleryChosen();
+    }
+}
diff --git a/src/com/android/contacts/views/editor/RawContactEditorView.java b/src/com/android/contacts/views/editor/RawContactEditorView.java
new file mode 100644
index 0000000..f9fe55d
--- /dev/null
+++ b/src/com/android/contacts/views/editor/RawContactEditorView.java
@@ -0,0 +1,271 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityModifier;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.BaseAccountType.EditType;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+
+import android.content.Context;
+import android.content.Entity;
+import android.database.Cursor;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.PopupMenu;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * Custom view that provides all the editor interaction for a specific
+ * {@link Contacts} represented through an {@link EntityDelta}. Callers can
+ * reuse this view and quickly rebuild its contents through
+ * {@link #setState(EntityDelta, BaseAccountType, ViewIdGenerator)}.
+ * <p>
+ * Internal updates are performed against {@link ValuesDelta} so that the
+ * source {@link Entity} can be swapped out. Any state-based changes, such as
+ * adding {@link Data} rows or changing {@link EditType}, are performed through
+ * {@link EntityModifier} to ensure that {@link BaseAccountType} are enforced.
+ */
+public class RawContactEditorView extends BaseRawContactEditorView {
+    private View mPhotoStub;
+    private FieldEditorView mName;
+    private GroupMembershipView mGroupMembershipView;
+
+    private ViewGroup mFields;
+
+    private View mHeader;
+    private View mBody;
+    private ImageView mHeaderIcon;
+    private TextView mHeaderAccountType;
+    private TextView mHeaderAccountName;
+
+    private Button mAddFieldButton;
+    private boolean mExpanded = true;
+
+    private long mRawContactId = -1;
+
+    public RawContactEditorView(Context context) {
+        super(context);
+    }
+
+    public RawContactEditorView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+
+        mInflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+        mPhoto = (PhotoEditorView)findViewById(R.id.edit_photo);
+        mPhotoStub = findViewById(R.id.stub_photo);
+
+        final int photoSize = getResources().getDimensionPixelSize(R.dimen.edit_photo_size);
+
+        mName = (FieldEditorView)findViewById(R.id.edit_name);
+        mName.setMinimumHeight(photoSize);
+        mName.setDeletable(false);
+
+        mFields = (ViewGroup)findViewById(R.id.sect_fields);
+
+        mHeader = findViewById(R.id.header);
+        mBody = findViewById(R.id.body);
+        mHeader.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                setExpanded(!mExpanded);
+            }
+        });
+        mHeaderIcon = (ImageView) findViewById(R.id.header_icon);
+        mHeaderAccountType = (TextView) findViewById(R.id.header_account_type);
+        mHeaderAccountName = (TextView) findViewById(R.id.header_account_name);
+
+        mAddFieldButton = (Button) findViewById(R.id.button_add_field);
+        mAddFieldButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                showAddInformationPopupWindow();
+            }
+        });
+    }
+
+    /**
+     * Set the internal state for this view, given a current
+     * {@link EntityDelta} state and the {@link BaseAccountType} that
+     * apply to that state.
+     */
+    @Override
+    public void setState(EntityDelta state, BaseAccountType source, ViewIdGenerator vig) {
+        // Remove any existing sections
+        mFields.removeAllViews();
+
+        // Bail if invalid state or source
+        if (state == null || source == null) return;
+
+        setId(vig.getId(state, null, null, ViewIdGenerator.NO_VIEW_INDEX));
+
+        // Make sure we have StructuredName
+        EntityModifier.ensureKindExists(state, source, StructuredName.CONTENT_ITEM_TYPE);
+
+        // Fill in the header info
+        ValuesDelta values = state.getValues();
+        String accountName = values.getAsString(RawContacts.ACCOUNT_NAME);
+        CharSequence accountType = source.getDisplayLabel(mContext);
+        if (TextUtils.isEmpty(accountType)) {
+            accountType = mContext.getString(R.string.account_phone);
+        }
+        if (!TextUtils.isEmpty(accountName)) {
+            mHeaderAccountName.setText(
+                    mContext.getString(R.string.from_account_format, accountName));
+        }
+        mHeaderAccountType.setText(mContext.getString(R.string.account_type_format, accountType));
+        mHeaderIcon.setImageDrawable(source.getDisplayIcon(mContext));
+
+        mRawContactId = values.getAsLong(RawContacts._ID);
+
+        // Show photo editor when supported
+        EntityModifier.ensureKindExists(state, source, Photo.CONTENT_ITEM_TYPE);
+        mHasPhotoEditor = (source.getKindForMimetype(Photo.CONTENT_ITEM_TYPE) != null);
+        mPhoto.setVisibility(mHasPhotoEditor ? View.VISIBLE : View.GONE);
+        mPhoto.setEnabled(true);
+        mName.setEnabled(true);
+
+        // Show and hide the appropriate views
+        mFields.setVisibility(View.VISIBLE);
+        mName.setVisibility(View.VISIBLE);
+
+        DataKind groupMembershipKind = source.getKindForMimetype(GroupMembership.CONTENT_ITEM_TYPE);
+        if (groupMembershipKind != null) {
+            mGroupMembershipView = (GroupMembershipView)mInflater.inflate(
+                    R.layout.item_group_membership, mFields, false);
+            mGroupMembershipView.setKind(groupMembershipKind);
+        }
+
+        // Create editor sections for each possible data kind
+        for (DataKind kind : source.getSortedDataKinds()) {
+            // Skip kind of not editable
+            if (!kind.editable) continue;
+
+            final String mimeType = kind.mimeType;
+            if (StructuredName.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                // Handle special case editor for structured name
+                final ValuesDelta primary = state.getPrimaryEntry(mimeType);
+                mName.setValues(kind, primary, state, false, vig);
+            } else if (Photo.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                // Handle special case editor for photos
+                final ValuesDelta primary = state.getPrimaryEntry(mimeType);
+                mPhoto.setValues(kind, primary, state, false, vig);
+                mPhotoStub.setVisibility(View.VISIBLE);
+            } else if (GroupMembership.CONTENT_ITEM_TYPE.equals(mimeType)) {
+                if (mGroupMembershipView != null) {
+                    mGroupMembershipView.setState(state);
+                }
+            } else {
+                // Otherwise use generic section-based editors
+                if (kind.fieldList == null) continue;
+                final KindSectionView section = (KindSectionView)mInflater.inflate(
+                        R.layout.item_kind_section, mFields, false);
+                section.setState(kind, state, false, vig);
+                mFields.addView(section);
+            }
+        }
+
+        if (mGroupMembershipView != null) {
+            mFields.addView(mGroupMembershipView);
+        }
+    }
+
+    @Override
+    public void setGroupMetaData(Cursor groupMetaData) {
+        if (mGroupMembershipView != null) {
+            mGroupMembershipView.setGroupMetaData(groupMetaData);
+        }
+    }
+
+    public FieldEditorView getNameEditor() {
+        return mName;
+    }
+
+    @Override
+    public long getRawContactId() {
+        return mRawContactId;
+    }
+
+    /* package */ void setExpanded(boolean value) {
+        // only allow collapsing if we are one of several children
+        final boolean newValue;
+        if (getParent() instanceof ViewGroup && ((ViewGroup) getParent()).getChildCount() == 1) {
+            newValue = true;
+        } else {
+            newValue = value;
+        }
+
+        if (newValue == mExpanded) return;
+        mExpanded = newValue;
+        mBody.setVisibility(newValue ? View.VISIBLE : View.GONE);
+    }
+
+    private void showAddInformationPopupWindow() {
+        final ArrayList<KindSectionView> fields =
+                new ArrayList<KindSectionView>(mFields.getChildCount());
+
+        final PopupMenu popupMenu = new PopupMenu(getContext(), mAddFieldButton);
+        final Menu menu = popupMenu.getMenu();
+        for (int i = 0; i < mFields.getChildCount(); i++) {
+            View child = mFields.getChildAt(i);
+            if (child instanceof KindSectionView) {
+                final KindSectionView sectionView = (KindSectionView) child;
+                // not a list and already exists? ignore
+                if (!sectionView.getKind().isList && sectionView.getEditorCount() != 0) {
+                    continue;
+                }
+                menu.add(Menu.NONE, fields.size(), Menu.NONE, sectionView.getTitle());
+                fields.add(sectionView);
+            }
+        }
+        popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
+            @Override
+            public boolean onMenuItemClick(MenuItem item) {
+                final KindSectionView view = fields.get(item.getItemId());
+                view.addItem();
+                return true;
+            }
+        });
+
+        popupMenu.show();
+    }
+}
diff --git a/src/com/android/contacts/views/editor/ReadOnlyRawContactEditorView.java b/src/com/android/contacts/views/editor/ReadOnlyRawContactEditorView.java
new file mode 100644
index 0000000..bf3d811
--- /dev/null
+++ b/src/com/android/contacts/views/editor/ReadOnlyRawContactEditorView.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.ContactsUtils;
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.android.contacts.model.EntityModifier;
+
+import android.content.Context;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.RawContacts;
+import android.telephony.PhoneNumberUtils;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * Custom view that displays read-only contacts in the edit screen.
+ */
+class ReadOnlyRawContactEditorView extends BaseRawContactEditorView {
+
+    private View mPhotoStub;
+    private TextView mName;
+    private TextView mReadOnlyWarning;
+    private ViewGroup mGeneral;
+
+    private View mHeaderColorBar;
+    private View mSideBar;
+    private ImageView mHeaderIcon;
+    private TextView mHeaderAccountType;
+    private TextView mHeaderAccountName;
+
+    private long mRawContactId = -1;
+
+    public ReadOnlyRawContactEditorView(Context context) {
+        super(context);
+    }
+
+    public ReadOnlyRawContactEditorView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    protected void onFinishInflate() {
+        super.onFinishInflate();
+
+        mInflater = (LayoutInflater)getContext().getSystemService(
+                Context.LAYOUT_INFLATER_SERVICE);
+
+        mPhoto = (PhotoEditorView)findViewById(R.id.edit_photo);
+        mPhotoStub = findViewById(R.id.stub_photo);
+
+        mName = (TextView) findViewById(R.id.read_only_name);
+        mReadOnlyWarning = (TextView) findViewById(R.id.read_only_warning);
+        mGeneral = (ViewGroup)findViewById(R.id.sect_general);
+
+        mHeaderColorBar = findViewById(R.id.header_color_bar);
+        mSideBar = findViewById(R.id.color_bar);
+        mHeaderIcon = (ImageView) findViewById(R.id.header_icon);
+        mHeaderAccountType = (TextView) findViewById(R.id.header_account_type);
+        mHeaderAccountName = (TextView) findViewById(R.id.header_account_name);
+    }
+
+    /**
+     * Set the internal state for this view, given a current
+     * {@link EntityDelta} state and the {@link BaseAccountType} that
+     * apply to that state.
+     *
+     * TODO: make this more generic using data from the source
+     */
+    @Override
+    public void setState(EntityDelta state, BaseAccountType source, ViewIdGenerator vig) {
+        // Remove any existing sections
+        mGeneral.removeAllViews();
+
+        // Bail if invalid state or source
+        if (state == null || source == null) return;
+
+        // Make sure we have StructuredName
+        EntityModifier.ensureKindExists(state, source, StructuredName.CONTENT_ITEM_TYPE);
+
+        // Fill in the header info
+        ValuesDelta values = state.getValues();
+        String accountName = values.getAsString(RawContacts.ACCOUNT_NAME);
+        CharSequence accountType = source.getDisplayLabel(mContext);
+        if (TextUtils.isEmpty(accountType)) {
+            accountType = mContext.getString(R.string.account_phone);
+        }
+        if (!TextUtils.isEmpty(accountName)) {
+            mHeaderAccountName.setText(
+                    mContext.getString(R.string.from_account_format, accountName));
+        }
+        mHeaderAccountType.setText(mContext.getString(R.string.account_type_format, accountType));
+        mHeaderIcon.setImageDrawable(source.getDisplayIcon(mContext));
+
+        mRawContactId = values.getAsLong(RawContacts._ID);
+
+        ValuesDelta primary;
+
+        // Photo
+        DataKind kind = source.getKindForMimetype(Photo.CONTENT_ITEM_TYPE);
+        if (kind != null) {
+            EntityModifier.ensureKindExists(state, source, Photo.CONTENT_ITEM_TYPE);
+            mHasPhotoEditor = (source.getKindForMimetype(Photo.CONTENT_ITEM_TYPE) != null);
+            primary = state.getPrimaryEntry(Photo.CONTENT_ITEM_TYPE);
+            mPhoto.setValues(kind, primary, state, source.readOnly, vig);
+            if (!mHasPhotoEditor || !mPhoto.hasSetPhoto()) {
+                mPhotoStub.setVisibility(View.GONE);
+            } else {
+                mPhotoStub.setVisibility(View.VISIBLE);
+            }
+        } else {
+            mPhotoStub.setVisibility(View.VISIBLE);
+        }
+
+        // Name
+        primary = state.getPrimaryEntry(StructuredName.CONTENT_ITEM_TYPE);
+        mName.setText(primary.getAsString(StructuredName.DISPLAY_NAME));
+
+        // Read only warning
+        mReadOnlyWarning.setText(mContext.getString(R.string.contact_read_only, accountType));
+
+        // Phones
+        ArrayList<ValuesDelta> phones = state.getMimeEntries(Phone.CONTENT_ITEM_TYPE);
+        if (phones != null) {
+            for (ValuesDelta phone : phones) {
+                View field = mInflater.inflate(
+                        R.layout.item_read_only_field, mGeneral, false);
+                TextView v;
+                v = (TextView) field.findViewById(R.id.label);
+                v.setText(mContext.getText(R.string.phoneLabelsGroup));
+                v = (TextView) field.findViewById(R.id.data);
+                v.setText(PhoneNumberUtils.formatNumber(phone.getAsString(Phone.NUMBER),
+                        phone.getAsString(Phone.NORMALIZED_NUMBER),
+                        ContactsUtils.getCurrentCountryIso(getContext())));
+                mGeneral.addView(field);
+            }
+        }
+
+        // Emails
+        ArrayList<ValuesDelta> emails = state.getMimeEntries(Email.CONTENT_ITEM_TYPE);
+        if (emails != null) {
+            for (ValuesDelta email : emails) {
+                View field = mInflater.inflate(
+                        R.layout.item_read_only_field, mGeneral, false);
+                TextView v;
+                v = (TextView) field.findViewById(R.id.label);
+                v.setText(mContext.getText(R.string.emailLabelsGroup));
+                v = (TextView) field.findViewById(R.id.data);
+                v.setText(email.getAsString(Email.DATA));
+                mGeneral.addView(field);
+            }
+        }
+
+        // Hide mGeneral if it's empty
+        if (mGeneral.getChildCount() > 0) {
+            mGeneral.setVisibility(View.VISIBLE);
+        } else {
+            mGeneral.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public long getRawContactId() {
+        return mRawContactId;
+    }
+}
diff --git a/src/com/android/contacts/views/editor/SelectAccountDialogFragment.java b/src/com/android/contacts/views/editor/SelectAccountDialogFragment.java
new file mode 100644
index 0000000..496571d
--- /dev/null
+++ b/src/com/android/contacts/views/editor/SelectAccountDialogFragment.java
@@ -0,0 +1,135 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.R;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.AccountTypes;
+
+import android.accounts.Account;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * Shows a dialog asking the user which account to chose.
+ * The result is passed back to the Fragment that is configured by
+ * {@link Fragment#setTargetFragment(Fragment, int)}, which has to implement
+ * {@link SelectAccountDialogFragment.Listener}.
+ * Does not perform any action by itself.
+ */
+public class SelectAccountDialogFragment extends DialogFragment {
+    public static final String TAG = "SelectAccountDialogFragment";
+    private static final String IS_NEW_CONTACT = "IS_NEW_CONTACT";
+
+    private boolean mIsNewContact;
+
+    public SelectAccountDialogFragment() {
+    }
+
+    public SelectAccountDialogFragment(boolean isNewContact) {
+        mIsNewContact = isNewContact;
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (savedInstanceState != null) {
+            mIsNewContact = savedInstanceState.getBoolean(IS_NEW_CONTACT);
+        }
+    }
+
+    @Override
+    public void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+        outState.putBoolean(IS_NEW_CONTACT, mIsNewContact);
+    }
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        final AccountTypes sources = AccountTypes.getInstance(getActivity());
+        final ArrayList<Account> accounts =
+                AccountTypes.getInstance(getActivity()).getAccounts(true);
+        final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        final LayoutInflater inflater = LayoutInflater.from(builder.getContext());
+
+        final ArrayAdapter<Account> accountAdapter = new ArrayAdapter<Account>(builder.getContext(),
+                android.R.layout.simple_list_item_2, accounts) {
+            @Override
+            public View getView(int position, View convertView, ViewGroup parent) {
+                final View resultView;
+                if (convertView == null) {
+                    resultView = inflater.inflate(android.R.layout.simple_list_item_2,
+                            parent, false);
+                } else {
+                    resultView = convertView;
+                }
+
+                // TODO: show icon along with title
+                final TextView text1 = (TextView)resultView.findViewById(android.R.id.text1);
+                final TextView text2 = (TextView)resultView.findViewById(android.R.id.text2);
+
+                final Account account = this.getItem(position);
+                final BaseAccountType source = sources.getInflatedSource(account.type,
+                        BaseAccountType.LEVEL_SUMMARY);
+
+                text1.setText(account.name);
+                text2.setText(source.getDisplayLabel(getContext()));
+
+                return resultView;
+            }
+        };
+
+        final DialogInterface.OnClickListener clickListener =
+                new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                dialog.dismiss();
+
+                final Listener target = (Listener) getTargetFragment();
+                target.onAccountChosen(accountAdapter.getItem(which), mIsNewContact);
+            }
+        };
+
+        builder.setTitle(R.string.dialog_new_contact_account);
+        builder.setSingleChoiceItems(accountAdapter, 0, clickListener);
+        final AlertDialog result = builder.create();
+        return result;
+    }
+
+    @Override
+    public void onCancel(DialogInterface dialog) {
+        super.onCancel(dialog);
+        final Listener target = (Listener) getTargetFragment();
+        target.onAccountSelectorCancelled();
+    }
+
+    public interface Listener {
+        void onAccountChosen(Account account, boolean isNewContact);
+        void onAccountSelectorCancelled();
+    }
+}
diff --git a/src/com/android/contacts/views/editor/SplitContactConfirmationDialogFragment.java b/src/com/android/contacts/views/editor/SplitContactConfirmationDialogFragment.java
new file mode 100644
index 0000000..ee5dba3
--- /dev/null
+++ b/src/com/android/contacts/views/editor/SplitContactConfirmationDialogFragment.java
@@ -0,0 +1,61 @@
+/*
+ * 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.views.editor;
+
+import com.android.contacts.R;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.Fragment;
+import android.content.DialogInterface;
+import android.os.Bundle;
+
+/**
+ * Shows a dialog asking the user whether to split the contact. The result is passed back
+ * to the Fragment that is configured by {@link Fragment#setTargetFragment(Fragment, int)}, which
+ * has to implement {@link SplitContactConfirmationDialogFragment.Listener}.
+ * Does not split the contact itself.
+ */
+public class SplitContactConfirmationDialogFragment extends DialogFragment {
+    public static final String TAG = "SplitContactConfirmationDialog";
+
+    public SplitContactConfirmationDialogFragment() {
+    }
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
+        builder.setTitle(R.string.splitConfirmation_title);
+        builder.setIcon(android.R.drawable.ic_dialog_alert);
+        builder.setMessage(R.string.splitConfirmation);
+        builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                final Listener targetListener = (Listener) getTargetFragment();
+                targetListener.onSplitContactConfirmed();
+            }
+        });
+        builder.setNegativeButton(android.R.string.cancel, null);
+        builder.setCancelable(false);
+        return builder.create();
+    }
+
+    public interface Listener {
+        void onSplitContactConfirmed();
+    }
+}
diff --git a/src/com/android/contacts/views/editor/ViewIdGenerator.java b/src/com/android/contacts/views/editor/ViewIdGenerator.java
new file mode 100644
index 0000000..6cef706
--- /dev/null
+++ b/src/com/android/contacts/views/editor/ViewIdGenerator.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2009 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.views.editor;
+
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * A class that provides unique view ids for {@link ContentEditorView}, {@link KindSectionView},
+ * {@link FieldEditorView} and {@link EditView} on {@link EditContactActivity}.
+ * It is used to assign a unique but consistent id to each view across {@link EditContactActivity}'s
+ * lifecycle, so that we can re-construct view state (e.g. focused view) when the screen rotates.
+ *
+ * <p>This class is not thread safe.
+ */
+public final class ViewIdGenerator implements Parcelable {
+    private static final int INVALID_VIEW_ID = 0;
+    private static final int INITIAL_VIEW_ID = 1;
+
+    public static final int NO_VIEW_INDEX = -1;
+
+    private int mNextId;
+
+    /**
+     * Used as a map from the "key" of the views to actual ids.  {@link #getId()} generates keys for
+     * the views.
+     */
+    private Bundle mIdMap = new Bundle();
+
+    private static final char KEY_SEPARATOR = '*';
+
+    private final static StringBuilder sWorkStringBuilder = new StringBuilder();
+
+    public ViewIdGenerator() {
+        mNextId = INITIAL_VIEW_ID;
+    }
+
+    /** {@inheritDoc} */
+    public int describeContents() {
+        return 0;
+    }
+
+    /**
+     * Returns an id for a view associated with specified contact field.
+     *
+     * @param entity {@link EntityDelta} associated with the view
+     * @param kind {@link DataKind} associated with the view, or null if none exists.
+     * @param values {@link ValuesDelta} associated with the view, or null if none exists.
+     * @param viewIndex index of the view in the parent {@link Editor}, if it's a leave view.
+     *     Otherwise, pass {@link #NO_VIEW_INDEX}.
+     */
+    public int getId(EntityDelta entity, DataKind kind, ValuesDelta values,
+            int viewIndex) {
+        final String k = getMapKey(entity, kind, values, viewIndex);
+
+        int id = mIdMap.getInt(k, INVALID_VIEW_ID);
+        if (id == INVALID_VIEW_ID) {
+            // Make sure the new id won't conflict with auto-generated ids by masking with 0xffff.
+            id = (mNextId++) & 0xFFFF;
+            mIdMap.putInt(k, id);
+        }
+        return id;
+    }
+
+    private static String getMapKey(EntityDelta entity, DataKind kind, ValuesDelta values,
+            int viewIndex) {
+        sWorkStringBuilder.setLength(0);
+        if (entity != null) {
+            sWorkStringBuilder.append(entity.getValues().getId());
+
+            if (kind != null) {
+                sWorkStringBuilder.append(KEY_SEPARATOR);
+                sWorkStringBuilder.append(kind.mimeType);
+
+                if (values != null) {
+                    sWorkStringBuilder.append(KEY_SEPARATOR);
+                    sWorkStringBuilder.append(values.getId());
+
+                    if (viewIndex != NO_VIEW_INDEX) {
+                        sWorkStringBuilder.append(KEY_SEPARATOR);
+                        sWorkStringBuilder.append(viewIndex);
+                    }
+                }
+            }
+        }
+        return sWorkStringBuilder.toString();
+    }
+
+    /** {@Override} */
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeInt(mNextId);
+        dest.writeBundle(mIdMap);
+    }
+
+    private void readFromParcel(Parcel src) {
+        mNextId = src.readInt();
+        mIdMap = src.readBundle();
+    }
+
+    public static final Parcelable.Creator<ViewIdGenerator> CREATOR =
+            new Parcelable.Creator<ViewIdGenerator>() {
+        public ViewIdGenerator createFromParcel(Parcel in) {
+            final ViewIdGenerator vig = new ViewIdGenerator();
+            vig.readFromParcel(in);
+            return vig;
+        }
+
+        public ViewIdGenerator[] newArray(int size) {
+            return new ViewIdGenerator[size];
+        }
+    };
+}
diff --git a/src/com/android/contacts/widget/CompositeListAdapter.java b/src/com/android/contacts/widget/CompositeListAdapter.java
new file mode 100644
index 0000000..bd0c8d6
--- /dev/null
+++ b/src/com/android/contacts/widget/CompositeListAdapter.java
@@ -0,0 +1,222 @@
+/*
+ * 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.widget;
+
+import android.database.DataSetObserver;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ListAdapter;
+
+/**
+ * A general purpose adapter that is composed of multiple sub-adapters. It just
+ * appends them in the order they are added. It listens to changes from all
+ * sub-adapters and propagates them to its own listeners.
+ */
+public class CompositeListAdapter extends BaseAdapter {
+
+    private static final int INITIAL_CAPACITY = 2;
+
+    private ListAdapter[] mAdapters;
+    private int[] mCounts;
+    private int[] mViewTypeCounts;
+    private int mSize = 0;
+    private int mCount = 0;
+    private int mViewTypeCount = 0;
+    private boolean mAllItemsEnabled = true;
+    private boolean mCacheValid = true;
+
+    private DataSetObserver mDataSetObserver = new DataSetObserver() {
+
+        @Override
+        public void onChanged() {
+            invalidate();
+            notifyDataChanged();
+        }
+
+        @Override
+        public void onInvalidated() {
+            invalidate();
+            notifyDataChanged();
+        }
+    };
+
+    public CompositeListAdapter() {
+        this(INITIAL_CAPACITY);
+    }
+
+    public CompositeListAdapter(int initialCapacity) {
+        mAdapters = new ListAdapter[INITIAL_CAPACITY];
+        mCounts = new int[INITIAL_CAPACITY];
+        mViewTypeCounts = new int[INITIAL_CAPACITY];
+    }
+
+    public void addAdapter(ListAdapter adapter) {
+        if (mSize >= mAdapters.length) {
+            int newCapacity = mSize + 2;
+            ListAdapter[] newAdapters = new ListAdapter[newCapacity];
+            System.arraycopy(mAdapters, 0, newAdapters, 0, mSize);
+            mAdapters = newAdapters;
+
+            int[] newCounts = new int[newCapacity];
+            System.arraycopy(mCounts, 0, newCounts, 0, mSize);
+            mCounts = newCounts;
+
+            int[] newViewTypeCounts = new int[newCapacity];
+            System.arraycopy(mViewTypeCounts, 0, newViewTypeCounts, 0, mSize);
+            mViewTypeCounts = newViewTypeCounts;
+        }
+
+        adapter.registerDataSetObserver(mDataSetObserver);
+
+        int count = adapter.getCount();
+        int viewTypeCount = adapter.getViewTypeCount();
+
+        mAdapters[mSize] = adapter;
+        mCounts[mSize] = count;
+        mCount += count;
+        mAllItemsEnabled &= adapter.areAllItemsEnabled();
+        mViewTypeCounts[mSize] = viewTypeCount;
+        mViewTypeCount += viewTypeCount;
+        mSize++;
+
+        notifyDataChanged();
+    }
+
+    protected void notifyDataChanged() {
+        if (getCount() > 0) {
+            notifyDataSetChanged();
+        } else {
+            notifyDataSetInvalidated();
+        }
+    }
+
+    protected void invalidate() {
+        mCacheValid = false;
+    }
+
+    protected void ensureCacheValid() {
+        if (mCacheValid) {
+            return;
+        }
+
+        mCount = 0;
+        mAllItemsEnabled = true;
+        mViewTypeCount = 0;
+        for (int i = 0; i < mSize; i++) {
+            int count = mAdapters[i].getCount();
+            int viewTypeCount = mAdapters[i].getViewTypeCount();
+            mCounts[i] = count;
+            mCount += count;
+            mAllItemsEnabled &= mAdapters[i].areAllItemsEnabled();
+            mViewTypeCount += viewTypeCount;
+        }
+
+        mCacheValid = true;
+    }
+
+    public int getCount() {
+        ensureCacheValid();
+        return mCount;
+    }
+
+    public Object getItem(int position) {
+        ensureCacheValid();
+        int start = 0;
+        for (int i = 0; i < mCounts.length; i++) {
+            int end = start + mCounts[i];
+            if (position >= start && position < end) {
+                return mAdapters[i].getItem(position - start);
+            }
+            start = end;
+        }
+
+        throw new ArrayIndexOutOfBoundsException(position);
+    }
+
+    public long getItemId(int position) {
+        ensureCacheValid();
+        int start = 0;
+        for (int i = 0; i < mCounts.length; i++) {
+            int end = start + mCounts[i];
+            if (position >= start && position < end) {
+                return mAdapters[i].getItemId(position - start);
+            }
+            start = end;
+        }
+
+        throw new ArrayIndexOutOfBoundsException(position);
+    }
+
+    @Override
+    public int getViewTypeCount() {
+        ensureCacheValid();
+        return mViewTypeCount;
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        ensureCacheValid();
+        int start = 0;
+        int viewTypeOffset = 0;
+        for (int i = 0; i < mCounts.length; i++) {
+            int end = start + mCounts[i];
+            if (position >= start && position < end) {
+                return viewTypeOffset + mAdapters[i].getItemViewType(position - start);
+            }
+            viewTypeOffset += mViewTypeCounts[i];
+            start = end;
+        }
+
+        throw new ArrayIndexOutOfBoundsException(position);
+    }
+
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ensureCacheValid();
+        int start = 0;
+        for (int i = 0; i < mCounts.length; i++) {
+            int end = start + mCounts[i];
+            if (position >= start && position < end) {
+                return mAdapters[i].getView(position - start, convertView, parent);
+            }
+            start = end;
+        }
+
+        throw new ArrayIndexOutOfBoundsException(position);
+    }
+
+    @Override
+    public boolean areAllItemsEnabled() {
+        ensureCacheValid();
+        return mAllItemsEnabled;
+    }
+
+    @Override
+    public boolean isEnabled(int position) {
+        ensureCacheValid();
+        int start = 0;
+        for (int i = 0; i < mCounts.length; i++) {
+            int end = start + mCounts[i];
+            if (position >= start && position < end) {
+                return mAdapters[i].areAllItemsEnabled()
+                        || mAdapters[i].isEnabled(position - start);
+            }
+            start = end;
+        }
+
+        throw new ArrayIndexOutOfBoundsException(position);
+    }
+}
diff --git a/src/com/android/contacts/widget/ContextMenuAdapter.java b/src/com/android/contacts/widget/ContextMenuAdapter.java
new file mode 100644
index 0000000..660274a
--- /dev/null
+++ b/src/com/android/contacts/widget/ContextMenuAdapter.java
@@ -0,0 +1,30 @@
+/*
+ * 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.widget;
+
+import android.view.MenuItem;
+import android.view.View;
+
+/**
+ * An adapter for the contextual menu.
+ */
+public interface ContextMenuAdapter extends View.OnCreateContextMenuListener {
+
+    /**
+     * See {@link android.app.Activity#onContextItemSelected}.
+     */
+    boolean onContextItemSelected(MenuItem item);
+}
diff --git a/src/com/android/contacts/widget/IndexerListAdapter.java b/src/com/android/contacts/widget/IndexerListAdapter.java
new file mode 100644
index 0000000..b26c2dc
--- /dev/null
+++ b/src/com/android/contacts/widget/IndexerListAdapter.java
@@ -0,0 +1,226 @@
+/*
+ * 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.widget;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ListView;
+import android.widget.SectionIndexer;
+import android.widget.TextView;
+
+/**
+ * A list adapter that supports section indexer and a pinned header.
+ */
+public abstract class IndexerListAdapter extends PinnedHeaderListAdapter implements SectionIndexer {
+
+    private final int mSectionHeaderTextViewId;
+    private final int mSectionHeaderLayoutResId;
+
+    protected Context mContext;
+    private SectionIndexer mIndexer;
+    private int mIndexedPartition = 0;
+    private boolean mSectionHeaderDisplayEnabled;
+    private View mHeader;
+    private TextView mTitleView;
+
+    /**
+     * An item view is displayed differently depending on whether it is placed
+     * at the beginning, middle or end of a section. It also needs to know the
+     * section header when it is at the beginning of a section. This object
+     * captures all this configuration.
+     */
+    public static final class Placement {
+        private int position = ListView.INVALID_POSITION;
+        public boolean firstInSection;
+        public boolean lastInSection;
+        public String sectionHeader;
+
+        public void invalidate() {
+            position = ListView.INVALID_POSITION;
+        }
+    }
+
+    private Placement mPlacementCache = new Placement();
+
+    /**
+     * Constructor.
+     *
+     * @param context
+     * @param sectionHeaderLayoutResourceId section header layout resource ID
+     * @param sectionHeaderTextViewId section header text view ID
+     */
+    public IndexerListAdapter(Context context, int sectionHeaderLayoutResourceId,
+            int sectionHeaderTextViewId) {
+        super(context);
+        mContext = context;
+        mSectionHeaderLayoutResId = sectionHeaderLayoutResourceId;
+        mSectionHeaderTextViewId = sectionHeaderTextViewId;
+    }
+
+    public boolean isSectionHeaderDisplayEnabled() {
+        return mSectionHeaderDisplayEnabled;
+    }
+
+    public void setSectionHeaderDisplayEnabled(boolean flag) {
+        this.mSectionHeaderDisplayEnabled = flag;
+    }
+
+    public int getIndexedPartition() {
+        return mIndexedPartition;
+    }
+
+    public void setIndexedPartition(int partition) {
+        this.mIndexedPartition = partition;
+    }
+
+    public SectionIndexer getIndexer() {
+        return mIndexer;
+    }
+
+    public void setIndexer(SectionIndexer indexer) {
+        mIndexer = indexer;
+        mPlacementCache.invalidate();
+    }
+
+    public Object[] getSections() {
+        if (mIndexer == null) {
+            return new String[] { " " };
+        } else {
+            return mIndexer.getSections();
+        }
+    }
+
+    /**
+     * @return relative position of the section in the indexed partition
+     */
+    public int getPositionForSection(int sectionIndex) {
+        if (mIndexer == null) {
+            return -1;
+        }
+
+        return mIndexer.getPositionForSection(sectionIndex);
+    }
+
+    /**
+     * @param position relative position in the indexed partition
+     */
+    public int getSectionForPosition(int position) {
+        if (mIndexer == null) {
+            return -1;
+        }
+
+        return mIndexer.getSectionForPosition(position);
+    }
+
+    @Override
+    public int getPinnedHeaderCount() {
+        if (isSectionHeaderDisplayEnabled()) {
+            return super.getPinnedHeaderCount() + 1;
+        } else {
+            return super.getPinnedHeaderCount();
+        }
+    }
+
+    @Override
+    public View getPinnedHeaderView(int viewIndex, View convertView, ViewGroup parent) {
+        if (isSectionHeaderDisplayEnabled() && viewIndex == getPinnedHeaderCount() - 1) {
+            if (mHeader == null) {
+                mHeader = LayoutInflater.from(mContext).
+                        inflate(mSectionHeaderLayoutResId, parent, false);
+                mTitleView = (TextView)mHeader.findViewById(mSectionHeaderTextViewId);
+            }
+            return mHeader;
+        } else {
+            return super.getPinnedHeaderView(viewIndex, convertView, parent);
+        }
+    }
+
+    @Override
+    public void configurePinnedHeaders(PinnedHeaderListView listView) {
+        super.configurePinnedHeaders(listView);
+
+        if (!isSectionHeaderDisplayEnabled()) {
+            return;
+        }
+
+        int index = getPinnedHeaderCount() - 1;
+        if (mIndexer == null || getCount() == 0) {
+            listView.setHeaderInvisible(index, false);
+        } else {
+            int listPosition = listView.getPositionAt(listView.getTotalTopPinnedHeaderHeight());
+            int position = listPosition - listView.getHeaderViewsCount();
+
+            int section = -1;
+            int partition = getPartitionForPosition(position);
+            if (partition == mIndexedPartition) {
+                int offset = getOffsetInPartition(position);
+                if (offset != -1) {
+                    section = getSectionForPosition(offset);
+                }
+            }
+
+            if (section == -1) {
+                listView.setHeaderInvisible(index, false);
+            } else {
+                String title = (String)mIndexer.getSections()[section];
+                mTitleView.setText(title);
+
+                // Compute the item position where the current partition begins
+                int partitionStart = getPositionForPartition(mIndexedPartition);
+                if (hasHeader(mIndexedPartition)) {
+                    partitionStart++;
+                }
+
+                // Compute the item position where the next section begins
+                int nextSectionPosition = partitionStart + getPositionForSection(section + 1);
+                boolean isLastInSection = position == nextSectionPosition - 1;
+                listView.setFadingHeader(index, listPosition, isLastInSection);
+            }
+        }
+    }
+
+    /**
+     * Computes the item's placement within its section and populates the {@code placement}
+     * object accordingly.  Please note that the returned object is volatile and should be
+     * copied if the result needs to be used later.
+     */
+    public Placement getItemPlacementInSection(int position) {
+        if (mPlacementCache.position == position) {
+            return mPlacementCache;
+        }
+
+        mPlacementCache.position = position;
+        if (isSectionHeaderDisplayEnabled()) {
+            int section = getSectionForPosition(position);
+            if (section != -1 && getPositionForSection(section) == position) {
+                mPlacementCache.firstInSection = true;
+                mPlacementCache.sectionHeader = (String)getSections()[section];
+            } else {
+                mPlacementCache.firstInSection = false;
+                mPlacementCache.sectionHeader = null;
+            }
+
+            mPlacementCache.lastInSection = (getPositionForSection(section + 1) - 1 == position);
+        } else {
+            mPlacementCache.firstInSection = false;
+            mPlacementCache.lastInSection = false;
+            mPlacementCache.sectionHeader = null;
+        }
+        return mPlacementCache;
+    }
+}
diff --git a/src/com/android/contacts/widget/InterpolatingLayout.java b/src/com/android/contacts/widget/InterpolatingLayout.java
new file mode 100644
index 0000000..012e5a2
--- /dev/null
+++ b/src/com/android/contacts/widget/InterpolatingLayout.java
@@ -0,0 +1,227 @@
+/*
+ * 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.widget;
+
+import com.android.contacts.R;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * Layout similar to LinearLayout that allows a child to specify examples of
+ * desired size depending on the parent size. For example if the widget wants to
+ * be 100dip when parent is 200dip and 110dip when parent is 400dip, the layout
+ * will ensure these requirements and interpolate for other parent sizes.
+ * You can also specify minWidth for each child.  You can have at most one
+ * child with layout_width="match_parent" - it will take the entire remaining
+ * space.
+ */
+public class InterpolatingLayout extends ViewGroup {
+
+    public InterpolatingLayout(Context context) {
+        super(context);
+    }
+
+    public InterpolatingLayout(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public InterpolatingLayout(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    public final static class LayoutParams extends ViewGroup.MarginLayoutParams {
+
+        public int narrowParentWidth;
+        public int narrowWidth;
+        public int narrowLeftMargin;
+        public int narrowRightMargin;
+        public int wideParentWidth;
+        public int wideWidth;
+        public int wideLeftMargin;
+        public int wideRightMargin;
+        private float widthMultiplier;
+        private int widthConstant;
+        private float leftMarginMultiplier;
+        private int leftMarginConstant;
+        private float rightMarginMultiplier;
+        private int rightMarginConstant;
+
+        public LayoutParams(Context c, AttributeSet attrs) {
+            super(c, attrs);
+            TypedArray a = c.obtainStyledAttributes(attrs, R.styleable.InterpolatingLayout_Layout);
+
+            narrowParentWidth = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_narrowParentWidth, -1);
+            narrowWidth = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_narrowWidth, -1);
+            narrowLeftMargin = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_narrowLeftMargin, -1);
+            narrowRightMargin = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_narrowRightMargin, -1);
+            wideParentWidth = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_wideParentWidth, -1);
+            wideWidth = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_wideWidth, -1);
+            wideLeftMargin = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_wideLeftMargin, -1);
+            wideRightMargin = a.getDimensionPixelSize(
+                    R.styleable.InterpolatingLayout_Layout_layout_wideRightMargin, -1);
+
+            a.recycle();
+
+            if (narrowWidth != -1) {
+                widthMultiplier = (float) (wideWidth - narrowWidth)
+                        / (wideParentWidth - narrowParentWidth);
+                widthConstant = (int) (narrowWidth - narrowParentWidth * widthMultiplier);
+            }
+
+            if (narrowLeftMargin != -1) {
+                leftMarginMultiplier = (float) (wideLeftMargin - narrowLeftMargin)
+                        / (wideParentWidth - narrowParentWidth);
+                leftMarginConstant = (int) (narrowLeftMargin - narrowParentWidth
+                        * leftMarginMultiplier);
+            }
+
+            if (narrowRightMargin != -1) {
+                rightMarginMultiplier = (float) (wideRightMargin - narrowRightMargin)
+                        / (wideParentWidth - narrowParentWidth);
+                rightMarginConstant = (int) (narrowRightMargin - narrowParentWidth
+                        * rightMarginMultiplier);
+            }
+        }
+
+        public LayoutParams(int width, int height) {
+            super(width, height);
+        }
+
+        public LayoutParams(MarginLayoutParams source) {
+            super(source);
+        }
+
+        public int resolveWidth(int parentSize) {
+            if (narrowWidth == -1) {
+                return width;
+            } else {
+                int w = (int) (parentSize * widthMultiplier) + widthConstant;
+                return w <= 0 ? WRAP_CONTENT : w;
+            }
+        }
+
+        public int resolveLeftMargin(int parentSize) {
+            if (narrowLeftMargin == -1) {
+                return leftMargin;
+            } else {
+                int w = (int) (parentSize * leftMarginMultiplier) + leftMarginConstant;
+                return w < 0 ? 0 : w;
+            }
+        }
+
+        public int resolveRightMargin(int parentSize) {
+            if (narrowRightMargin == -1) {
+                return rightMargin;
+            } else {
+                int w = (int) (parentSize * rightMarginMultiplier) + rightMarginConstant;
+                return w < 0 ? 0 : w;
+            }
+        }
+    }
+
+    @Override
+    public LayoutParams generateLayoutParams(AttributeSet attrs) {
+        return new LayoutParams(getContext(), attrs);
+    }
+
+    @Override
+    protected LayoutParams generateDefaultLayoutParams() {
+        return new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int mode = MeasureSpec.getMode(widthMeasureSpec);
+        int parentSize = MeasureSpec.getSize(widthMeasureSpec);
+
+        int width = 0;
+        int height = 0;
+
+        View fillChild = null;
+        int count = getChildCount();
+        for (int i = 0; i < count; i++) {
+            View child = getChildAt(i);
+            if (child.getVisibility() == View.GONE) {
+                continue;
+            }
+
+            LayoutParams params = (LayoutParams) child.getLayoutParams();
+
+            if (params.width == LayoutParams.MATCH_PARENT) {
+                if (fillChild != null) {
+                    throw new RuntimeException(
+                            "Interpolating layout allows at most one child"
+                            + " with layout_width='match_parent'");
+                }
+                fillChild = child;
+            } else {
+                int childWidth = params.resolveWidth(parentSize);
+                int childMeasureSpec = (childWidth == LayoutParams.WRAP_CONTENT)
+                        ? MeasureSpec.UNSPECIFIED
+                        : MeasureSpec.makeMeasureSpec(childWidth, MeasureSpec.EXACTLY);
+                child.measure(childMeasureSpec, heightMeasureSpec);
+                width += child.getMeasuredWidth();
+                height = Math.max(child.getMeasuredHeight(), height);
+            }
+
+            width += params.resolveLeftMargin(parentSize) + params.resolveRightMargin(parentSize);
+        }
+
+        if (fillChild != null) {
+            int remainder = parentSize - width;
+            int childMeasureSpec = remainder > 0
+                    ? MeasureSpec.makeMeasureSpec(remainder, MeasureSpec.EXACTLY)
+                    : MeasureSpec.UNSPECIFIED;
+            fillChild.measure(childMeasureSpec, heightMeasureSpec);
+            width += fillChild.getMeasuredWidth();
+            height = Math.max(fillChild.getMeasuredHeight(), height);
+        }
+
+        setMeasuredDimension(
+                resolveSize(width, widthMeasureSpec), resolveSize(height, heightMeasureSpec));
+    }
+
+    @Override
+    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
+        int offset = 0;
+        int width = right - left;
+        int height = bottom - top;
+        int count = getChildCount();
+        for (int i = 0; i < count; i++) {
+            View child = getChildAt(i);
+
+            LayoutParams params = (LayoutParams) child.getLayoutParams();
+            offset += params.resolveLeftMargin(width);
+            int childWidth = child.getMeasuredWidth();
+            int childTop = params.topMargin;
+            child.layout(offset, params.topMargin, offset + childWidth,
+                    params.topMargin + child.getMeasuredHeight());
+            offset += childWidth + params.resolveRightMargin(width);
+        }
+    }
+}
diff --git a/src/com/android/contacts/widget/ListViewUtils.java b/src/com/android/contacts/widget/ListViewUtils.java
new file mode 100644
index 0000000..f5af63b
--- /dev/null
+++ b/src/com/android/contacts/widget/ListViewUtils.java
@@ -0,0 +1,93 @@
+/*
+ * 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.widget;
+
+import android.widget.ListView;
+
+/**
+ * Utility methods for working with ListView.
+ */
+public final class ListViewUtils {
+
+    /**
+     * Position the element at about 1/3 of the list height
+     */
+    private static final float PREFERRED_SELECTION_OFFSET_FROM_TOP = 0.33f;
+
+    /**
+     * Brings the specified position to view by optionally performing a jump-scroll maneuver:
+     * first it jumps to some position near the one requested and then does a smooth
+     * scroll to the requested position.  This creates an impression of full smooth
+     * scrolling without actually traversing the entire list.  If smooth scrolling is
+     * not requested, instantly positions the requested item at a preferred offset.
+     */
+    public static void requestPositionToScreen(
+            final ListView listView, final int position, boolean smoothScroll) {
+        if (!smoothScroll) {
+            final int offset = (int) (listView.getHeight() * PREFERRED_SELECTION_OFFSET_FROM_TOP);
+            listView.setSelectionFromTop(position, offset);
+            return;
+        }
+
+        listView.post(new Runnable() {
+
+            @Override
+            public void run() {
+                int firstPosition = listView.getFirstVisiblePosition() + 1;
+                int lastPosition = listView.getLastVisiblePosition();
+                if (position >= firstPosition && position <= lastPosition) {
+                    return; // Already on screen
+                }
+
+                // We will first position the list a couple of screens before or after
+                // the new selection and then scroll smoothly to it.
+                int twoScreens = (lastPosition - firstPosition) * 2;
+                int preliminaryPosition;
+                if (position < firstPosition) {
+                    preliminaryPosition = position + twoScreens;
+                    if (preliminaryPosition >= listView.getCount()) {
+                        preliminaryPosition = listView.getCount() - 1;
+                    }
+                    if (preliminaryPosition < firstPosition) {
+                        listView.setSelection(preliminaryPosition);
+                    }
+                } else {
+                    preliminaryPosition = position - twoScreens;
+                    if (preliminaryPosition < 0) {
+                        preliminaryPosition = 0;
+                    }
+                    if (preliminaryPosition > lastPosition) {
+                        listView.setSelection(preliminaryPosition);
+                    }
+                }
+
+                scrollToFinalPosition(listView, position);
+            }
+        });
+    }
+
+    private static void scrollToFinalPosition(final ListView listView, final int position) {
+        final int offset = (int) (listView.getHeight() * PREFERRED_SELECTION_OFFSET_FROM_TOP);
+        listView.post(new Runnable() {
+
+            @Override
+            public void run() {
+                listView.smoothScrollToPositionFromTop(position, offset);
+            }
+        });
+    }
+}
diff --git a/src/com/android/contacts/widget/NotifyingSpinner.java b/src/com/android/contacts/widget/NotifyingSpinner.java
new file mode 100644
index 0000000..972cb35
--- /dev/null
+++ b/src/com/android/contacts/widget/NotifyingSpinner.java
@@ -0,0 +1,55 @@
+/*
+ * 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.widget;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.widget.Spinner;
+
+/**
+ * Spinner that notifies a listener when the user taps on an item, whether or not this results
+ * in a change of selection.
+ */
+public class NotifyingSpinner extends Spinner {
+
+    public interface SelectionListener {
+        void onSetSelection(NotifyingSpinner view, int position);
+    }
+
+    private SelectionListener mListener;
+
+    public NotifyingSpinner(Context context) {
+        super(context);
+    }
+
+    public NotifyingSpinner(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public void setSetSelectionListener(SelectionListener listener) {
+        mListener = listener;
+    }
+
+    @Override
+    public void setSelection(int position) {
+        super.setSelection(position);
+
+        if (mListener != null) {
+            mListener.onSetSelection(this, position);
+        }
+    }
+}
diff --git a/src/com/android/contacts/widget/PinnedHeaderListAdapter.java b/src/com/android/contacts/widget/PinnedHeaderListAdapter.java
new file mode 100644
index 0000000..a4d375e
--- /dev/null
+++ b/src/com/android/contacts/widget/PinnedHeaderListAdapter.java
@@ -0,0 +1,167 @@
+/*
+ * 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.widget;
+
+import com.android.common.widget.CompositeCursorAdapter;
+
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A subclass of {@link CompositeCursorAdapter} that manages pinned partition headers.
+ */
+public abstract class PinnedHeaderListAdapter extends CompositeCursorAdapter
+        implements PinnedHeaderListView.PinnedHeaderAdapter {
+
+    public static final int PARTITION_HEADER_TYPE = 0;
+
+    private boolean mPinnedPartitionHeadersEnabled;
+    private boolean mHeaderVisibility[];
+
+    public PinnedHeaderListAdapter(Context context) {
+        super(context);
+    }
+
+    public PinnedHeaderListAdapter(Context context, int initialCapacity) {
+        super(context, initialCapacity);
+    }
+
+    public boolean getPinnedPartitionHeadersEnabled() {
+        return mPinnedPartitionHeadersEnabled;
+    }
+
+    public void setPinnedPartitionHeadersEnabled(boolean flag) {
+        this.mPinnedPartitionHeadersEnabled = flag;
+    }
+
+    public int getPinnedHeaderCount() {
+        if (mPinnedPartitionHeadersEnabled) {
+            return getPartitionCount();
+        } else {
+            return 0;
+        }
+    }
+
+    protected boolean isPinnedPartitionHeaderVisible(int partition) {
+        return mPinnedPartitionHeadersEnabled && hasHeader(partition)
+                && !isPartitionEmpty(partition);
+    }
+
+    /**
+     * The default implementation creates the same type of view as a normal
+     * partition header.
+     */
+    public View getPinnedHeaderView(int partition, View convertView, ViewGroup parent) {
+        if (hasHeader(partition)) {
+            View view = null;
+            if (convertView != null) {
+                Integer headerType = (Integer)convertView.getTag();
+                if (headerType != null && headerType == PARTITION_HEADER_TYPE) {
+                    view = convertView;
+                }
+            }
+            if (view == null) {
+                view = newHeaderView(getContext(), partition, null, parent);
+                view.setTag(PARTITION_HEADER_TYPE);
+                view.setFocusable(false);
+                view.setEnabled(false);
+            }
+            bindHeaderView(view, partition, getCursor(partition));
+            return view;
+        } else {
+            return null;
+        }
+    }
+
+    public void configurePinnedHeaders(PinnedHeaderListView listView) {
+        if (!mPinnedPartitionHeadersEnabled) {
+            return;
+        }
+
+        int size = getPartitionCount();
+
+        // Cache visibility bits, because we will need them several times later on
+        if (mHeaderVisibility == null || mHeaderVisibility.length != size) {
+            mHeaderVisibility = new boolean[size];
+        }
+        for (int i = 0; i < size; i++) {
+            boolean visible = isPinnedPartitionHeaderVisible(i);
+            mHeaderVisibility[i] = visible;
+            if (!visible) {
+                listView.setHeaderInvisible(i, true);
+            }
+        }
+
+        int headerViewsCount = listView.getHeaderViewsCount();
+
+        // Starting at the top, find and pin headers for partitions preceding the visible one(s)
+        int maxTopHeader = -1;
+        int topHeaderHeight = 0;
+        for (int i = 0; i < size; i++) {
+            if (mHeaderVisibility[i]) {
+                int position = listView.getPositionAt(topHeaderHeight) - headerViewsCount;
+                int partition = getPartitionForPosition(position);
+                if (i > partition) {
+                    break;
+                }
+
+                listView.setHeaderPinnedAtTop(i, topHeaderHeight, false);
+                topHeaderHeight += listView.getPinnedHeaderHeight(i);
+                maxTopHeader = i;
+            }
+        }
+
+        // Starting at the bottom, find and pin headers for partitions following the visible one(s)
+        int maxBottomHeader = size;
+        int bottomHeaderHeight = 0;
+        int listHeight = listView.getHeight();
+        for (int i = size; --i > maxTopHeader;) {
+            if (mHeaderVisibility[i]) {
+                int position = listView.getPositionAt(listHeight - bottomHeaderHeight)
+                        - headerViewsCount;
+                if (position < 0) {
+                    break;
+                }
+
+                int partition = getPartitionForPosition(position - 1);
+                if (partition == -1 || i <= partition) {
+                    break;
+                }
+
+                int height = listView.getPinnedHeaderHeight(i);
+                bottomHeaderHeight += height;
+                // Animate the header only if the partition is completely invisible below
+                // the bottom of the view
+                int firstPositionForPartition = getPositionForPartition(i);
+                boolean animate = position < firstPositionForPartition;
+                listView.setHeaderPinnedAtBottom(i, listHeight - bottomHeaderHeight, animate);
+                maxBottomHeader = i;
+            }
+        }
+
+        // Headers in between the top-pinned and bottom-pinned should be hidden
+        for (int i = maxTopHeader + 1; i < maxBottomHeader; i++) {
+            if (mHeaderVisibility[i]) {
+                listView.setHeaderInvisible(i, isPartitionEmpty(i));
+            }
+        }
+    }
+
+    public int getScrollPositionForHeader(int viewIndex) {
+        return getPositionForPartition(viewIndex);
+    }
+}
diff --git a/src/com/android/contacts/widget/PinnedHeaderListDemoActivity.java b/src/com/android/contacts/widget/PinnedHeaderListDemoActivity.java
new file mode 100644
index 0000000..b553e3f
--- /dev/null
+++ b/src/com/android/contacts/widget/PinnedHeaderListDemoActivity.java
@@ -0,0 +1,142 @@
+/*
+ * 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.widget;
+
+import com.android.contacts.R;
+
+import android.app.ListActivity;
+import android.content.Context;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * An activity that demonstrates various use cases for the {@link PinnedHeaderListView}.
+ * If we decide to move PinnedHeaderListView to the framework, this class could go
+ * to API demos.
+ */
+public class PinnedHeaderListDemoActivity extends ListActivity {
+
+    public final static class TestPinnedHeaderListAdapter extends PinnedHeaderListAdapter {
+
+        public TestPinnedHeaderListAdapter(Context context) {
+            super(context);
+            setPinnedPartitionHeadersEnabled(true);
+        }
+
+        private String[] mHeaders;
+        private int mPinnedHeaderCount;
+
+        public void setHeaders(String[] headers) {
+            this.mHeaders = headers;
+        }
+
+        @Override
+        protected View newHeaderView(Context context, int partition, Cursor cursor,
+                ViewGroup parent) {
+            LayoutInflater inflater = LayoutInflater.from(context);
+            return inflater.inflate(R.layout.list_section, null);
+        }
+
+        @Override
+        protected void bindHeaderView(View view, int parition, Cursor cursor) {
+            TextView headerText = (TextView)view.findViewById(R.id.header_text);
+            headerText.setText(mHeaders[parition]);
+        }
+
+        @Override
+        protected View newView(Context context, int partition, Cursor cursor, int position,
+                ViewGroup parent) {
+            LayoutInflater inflater = LayoutInflater.from(context);
+            return inflater.inflate(android.R.layout.simple_list_item_1, null);
+        }
+
+        @Override
+        protected void bindView(View v, int partition, Cursor cursor, int position) {
+            TextView text = (TextView)v.findViewById(android.R.id.text1);
+            text.setText(cursor.getString(1));
+        }
+
+        @Override
+        public View getPinnedHeaderView(int viewIndex, View convertView, ViewGroup parent) {
+            LayoutInflater inflater = LayoutInflater.from(getContext());
+            View view = inflater.inflate(R.layout.list_section, parent, false);
+            view.setFocusable(false);
+            view.setEnabled(false);
+            bindHeaderView(view, viewIndex, null);
+            return view;
+        }
+
+        @Override
+        public int getPinnedHeaderCount() {
+            return mPinnedHeaderCount;
+        }
+    }
+
+    private Handler mHandler = new Handler();
+
+    @Override
+    protected void onCreate(Bundle bundle) {
+        super.onCreate(bundle);
+
+        setContentView(R.layout.pinned_header_list_demo);
+
+        final TestPinnedHeaderListAdapter adapter = new TestPinnedHeaderListAdapter(this);
+
+        Bundle extras = getIntent().getExtras();
+        int[] counts = extras.getIntArray("counts");
+        String[] names = extras.getStringArray("names");
+        boolean[] showIfEmpty = extras.getBooleanArray("showIfEmpty");
+        boolean[] hasHeader = extras.getBooleanArray("headers");
+        int[] delays = extras.getIntArray("delays");
+
+        if (counts == null || names == null || showIfEmpty == null || delays == null) {
+            throw new IllegalArgumentException("Missing required extras");
+        }
+
+        adapter.setHeaders(names);
+        for (int i = 0; i < counts.length; i++) {
+            adapter.addPartition(showIfEmpty[i], names[i] != null);
+            adapter.mPinnedHeaderCount = names.length;
+        }
+        setListAdapter(adapter);
+        for (int i = 0; i < counts.length; i++) {
+            final int sectionId = i;
+            final Cursor cursor = makeCursor(names[i], counts[i]);
+            mHandler.postDelayed(new Runnable() {
+
+                public void run() {
+                    adapter.changeCursor(sectionId, cursor);
+
+                }
+            }, delays[i]);
+        }
+    }
+
+    private Cursor makeCursor(String name, int count) {
+        MatrixCursor cursor = new MatrixCursor(new String[]{"_id", name});
+        for (int i = 0; i < count; i++) {
+            cursor.addRow(new Object[]{i, name + "[" + i + "]"});
+        }
+        return cursor;
+    }
+}
diff --git a/src/com/android/contacts/widget/PinnedHeaderListView.java b/src/com/android/contacts/widget/PinnedHeaderListView.java
new file mode 100644
index 0000000..5936002
--- /dev/null
+++ b/src/com/android/contacts/widget/PinnedHeaderListView.java
@@ -0,0 +1,512 @@
+/*
+ * 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.widget;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.AbsListView.OnScrollListener;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemSelectedListener;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+
+/**
+ * A ListView that maintains a header pinned at the top of the list. The
+ * pinned header can be pushed up and dissolved as needed.
+ */
+public class PinnedHeaderListView extends ListView
+        implements OnScrollListener, OnItemSelectedListener {
+
+    /**
+     * Adapter interface.  The list adapter must implement this interface.
+     */
+    public interface PinnedHeaderAdapter {
+
+        /**
+         * Returns the overall number of pinned headers, visible or not.
+         */
+        int getPinnedHeaderCount();
+
+        /**
+         * Creates or updates the pinned header view.
+         */
+        View getPinnedHeaderView(int viewIndex, View convertView, ViewGroup parent);
+
+        /**
+         * Configures the pinned headers to match the visible list items. The
+         * adapter should call {@link PinnedHeaderListView#setHeaderPinnedAtTop},
+         * {@link PinnedHeaderListView#setHeaderPinnedAtBottom},
+         * {@link PinnedHeaderListView#setFadingHeader} or
+         * {@link PinnedHeaderListView#setHeaderInvisible}, for each header that
+         * needs to change its position or visibility.
+         */
+        void configurePinnedHeaders(PinnedHeaderListView listView);
+
+        /**
+         * Returns the list position to scroll to if the pinned header is touched.
+         * Return -1 if the list does not need to be scrolled.
+         */
+        int getScrollPositionForHeader(int viewIndex);
+    }
+
+    private static final int MAX_ALPHA = 255;
+    private static final int TOP = 0;
+    private static final int BOTTOM = 1;
+    private static final int FADING = 2;
+
+    private static final int DEFAULT_ANIMATION_DURATION = 100;
+
+    private static final class PinnedHeader {
+        View view;
+        boolean visible;
+        int y;
+        int height;
+        int alpha;
+        int state;
+
+        boolean animating;
+        boolean targetVisible;
+        int sourceY;
+        int targetY;
+        long targetTime;
+    }
+
+    private PinnedHeaderAdapter mAdapter;
+    private int mSize;
+    private PinnedHeader[] mHeaders;
+    private RectF mBounds = new RectF();
+    private Rect mClipRect = new Rect();
+    private OnScrollListener mOnScrollListener;
+    private OnItemSelectedListener mOnItemSelectedListener;
+    private int mScrollState;
+
+    private int mAnimationDuration = DEFAULT_ANIMATION_DURATION;
+    private boolean mAnimating;
+    private long mAnimationTargetTime;
+
+    public PinnedHeaderListView(Context context) {
+        this(context, null, com.android.internal.R.attr.listViewStyle);
+    }
+
+    public PinnedHeaderListView(Context context, AttributeSet attrs) {
+        this(context, attrs, com.android.internal.R.attr.listViewStyle);
+    }
+
+    public PinnedHeaderListView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        super.setOnScrollListener(this);
+        super.setOnItemSelectedListener(this);
+    }
+
+    public void setPinnedHeaderAnimationDuration(int duration) {
+        mAnimationDuration = duration;
+    }
+
+    @Override
+    public void setAdapter(ListAdapter adapter) {
+        mAdapter = (PinnedHeaderAdapter)adapter;
+        super.setAdapter(adapter);
+    }
+
+    @Override
+    public void setOnScrollListener(OnScrollListener onScrollListener) {
+        mOnScrollListener = onScrollListener;
+        super.setOnScrollListener(this);
+    }
+
+    @Override
+    public void setOnItemSelectedListener(OnItemSelectedListener listener) {
+        mOnItemSelectedListener = listener;
+        super.setOnItemSelectedListener(this);
+    }
+
+    public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,
+            int totalItemCount) {
+        if (mAdapter != null) {
+            int count = mAdapter.getPinnedHeaderCount();
+            if (count != mSize) {
+                mSize = count;
+                if (mHeaders == null) {
+                    mHeaders = new PinnedHeader[mSize];
+                } else if (mHeaders.length < mSize) {
+                    PinnedHeader[] headers = mHeaders;
+                    mHeaders = new PinnedHeader[mSize];
+                    System.arraycopy(headers, 0, mHeaders, 0, headers.length);
+                }
+            }
+
+            for (int i = 0; i < mSize; i++) {
+                if (mHeaders[i] == null) {
+                    mHeaders[i] = new PinnedHeader();
+                }
+                mHeaders[i].view = mAdapter.getPinnedHeaderView(i, mHeaders[i].view, this);
+            }
+
+            // Disable vertical fading when the pinned header is present
+            // TODO change ListView to allow separate measures for top and bottom fading edge;
+            // in this particular case we would like to disable the top, but not the bottom edge.
+            if (mSize > 0) {
+                setFadingEdgeLength(0);
+            }
+
+            mAnimationTargetTime = System.currentTimeMillis() + mAnimationDuration;
+            mAdapter.configurePinnedHeaders(this);
+            invalidateIfAnimating();
+
+        }
+        if (mOnScrollListener != null) {
+            mOnScrollListener.onScroll(this, firstVisibleItem, visibleItemCount, totalItemCount);
+        }
+    }
+
+    public void onScrollStateChanged(AbsListView view, int scrollState) {
+        mScrollState = scrollState;
+        if (mOnScrollListener != null) {
+            mOnScrollListener.onScrollStateChanged(this, scrollState);
+        }
+    }
+
+    /**
+     * Ensures that the selected item is positioned below the top-pinned headers
+     * and above the bottom-pinned ones.
+     */
+    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+        int height = getHeight();
+
+        int windowTop = 0;
+        int windowBottom = height;
+
+        int prevHeaderBottom = 0;
+        for (int i = 0; i < mSize; i++) {
+            PinnedHeader header = mHeaders[i];
+            if (header.visible) {
+                if (header.state == TOP) {
+                    windowTop = header.y + header.height;
+                } else if (header.state == BOTTOM) {
+                    windowBottom = header.y;
+                    break;
+                }
+            }
+        }
+
+        View selectedView = getSelectedView();
+        if (selectedView != null) {
+            if (selectedView.getTop() < windowTop) {
+                setSelectionFromTop(position, windowTop);
+            } else if (selectedView.getBottom() > windowBottom) {
+                setSelectionFromTop(position, windowBottom - selectedView.getHeight());
+            }
+        }
+
+        if (mOnItemSelectedListener != null) {
+            mOnItemSelectedListener.onItemSelected(parent, view, position, id);
+        }
+    }
+
+    public void onNothingSelected(AdapterView<?> parent) {
+        if (mOnItemSelectedListener != null) {
+            mOnItemSelectedListener.onNothingSelected(parent);
+        }
+    }
+
+    public int getPinnedHeaderHeight(int viewIndex) {
+        ensurePinnedHeaderLayout(viewIndex);
+        return mHeaders[viewIndex].view.getHeight();
+    }
+
+    /**
+     * Set header to be pinned at the top.
+     *
+     * @param viewIndex index of the header view
+     * @param y is position of the header in pixels.
+     * @param animate true if the transition to the new coordinate should be animated
+     */
+    public void setHeaderPinnedAtTop(int viewIndex, int y, boolean animate) {
+        ensurePinnedHeaderLayout(viewIndex);
+        PinnedHeader header = mHeaders[viewIndex];
+        header.visible = true;
+        header.y = y;
+        header.state = TOP;
+
+        // TODO perhaps we should animate at the top as well
+        header.animating = false;
+    }
+
+    /**
+     * Set header to be pinned at the bottom.
+     *
+     * @param viewIndex index of the header view
+     * @param y is position of the header in pixels.
+     * @param animate true if the transition to the new coordinate should be animated
+     */
+    public void setHeaderPinnedAtBottom(int viewIndex, int y, boolean animate) {
+        ensurePinnedHeaderLayout(viewIndex);
+        PinnedHeader header = mHeaders[viewIndex];
+        header.state = BOTTOM;
+        if (header.animating) {
+            header.targetTime = mAnimationTargetTime;
+            header.sourceY = header.y;
+            header.targetY = y;
+        } else if (animate && (header.y != y || !header.visible)) {
+            if (header.visible) {
+                header.sourceY = header.y;
+            } else {
+                header.visible = true;
+                header.sourceY = y + header.height;
+            }
+            header.animating = true;
+            header.targetVisible = true;
+            header.targetTime = mAnimationTargetTime;
+            header.targetY = y;
+        } else {
+            header.visible = true;
+            header.y = y;
+        }
+    }
+
+    /**
+     * Set header to be pinned at the top of the first visible item.
+     *
+     * @param viewIndex index of the header view
+     * @param position is position of the header in pixels.
+     */
+    public void setFadingHeader(int viewIndex, int position, boolean fade) {
+        ensurePinnedHeaderLayout(viewIndex);
+
+        View child = getChildAt(position - getFirstVisiblePosition());
+
+        PinnedHeader header = mHeaders[viewIndex];
+        header.visible = true;
+        header.state = FADING;
+        header.alpha = MAX_ALPHA;
+        header.animating = false;
+
+        int top = getTotalTopPinnedHeaderHeight();
+        header.y = top;
+        if (fade) {
+            int bottom = child.getBottom() - top;
+            int headerHeight = header.height;
+            if (bottom < headerHeight) {
+                int portion = bottom - headerHeight;
+                header.alpha = MAX_ALPHA * (headerHeight + portion) / headerHeight;
+                header.y = top + portion;
+            }
+        }
+    }
+
+    /**
+     * Makes header invisible.
+     *
+     * @param viewIndex index of the header view
+     * @param animate true if the transition to the new coordinate should be animated
+     */
+    public void setHeaderInvisible(int viewIndex, boolean animate) {
+        PinnedHeader header = mHeaders[viewIndex];
+        if (header.visible && (animate || header.animating) && header.state == BOTTOM) {
+            header.sourceY = header.y;
+            if (!header.animating) {
+                header.visible = true;
+                header.targetY = getBottom() + header.height;
+            }
+            header.animating = true;
+            header.targetTime = mAnimationTargetTime;
+            header.targetVisible = false;
+        } else {
+            header.visible = false;
+        }
+    }
+
+    private void ensurePinnedHeaderLayout(int viewIndex) {
+        View view = mHeaders[viewIndex].view;
+        if (view.isLayoutRequested()) {
+            int widthSpec = MeasureSpec.makeMeasureSpec(getWidth(), MeasureSpec.EXACTLY);
+            int heightSpec;
+            int lpHeight = view.getLayoutParams().height;
+            if (lpHeight > 0) {
+                heightSpec = MeasureSpec.makeMeasureSpec(lpHeight, MeasureSpec.EXACTLY);
+            } else {
+                heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+            }
+            view.measure(widthSpec, heightSpec);
+            int height = view.getMeasuredHeight();
+            mHeaders[viewIndex].height = height;
+            view.layout(0, 0, view.getMeasuredWidth(), height);
+        }
+    }
+
+    /**
+     * Returns the sum of heights of headers pinned to the top.
+     */
+    public int getTotalTopPinnedHeaderHeight() {
+        for (int i = mSize; --i >= 0;) {
+            PinnedHeader header = mHeaders[i];
+            if (header.visible && header.state == TOP) {
+                return header.y + header.height;
+            }
+        }
+        return 0;
+    }
+
+    /**
+     * Returns the list item position at the specified y coordinate.
+     */
+    public int getPositionAt(int y) {
+        do {
+            int position = pointToPosition(0, y);
+            if (position != -1) {
+                return position;
+            }
+            // If position == -1, we must have hit a separator. Let's examine
+            // a nearby pixel
+            y--;
+        } while (y > 0);
+        return 0;
+    }
+
+    @Override
+    public boolean onInterceptTouchEvent(MotionEvent ev) {
+        if (mScrollState == SCROLL_STATE_IDLE) {
+            final int y = (int)ev.getY();
+            for (int i = mSize; --i >= 0;) {
+                PinnedHeader header = mHeaders[i];
+                if (header.visible && header.y <= y && header.y + header.height > y) {
+                    if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+                        return smoothScrollToPartition(i);
+                    } else {
+                        return true;
+                    }
+                }
+            }
+        }
+
+        return super.onInterceptTouchEvent(ev);
+    }
+
+    private boolean smoothScrollToPartition(int partition) {
+        final int position = mAdapter.getScrollPositionForHeader(partition);
+        if (position == -1) {
+            return false;
+        }
+
+        int offset = 0;
+        for (int i = 0; i < partition; i++) {
+            PinnedHeader header = mHeaders[i];
+            if (header.visible) {
+                offset += header.height;
+            }
+        }
+
+        smoothScrollToPositionFromTop(position + getHeaderViewsCount(), offset);
+        return true;
+    }
+
+    private void invalidateIfAnimating() {
+        mAnimating = false;
+        for (int i = 0; i < mSize; i++) {
+            if (mHeaders[i].animating) {
+                mAnimating = true;
+                invalidate();
+                return;
+            }
+        }
+    }
+
+    @Override
+    protected void dispatchDraw(Canvas canvas) {
+        long currentTime = mAnimating ? System.currentTimeMillis() : 0;
+
+        int top = 0;
+        int bottom = getBottom();
+        boolean hasVisibleHeaders = false;
+        for (int i = 0; i < mSize; i++) {
+            PinnedHeader header = mHeaders[i];
+            if (header.visible) {
+                hasVisibleHeaders = true;
+                if (header.state == BOTTOM && header.y < bottom) {
+                    bottom = header.y;
+                } else if (header.state == TOP || header.state == FADING) {
+                    int newTop = header.y + header.height;
+                    if (newTop > top) {
+                        top = newTop;
+                    }
+                }
+            }
+        }
+
+        if (hasVisibleHeaders) {
+            canvas.save();
+            mClipRect.set(0, top, getWidth(), bottom);
+            canvas.clipRect(mClipRect);
+        }
+
+        super.dispatchDraw(canvas);
+
+        if (hasVisibleHeaders) {
+            canvas.restore();
+
+            // First draw top headers, then the bottom ones to handle the Z axis correctly
+            for (int i = mSize; --i >= 0;) {
+                PinnedHeader header = mHeaders[i];
+                if (header.visible && (header.state == TOP || header.state == FADING)) {
+                    drawHeader(canvas, header, currentTime);
+                }
+            }
+
+            for (int i = 0; i < mSize; i++) {
+                PinnedHeader header = mHeaders[i];
+                if (header.visible && header.state == BOTTOM) {
+                    drawHeader(canvas, header, currentTime);
+                }
+            }
+        }
+
+        invalidateIfAnimating();
+    }
+
+    private void drawHeader(Canvas canvas, PinnedHeader header, long currentTime) {
+        if (header.animating) {
+            int timeLeft = (int)(header.targetTime - currentTime);
+            if (timeLeft <= 0) {
+                header.y = header.targetY;
+                header.visible = header.targetVisible;
+                header.animating = false;
+            } else {
+                header.y = header.targetY + (header.sourceY - header.targetY) * timeLeft
+                        / mAnimationDuration;
+            }
+        }
+        if (header.visible) {
+            View view = header.view;
+            int saveCount = canvas.save();
+            canvas.translate(0, header.y);
+            if (header.state == FADING) {
+                mBounds.set(0, 0, view.getWidth(), view.getHeight());
+                canvas.saveLayerAlpha(mBounds, header.alpha, Canvas.ALL_SAVE_FLAG);
+            }
+            view.draw(canvas);
+            canvas.restoreToCount(saveCount);
+        }
+    }
+}
diff --git a/src/com/android/contacts/widget/SearchEditText.java b/src/com/android/contacts/widget/SearchEditText.java
new file mode 100644
index 0000000..d8ea2be
--- /dev/null
+++ b/src/com/android/contacts/widget/SearchEditText.java
@@ -0,0 +1,141 @@
+/*
+ * 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.widget;
+
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.util.AttributeSet;
+import android.view.KeyEvent;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.EditText;
+import android.widget.TextView;
+import android.widget.TextView.OnEditorActionListener;
+
+/**
+ * A custom text editor that helps automatically dismiss the activity along with the soft
+ * keyboard.
+ */
+public class SearchEditText extends EditText implements OnEditorActionListener, TextWatcher {
+
+    private boolean mMaginfyingGlassEnabled = true;
+    private Drawable mMagnifyingGlass;
+    private OnFilterTextListener mListener;
+
+    private boolean mMagnifyingGlassShown;
+
+    public interface OnFilterTextListener {
+        void onFilterChange(String queryString);
+        void onCancelSearch();
+    }
+
+    public SearchEditText(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        addTextChangedListener(this);
+        setOnEditorActionListener(this);
+        mMagnifyingGlass = getCompoundDrawables()[2];
+        setCompoundDrawables(null, null, null, null);
+    }
+
+    public boolean isMaginfyingGlassEnabled() {
+        return mMaginfyingGlassEnabled;
+    }
+
+    public void setMaginfyingGlassEnabled(boolean flag) {
+        this.mMaginfyingGlassEnabled = flag;
+    }
+
+    public void setOnFilterTextListener(OnFilterTextListener listener) {
+        this.mListener = listener;
+    }
+
+    /**
+     * Conditionally shows a magnifying glass icon on the right side of the text field
+     * when the text it empty.
+     */
+    @Override
+    public boolean onPreDraw() {
+        boolean emptyText = TextUtils.isEmpty(getText());
+        if (mMagnifyingGlassShown != emptyText) {
+            mMagnifyingGlassShown = emptyText;
+            if (mMagnifyingGlassShown && mMaginfyingGlassEnabled) {
+                setCompoundDrawables(null, null, mMagnifyingGlass, null);
+            } else {
+                setCompoundDrawables(null, null, null, null);
+            }
+            return false;
+        }
+        return super.onPreDraw();
+    }
+
+    /**
+     * Dismisses the search UI along with the keyboard if the filter text is empty.
+     */
+    @Override
+    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK && TextUtils.isEmpty(getText()) && mListener != null) {
+            mListener.onCancelSearch();
+            return true;
+        }
+        return false;
+    }
+
+    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+    }
+
+    @Override
+    public void onTextChanged(CharSequence s, int start, int before, int count) {
+    }
+
+    /**
+     * Event handler for search UI.
+     */
+    public void afterTextChanged(Editable s) {
+        if (mListener != null) {
+            mListener.onFilterChange(trim(s));
+        }
+    }
+
+    private String trim(Editable s) {
+        return s.toString().trim();
+    }
+
+    /**
+     * Event handler for search UI.
+     */
+    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+        if (actionId == EditorInfo.IME_ACTION_DONE) {
+            hideSoftKeyboard();
+            if (TextUtils.isEmpty(trim(getText())) && mListener != null) {
+                mListener.onCancelSearch();
+            }
+            return true;
+        }
+        return false;
+    }
+
+    private void hideSoftKeyboard() {
+        // Hide soft keyboard, if visible
+        InputMethodManager inputMethodManager = (InputMethodManager)
+                getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+        inputMethodManager.hideSoftInputFromWindow(getWindowToken(), 0);
+    }
+
+}
diff --git a/src/com/android/contacts/widget/SingleItemAdapter.java b/src/com/android/contacts/widget/SingleItemAdapter.java
new file mode 100644
index 0000000..3532bfc
--- /dev/null
+++ b/src/com/android/contacts/widget/SingleItemAdapter.java
@@ -0,0 +1,47 @@
+/*
+ * 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.widget;
+
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+
+/**
+ * A general purpose adapter that contains exactly one item.
+ */
+public abstract class SingleItemAdapter extends BaseAdapter {
+
+    public int getCount() {
+        return 1;
+    }
+
+    public Object getItem(int position) {
+        return null;
+    }
+
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    public View getView(int position, View convertView, ViewGroup parent) {
+        return getView(convertView, parent);
+    }
+
+    /**
+     * Creates the view.
+     */
+    protected abstract View getView(View convertView, ViewGroup parent);
+}
diff --git a/src/com/android/contacts/widget/TextHighlightingAnimation.java b/src/com/android/contacts/widget/TextHighlightingAnimation.java
new file mode 100644
index 0000000..21bbc63
--- /dev/null
+++ b/src/com/android/contacts/widget/TextHighlightingAnimation.java
@@ -0,0 +1,300 @@
+/*
+ * 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.widget;
+
+import com.android.internal.R;
+
+import android.database.CharArrayBuffer;
+import android.graphics.Color;
+import android.os.Handler;
+import android.text.TextPaint;
+import android.text.style.CharacterStyle;
+import android.view.animation.AccelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
+
+/**
+ * An animation that alternately dims and brightens the non-highlighted portion of text.
+ */
+public abstract class TextHighlightingAnimation implements Runnable, TextWithHighlightingFactory {
+
+    private static final int MAX_ALPHA = 255;
+    private static final int MIN_ALPHA = 50;
+
+    private AccelerateInterpolator ACCELERATE_INTERPOLATOR = new AccelerateInterpolator();
+    private DecelerateInterpolator DECELERATE_INTERPOLATOR = new DecelerateInterpolator();
+
+    private final static DimmingSpan[] sEmptySpans = new DimmingSpan[0];
+
+    /**
+     * Frame rate expressed a number of millis between frames.
+     */
+    private static final long FRAME_RATE = 50;
+
+    private DimmingSpan mDimmingSpan;
+    private Handler mHandler;
+    private boolean mAnimating;
+    private boolean mDimming;
+    private long mTargetTime;
+    private final int mDuration;
+
+    /**
+     * A Spanned that highlights a part of text by dimming another part of that text.
+     */
+    public class TextWithHighlightingImpl implements TextWithHighlighting {
+
+        private final DimmingSpan[] mSpans;
+        private boolean mDimmingEnabled;
+        private CharArrayBuffer mText;
+        private int mDimmingSpanStart;
+        private int mDimmingSpanEnd;
+        private String mString;
+
+        public TextWithHighlightingImpl() {
+            mSpans = new DimmingSpan[] { mDimmingSpan };
+        }
+
+        public void setText(CharArrayBuffer baseText, CharArrayBuffer highlightedText) {
+            mText = baseText;
+
+            // TODO figure out a way to avoid string allocation
+            mString = new String(mText.data, 0, mText.sizeCopied);
+
+            int index = indexOf(baseText, highlightedText);
+
+            if (index == 0 || index == -1) {
+                mDimmingEnabled = false;
+            } else {
+                mDimmingEnabled = true;
+                mDimmingSpanStart = 0;
+                mDimmingSpanEnd = index;
+            }
+        }
+
+        /**
+         * An implementation of indexOf on CharArrayBuffers that finds the first match of
+         * the start of buffer2 in buffer1.  For example, indexOf("abcd", "cdef") == 2
+         */
+        private int indexOf(CharArrayBuffer buffer1, CharArrayBuffer buffer2) {
+            char[] string1 = buffer1.data;
+            char[] string2 = buffer2.data;
+            int count1 = buffer1.sizeCopied;
+            int count2 = buffer2.sizeCopied;
+
+            // Ignore matching tails of the two buffers
+            while (count1 > 0 && count2 > 0 && string1[count1 - 1] == string2[count2 - 1]) {
+                count1--;
+                count2--;
+            }
+
+            int size = count2;
+            for (int i = 0; i < count1; i++) {
+                if (i + size > count1) {
+                    size = count1 - i;
+                }
+                int j;
+                for (j = 0; j < size; j++) {
+                    if (string1[i+j] != string2[j]) {
+                        break;
+                    }
+                }
+                if (j == size) {
+                    return i;
+                }
+            }
+
+            return -1;
+        }
+
+
+        @SuppressWarnings("unchecked")
+        public <T> T[] getSpans(int start, int end, Class<T> type) {
+            if (mDimmingEnabled) {
+                return (T[])mSpans;
+            } else {
+                return (T[])sEmptySpans;
+            }
+        }
+
+        public int getSpanStart(Object tag) {
+            // We only have one span - no need to check the tag parameter
+            return mDimmingSpanStart;
+        }
+
+        public int getSpanEnd(Object tag) {
+            // We only have one span - no need to check the tag parameter
+            return mDimmingSpanEnd;
+        }
+
+        public int getSpanFlags(Object tag) {
+            // String is immutable - flags not needed
+            return 0;
+        }
+
+        public int nextSpanTransition(int start, int limit, Class type) {
+            // Never called since we only have one span
+            return 0;
+        }
+
+        public char charAt(int index) {
+            return mText.data[index];
+        }
+
+        public int length() {
+            return mText.sizeCopied;
+        }
+
+        public CharSequence subSequence(int start, int end) {
+            // Never called - implementing for completeness
+            return new String(mText.data, start, end);
+        }
+
+        @Override
+        public String toString() {
+            return mString;
+        }
+    }
+
+    /**
+     * A Span that modifies alpha of the default foreground color.
+     */
+    private static class DimmingSpan extends CharacterStyle {
+        private int mAlpha;
+
+        public void setAlpha(int alpha) {
+            mAlpha = alpha;
+        }
+
+        @Override
+        public void updateDrawState(TextPaint ds) {
+
+            // Only dim the text in the basic state; not selected, focused or pressed
+            int[] states = ds.drawableState;
+            if (states != null) {
+                int count = states.length;
+                for (int i = 0; i < count; i++) {
+                    switch (states[i]) {
+                        case R.attr.state_pressed:
+                        case R.attr.state_selected:
+                        case R.attr.state_focused:
+                            // We can simply return, because the supplied text
+                            // paint is already configured with defaults.
+                            return;
+                    }
+                }
+            }
+
+            int color = ds.getColor();
+            color = Color.argb(mAlpha, Color.red(color), Color.green(color), Color.blue(color));
+            ds.setColor(color);
+        }
+    }
+
+    /**
+     * Constructor.
+     */
+    public TextHighlightingAnimation(int duration) {
+        mDuration = duration;
+        mHandler = new Handler();
+        mDimmingSpan = new DimmingSpan();
+        mDimmingSpan.setAlpha(MAX_ALPHA);
+    }
+
+    /**
+     * Returns a Spanned that can be used by a text view to show text with highlighting.
+     */
+    public TextWithHighlightingImpl createTextWithHighlighting() {
+        return new TextWithHighlightingImpl();
+    }
+
+    /**
+     * Override and invalidate (redraw) TextViews showing {@link TextWithHighlightingImpl}.
+     */
+    protected abstract void invalidate();
+
+    /**
+     * Starts the highlighting animation, which will dim portions of text.
+     */
+    public void startHighlighting() {
+        startAnimation(true);
+    }
+
+    /**
+     * Starts un-highlighting animation, which will brighten the dimmed portions of text
+     * to the brightness level of the rest of text.
+     */
+    public void stopHighlighting() {
+        startAnimation(false);
+    }
+
+    /**
+     * Called when the animation starts.
+     */
+    protected void onAnimationStarted() {
+    }
+
+    /**
+     * Called when the animation has stopped.
+     */
+    protected void onAnimationEnded() {
+    }
+
+    private void startAnimation(boolean dim) {
+        if (mDimming != dim) {
+            mDimming = dim;
+            long now = System.currentTimeMillis();
+            if (!mAnimating) {
+                mAnimating = true;
+                mTargetTime = now + mDuration;
+                onAnimationStarted();
+                mHandler.post(this);
+            } else  {
+
+                // If we have started dimming, reverse the direction and adjust the target
+                // time accordingly.
+                mTargetTime = (now + mDuration) - (mTargetTime - now);
+            }
+        }
+    }
+
+    /**
+     * Animation step.
+     */
+    public void run() {
+        long now = System.currentTimeMillis();
+        long timeLeft = mTargetTime - now;
+        if (timeLeft < 0) {
+            mDimmingSpan.setAlpha(mDimming ? MIN_ALPHA : MAX_ALPHA);
+            mAnimating = false;
+            onAnimationEnded();
+            return;
+        }
+
+        // Start=1, end=0
+        float virtualTime = (float)timeLeft / mDuration;
+        if (mDimming) {
+            float interpolatedTime = DECELERATE_INTERPOLATOR.getInterpolation(virtualTime);
+            mDimmingSpan.setAlpha((int)(MIN_ALPHA + (MAX_ALPHA-MIN_ALPHA) * interpolatedTime));
+        } else {
+            float interpolatedTime = ACCELERATE_INTERPOLATOR.getInterpolation(virtualTime);
+            mDimmingSpan.setAlpha((int)(MIN_ALPHA + (MAX_ALPHA-MIN_ALPHA) * (1-interpolatedTime)));
+        }
+
+        invalidate();
+
+        // Repeat
+        mHandler.postDelayed(this, FRAME_RATE);
+    }
+}
diff --git a/src/com/android/contacts/widget/TextWithHighlighting.java b/src/com/android/contacts/widget/TextWithHighlighting.java
new file mode 100644
index 0000000..3a32b02
--- /dev/null
+++ b/src/com/android/contacts/widget/TextWithHighlighting.java
@@ -0,0 +1,26 @@
+/*
+ * 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.widget;
+
+import android.database.CharArrayBuffer;
+import android.text.Spanned;
+
+/**
+ * A Spanned that highlights a part of text by dimming another part of that text.
+ */
+public interface TextWithHighlighting extends Spanned {
+    void setText(CharArrayBuffer baseText, CharArrayBuffer highlightedText);
+}
diff --git a/src/com/android/contacts/widget/TextWithHighlightingFactory.java b/src/com/android/contacts/widget/TextWithHighlightingFactory.java
new file mode 100644
index 0000000..ee5744d
--- /dev/null
+++ b/src/com/android/contacts/widget/TextWithHighlightingFactory.java
@@ -0,0 +1,23 @@
+/*
+ * 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.widget;
+
+/**
+ * A factory for text fields with animated highlighting.
+ */
+public interface TextWithHighlightingFactory {
+    TextWithHighlighting createTextWithHighlighting();
+}
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 7af1a54..0c5ee70 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -4,9 +4,9 @@
      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.
@@ -17,25 +17,57 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.android.contacts.tests">
 
+    <uses-permission android:name="android.permission.READ_CONTACTS" />
+
     <application>
         <uses-library android:name="android.test.runner" />
         <meta-data android:name="com.android.contacts.iconset" android:resource="@xml/iconset" />
+        <uses-permission android:name="android.permission.READ_CONTACTS" />
+
+        <activity android:name=".allintents.AllIntentsActivity"
+            android:label="@string/contactsIntents"
+            >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name=".allintents.ResultActivity"
+            android:label="@string/result"
+            >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name=".widget.PinnedHeaderUseCaseActivity"
+            android:label="@string/pinnedHeaderList"
+            >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
     </application>
 
     <instrumentation android:name="android.test.InstrumentationTestRunner"
         android:targetPackage="com.android.contacts"
         android:label="Contacts app tests">
     </instrumentation>
-    
+
     <instrumentation android:name="com.android.contacts.ContactsLaunchPerformance"
         android:targetPackage="com.android.contacts"
         android:label="Contacts launch performance">
     </instrumentation>
 
-
     <instrumentation android:name="com.android.contacts.DialerLaunchPerformance"
         android:targetPackage="com.android.contacts"
         android:label="Dialer launch performance">
     </instrumentation>
 
-</manifest> 
+</manifest>
diff --git a/tests/assets/v21_simple.vcf b/tests/assets/v21_simple.vcf
new file mode 100644
index 0000000..86f4d33
--- /dev/null
+++ b/tests/assets/v21_simple.vcf
@@ -0,0 +1,3 @@
+BEGIN:VCARD
+N:test
+END:VCARD
\ No newline at end of file
diff --git a/tests/assets/v30_simple.vcf b/tests/assets/v30_simple.vcf
new file mode 100644
index 0000000..418661f
--- /dev/null
+++ b/tests/assets/v30_simple.vcf
@@ -0,0 +1,13 @@
+BEGIN:VCARD
+VERSION:3.0
+FN:And Roid
+N:And;Roid;;;
+ORG:Open;Handset; Alliance
+SORT-STRING:android
+TEL;TYPE=PREF;TYPE=VOICE:0300000000
+CLASS:PUBLIC
+X-GNO:0
+X-GN:group0
+X-REDUCTION:0
+REV:20081031T065854Z
+END:VCARD
diff --git a/tests/res/layout/intent_list_item.xml b/tests/res/layout/intent_list_item.xml
new file mode 100644
index 0000000..4749224
--- /dev/null
+++ b/tests/res/layout/intent_list_item.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 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.
+-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@android:id/text1"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:textAppearance="?android:attr/textAppearanceSmall"
+    android:gravity="center_vertical"
+    android:paddingLeft="6dip"
+    android:minHeight="?android:attr/listPreferredItemHeight"
+/>
diff --git a/tests/res/layout/result.xml b/tests/res/layout/result.xml
new file mode 100644
index 0000000..0ab32c6
--- /dev/null
+++ b/tests/res/layout/result.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:fillViewport="true"
+>
+
+  <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
+      android:id="@+id/table"
+      android:layout_width="match_parent"
+      android:layout_height="match_parent"
+      android:shrinkColumns="1"
+      android:stretchColumns="*">
+  </TableLayout>
+</ScrollView>
+
diff --git a/tests/res/values/donottranslate_strings.xml b/tests/res/values/donottranslate_strings.xml
new file mode 100644
index 0000000..25e10b0
--- /dev/null
+++ b/tests/res/values/donottranslate_strings.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <string name="contactsIntents">Contacts Intents</string>
+    <string name="result">Result returned by activity</string>
+
+    <string-array name="allIntents">
+        <!-- List modes -->
+        <item>LIST_DEFAULT</item>
+        <item>LIST_ALL_CONTACTS_ACTION</item>
+        <item>LIST_CONTACTS_WITH_PHONES_ACTION</item>
+        <item>LIST_STARRED_ACTION</item>
+        <item>LIST_STARRED_ACTION (filter)</item>
+        <item>LIST_FREQUENT_ACTION</item>
+        <item>LIST_FREQUENT_ACTION (filter)</item>
+        <item>LIST_STREQUENT_ACTION</item>
+        <item>LIST_STREQUENT_ACTION (filter)</item>
+        <item>ACTION_PICK: contact</item>
+        <item>ACTION_PICK: contact (legacy)</item>
+        <item>ACTION_PICK: phone</item>
+        <item>ACTION_PICK: phone (legacy)</item>
+        <item>ACTION_PICK: postal</item>
+        <item>ACTION_PICK: postal (legacy)</item>
+        <item>ACTION_CREATE_SHORTCUT: contact</item>
+        <item>ACTION_CREATE_SHORTCUT: contact (filter)</item>
+        <item>ACTION_CREATE_SHORTCUT: dial</item>
+        <item>ACTION_CREATE_SHORTCUT: dial (filter)</item>
+        <item>ACTION_CREATE_SHORTCUT: message</item>
+        <item>ACTION_CREATE_SHORTCUT: message (filter)</item>
+        <item>ACTION_GET_CONTENT: contact</item>
+        <item>ACTION_GET_CONTENT: contact (filter)</item>
+        <item>ACTION_GET_CONTENT: contact (legacy)</item>
+        <item>ACTION_GET_CONTENT: contact (filter, legacy)</item>
+        <item>ACTION_GET_CONTENT: phone</item>
+        <item>ACTION_GET_CONTENT: phone (filter)</item>
+        <item>ACTION_GET_CONTENT: phone (legacy)</item>
+        <item>ACTION_GET_CONTENT: postal</item>
+        <item>ACTION_GET_CONTENT: postal (filter)</item>
+        <item>ACTION_GET_CONTENT: postal (legacy)</item>
+        <item>ACTION_INSERT_OR_EDIT</item>
+        <item>ACTION_SEARCH (call button)</item>
+        <item>ACTION_SEARCH: contact</item>
+        <item>ACTION_SEARCH: email</item>
+        <item>ACTION_SEARCH: phone</item>
+        <item>SEARCH_SUGGESTION_CLICKED (call button)</item>
+        <item>SEARCH_SUGGESTION_CLICKED: contact</item>
+        <item>SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED</item>
+        <item>SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED</item>
+        <item>TODO: JOIN_CONTACT</item>
+        <item>ACTION_GET_MULTIPLE_PHONES</item>
+
+        <!-- Edit Contact -->
+        <item>EDIT (content uri with only id)</item>
+        <item>EDIT (lookup uri without id)</item>
+        <item>EDIT (lookup uri)</item>
+        <item>EDIT (called for raw contact)</item>
+        <item>EDIT (legacy style uri)</item>
+        <item>EDIT (create new contact)</item>
+        <item>EDIT (create new contact with data)</item>
+        <item>EDIT (create new raw contact)</item>
+        <item>EDIT (create new legacy)</item>
+
+        <!-- View Contact -->
+        <item>VIEW (content uri with only id)</item>
+        <item>VIEW (lookup uri without id)</item>
+        <item>VIEW (lookup uri)</item>
+        <item>VIEW (called for raw contact)</item>
+        <item>VIEW (legacy style uri)</item>
+    </string-array>
+
+    <string name="pinnedHeaderList">Pinned Headers</string>
+
+    <string-array name="pinnedHeaderUseCases">
+        <item>One short section - no headers</item>
+        <item>Two short sections with headers</item>
+        <item>Five short sections with headers</item>
+    </string-array>
+</resources>
diff --git a/tests/src/com/android/contacts/ContactDetailTest.java b/tests/src/com/android/contacts/ContactDetailTest.java
new file mode 100644
index 0000000..0b850b7
--- /dev/null
+++ b/tests/src/com/android/contacts/ContactDetailTest.java
@@ -0,0 +1,41 @@
+package com.android.contacts;
+
+import com.android.contacts.activities.ContactDetailActivity;
+import com.android.contacts.tests.mocks.ContactsMockContext;
+import com.android.contacts.tests.mocks.MockContentProvider;
+
+import android.test.ActivityUnitTestCase;
+
+public class ContactDetailTest extends ActivityUnitTestCase<ContactDetailActivity> {
+    private ContactsMockContext mContext;
+    private MockContentProvider mContactsProvider;
+
+    public ContactDetailTest() {
+        super(ContactDetailActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mContext = new ContactsMockContext(getInstrumentation().getTargetContext());
+        mContactsProvider = mContext.getContactsProvider();
+        setActivityContext(mContext);
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+//    public void testFoo() {
+//        // Use lookup-style Uris that also contain the Contact-ID
+//        //long rawContactId1 = mCreator.createRawContact("JohnDoe", "John", "Doe");
+//        //long contactId1 = mCreator.getContactIdByRawContactId(rawContactId1);
+//        //Uri contactUri1 = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId1);
+//        Intent intent = new Intent(Intent.ACTION_VIEW,
+//                ContentUris.withAppendedId(Contacts.CONTENT_URI, 123));
+//        startActivity(intent, null, null);
+//        ContactDetailActivity activity = getActivity();
+//        mContactsProvider.verify();
+//    }
+}
diff --git a/tests/src/com/android/contacts/ContactLoaderTest.java b/tests/src/com/android/contacts/ContactLoaderTest.java
new file mode 100644
index 0000000..3ef109d
--- /dev/null
+++ b/tests/src/com/android/contacts/ContactLoaderTest.java
@@ -0,0 +1,350 @@
+/*
+ * 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;
+
+import com.android.contacts.tests.mocks.ContactsMockContext;
+import com.android.contacts.tests.mocks.MockContentProvider;
+import com.android.contacts.views.ContactLoader;
+
+import android.content.ContentUris;
+import android.net.Uri;
+import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
+import android.provider.ContactsContract.CommonDataKinds.StructuredName;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.DisplayNameSources;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.ContactsContract.StatusUpdates;
+import android.test.LoaderTestCase;
+
+/**
+ * Runs ContactLoader tests for the the contact-detail and editor view.
+ */
+public class ContactLoaderTest extends LoaderTestCase {
+    ContactsMockContext mMockContext;
+    MockContentProvider mContactsProvider;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mMockContext = new ContactsMockContext(getContext());
+        mContactsProvider = mMockContext.getContactsProvider();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    private ContactLoader.Result assertLoadContact(Uri uri) {
+        final ContactLoader loader = new ContactLoader(mMockContext, uri);
+        return getLoaderResultSynchronously(loader);
+    }
+
+    public void testNullUri() {
+        ContactLoader.Result result = assertLoadContact(null);
+        assertEquals(ContactLoader.Result.ERROR, result);
+    }
+
+    public void testEmptyUri() {
+        ContactLoader.Result result = assertLoadContact(Uri.EMPTY);
+        assertEquals(ContactLoader.Result.ERROR, result);
+    }
+
+    public void testInvalidUri() {
+        ContactLoader.Result result = assertLoadContact(Uri.parse("content://wtf"));
+        assertEquals(ContactLoader.Result.ERROR, result);
+    }
+
+    public void testLoadContactWithContactIdUri() {
+        // Use content Uris that only contain the ID
+        final long contactId = 1;
+        final long rawContactId = 11;
+        final long dataId = 21;
+
+        final String lookupKey = "aa%12%@!";
+        final Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+        final Uri entityUri = Uri.withAppendedPath(baseUri, Contacts.Entity.CONTENT_DIRECTORY);
+        final Uri lookupUri = ContentUris.withAppendedId(
+                Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey),
+                contactId);
+
+        ContactQueries queries = new ContactQueries();
+        mContactsProvider.expectTypeQuery(baseUri, Contacts.CONTENT_ITEM_TYPE);
+        queries.fetchAllData(entityUri, contactId, rawContactId, dataId, lookupKey);
+
+        ContactLoader.Result contact = assertLoadContact(baseUri);
+
+        assertEquals(contactId, contact.getId());
+        assertEquals(rawContactId, contact.getNameRawContactId());
+        assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource());
+        assertEquals(lookupKey, contact.getLookupKey());
+        assertEquals(lookupUri, contact.getLookupUri());
+        assertEquals(1, contact.getEntities().size());
+        assertEquals(1, contact.getStatuses().size());
+        mContactsProvider.verify();
+    }
+
+    public void testLoadContactWithOldStyleUri() {
+        // Use content Uris that only contain the ID but use the format used in Donut
+        final long contactId = 1;
+        final long rawContactId = 11;
+        final long dataId = 21;
+
+        final String lookupKey = "aa%12%@!";
+        final Uri legacyUri = ContentUris.withAppendedId(
+                Uri.parse("content://contacts"), rawContactId);
+        final Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
+        final Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+        final Uri lookupUri = ContentUris.withAppendedId(
+                Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey),
+                contactId);
+        final Uri entityUri = Uri.withAppendedPath(lookupUri, Contacts.Entity.CONTENT_DIRECTORY);
+
+        ContactQueries queries = new ContactQueries();
+        queries.fetchContactIdAndLookupFromRawContactUri(rawContactUri, contactId, lookupKey);
+        queries.fetchAllData(entityUri, contactId, rawContactId, dataId, lookupKey);
+
+        ContactLoader.Result contact = assertLoadContact(legacyUri);
+
+        assertEquals(contactId, contact.getId());
+        assertEquals(rawContactId, contact.getNameRawContactId());
+        assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource());
+        assertEquals(lookupKey, contact.getLookupKey());
+        assertEquals(lookupUri, contact.getLookupUri());
+        assertEquals(1, contact.getEntities().size());
+        assertEquals(1, contact.getStatuses().size());
+        mContactsProvider.verify();
+    }
+
+    public void testLoadContactWithRawContactIdUri() {
+        // Use content Uris that only contain the ID but use the format used in Donut
+        final long contactId = 1;
+        final long rawContactId = 11;
+        final long dataId = 21;
+
+        final String lookupKey = "aa%12%@!";
+        final Uri rawContactUri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
+        final Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+        final Uri lookupUri = ContentUris.withAppendedId(
+                Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey),
+                contactId);
+        final Uri entityUri = Uri.withAppendedPath(lookupUri, Contacts.Entity.CONTENT_DIRECTORY);
+
+        ContactQueries queries = new ContactQueries();
+        mContactsProvider.expectTypeQuery(rawContactUri, RawContacts.CONTENT_ITEM_TYPE);
+        queries.fetchContactIdAndLookupFromRawContactUri(rawContactUri, contactId, lookupKey);
+        queries.fetchAllData(entityUri, contactId, rawContactId, dataId, lookupKey);
+
+        ContactLoader.Result contact = assertLoadContact(rawContactUri);
+
+        assertEquals(contactId, contact.getId());
+        assertEquals(rawContactId, contact.getNameRawContactId());
+        assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource());
+        assertEquals(lookupKey, contact.getLookupKey());
+        assertEquals(lookupUri, contact.getLookupUri());
+        assertEquals(1, contact.getEntities().size());
+        assertEquals(1, contact.getStatuses().size());
+        mContactsProvider.verify();
+    }
+
+    public void testLoadContactWithContactLookupUri() {
+        // Use lookup-style Uris that do not contain the Contact-ID
+
+        final long contactId = 1;
+        final long rawContactId = 11;
+        final long dataId = 21;
+
+        final String lookupKey = "aa%12%@!";
+        final Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+        final Uri lookupNoIdUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey);
+        final Uri lookupUri = ContentUris.withAppendedId(lookupNoIdUri, contactId);
+        final Uri entityUri = Uri.withAppendedPath(lookupNoIdUri, Contacts.Entity.CONTENT_DIRECTORY);
+
+        ContactQueries queries = new ContactQueries();
+        mContactsProvider.expectTypeQuery(lookupNoIdUri, Contacts.CONTENT_ITEM_TYPE);
+        queries.fetchAllData(entityUri, contactId, rawContactId, dataId, lookupKey);
+
+        ContactLoader.Result contact = assertLoadContact(lookupNoIdUri);
+
+        assertEquals(contactId, contact.getId());
+        assertEquals(rawContactId, contact.getNameRawContactId());
+        assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource());
+        assertEquals(lookupKey, contact.getLookupKey());
+        assertEquals(lookupUri, contact.getLookupUri());
+        assertEquals(1, contact.getEntities().size());
+        assertEquals(1, contact.getStatuses().size());
+        mContactsProvider.verify();
+    }
+
+    public void testLoadContactWithContactLookupAndIdUri() {
+        // Use lookup-style Uris that also contain the Contact-ID
+        final long contactId = 1;
+        final long rawContactId = 11;
+        final long dataId = 21;
+
+        final String lookupKey = "aa%12%@!";
+        final Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+        final Uri lookupUri = ContentUris.withAppendedId(
+                Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey),
+                contactId);
+        final Uri entityUri = Uri.withAppendedPath(lookupUri, Contacts.Entity.CONTENT_DIRECTORY);
+
+        ContactQueries queries = new ContactQueries();
+        mContactsProvider.expectTypeQuery(lookupUri, Contacts.CONTENT_ITEM_TYPE);
+        queries.fetchAllData(entityUri, contactId, rawContactId, dataId, lookupKey);
+
+        ContactLoader.Result contact = assertLoadContact(lookupUri);
+
+        assertEquals(contactId, contact.getId());
+        assertEquals(rawContactId, contact.getNameRawContactId());
+        assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource());
+        assertEquals(lookupKey, contact.getLookupKey());
+        assertEquals(lookupUri, contact.getLookupUri());
+        assertEquals(1, contact.getEntities().size());
+        assertEquals(1, contact.getStatuses().size());
+        mContactsProvider.verify();
+    }
+
+    public void testLoadContactWithContactLookupWithIncorrectIdUri() {
+        // Use lookup-style Uris that contain incorrect Contact-ID
+        // (we want to ensure that still the correct contact is chosen)
+
+        final long contactId = 1;
+        final long wrongContactId = 2;
+        final long rawContactId = 11;
+        final long wrongRawContactId = 12;
+        final long dataId = 21;
+
+        final String lookupKey = "aa%12%@!";
+        final String wrongLookupKey = "ab%12%@!";
+        final Uri baseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+        final Uri wrongBaseUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, wrongContactId);
+        final Uri lookupUri = ContentUris.withAppendedId(
+                Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey),
+                contactId);
+        final Uri lookupWithWrongIdUri = ContentUris.withAppendedId(
+                Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey),
+                wrongContactId);
+        final Uri entityUri = Uri.withAppendedPath(lookupWithWrongIdUri,
+                Contacts.Entity.CONTENT_DIRECTORY);
+
+        ContactQueries queries = new ContactQueries();
+        mContactsProvider.expectTypeQuery(lookupWithWrongIdUri, Contacts.CONTENT_ITEM_TYPE);
+        queries.fetchAllData(entityUri, contactId, rawContactId, dataId, lookupKey);
+
+        ContactLoader.Result contact = assertLoadContact(lookupWithWrongIdUri);
+
+        assertEquals(contactId, contact.getId());
+        assertEquals(rawContactId, contact.getNameRawContactId());
+        assertEquals(DisplayNameSources.STRUCTURED_NAME, contact.getDisplayNameSource());
+        assertEquals(lookupKey, contact.getLookupKey());
+        assertEquals(lookupUri, contact.getLookupUri());
+        assertEquals(1, contact.getEntities().size());
+        assertEquals(1, contact.getStatuses().size());
+
+        mContactsProvider.verify();
+    }
+
+    class ContactQueries {
+        public void fetchAllData(
+                Uri baseUri, long contactId, long rawContactId, long dataId, String encodedLookup) {
+            mContactsProvider.expectQuery(baseUri)
+                    .withProjection(new String[] {
+                        Contacts.NAME_RAW_CONTACT_ID, Contacts.DISPLAY_NAME_SOURCE,
+                        Contacts.LOOKUP_KEY, Contacts.DISPLAY_NAME, Contacts.PHONETIC_NAME,
+                        Contacts.PHOTO_ID, Contacts.STARRED, Contacts.CONTACT_PRESENCE,
+                        Contacts.CONTACT_STATUS, Contacts.CONTACT_STATUS_TIMESTAMP,
+                        Contacts.CONTACT_STATUS_RES_PACKAGE, Contacts.CONTACT_STATUS_LABEL,
+
+                        Contacts.Entity.CONTACT_ID,
+                        Contacts.Entity.RAW_CONTACT_ID,
+
+                        RawContacts.ACCOUNT_NAME, RawContacts.ACCOUNT_TYPE, RawContacts.DIRTY,
+                        RawContacts.VERSION, RawContacts.SOURCE_ID, RawContacts.SYNC1,
+                        RawContacts.SYNC2, RawContacts.SYNC3, RawContacts.SYNC4,
+                        RawContacts.DELETED, RawContacts.IS_RESTRICTED,
+                        RawContacts.NAME_VERIFIED,
+
+                        Contacts.Entity.DATA_ID,
+
+                        Data.DATA1, Data.DATA2, Data.DATA3, Data.DATA4, Data.DATA5,
+                        Data.DATA6, Data.DATA7, Data.DATA8, Data.DATA9, Data.DATA10,
+                        Data.DATA11, Data.DATA12, Data.DATA13, Data.DATA14, Data.DATA15,
+                        Data.SYNC1, Data.SYNC2, Data.SYNC3, Data.SYNC4,
+                        Data.DATA_VERSION, Data.IS_PRIMARY,
+                        Data.IS_SUPER_PRIMARY, Data.MIMETYPE, Data.RES_PACKAGE,
+
+                        GroupMembership.GROUP_SOURCE_ID,
+
+                        Data.PRESENCE, Data.CHAT_CAPABILITY,
+                        Data.STATUS, Data.STATUS_RES_PACKAGE, Data.STATUS_ICON,
+                        Data.STATUS_LABEL, Data.STATUS_TIMESTAMP,
+                    })
+                    .withSortOrder(Contacts.Entity.RAW_CONTACT_ID)
+                    .returnRow(
+                        rawContactId, 40,
+                        "aa%12%@!", "John Doe", "jdo",
+                        0, 0, StatusUpdates.AVAILABLE,
+                        "Having lunch", 0,
+                        "mockPkg1", 10,
+
+                        contactId,
+                        rawContactId,
+
+                        "mockAccountName", "mockAccountType", 0,
+                        1, 0, "sync1",
+                        "sync2", "sync3", "sync4",
+                        0, 0, 0,
+
+                        dataId,
+
+                        "dat1", "dat2", "dat3", "dat4", "dat5",
+                        "dat6", "dat7", "dat8", "dat9", "dat10",
+                        "dat11", "dat12", "dat13", "dat14", "dat15",
+                        "syn1", "syn2", "syn3", "syn4",
+
+                        0, 0,
+                        0, StructuredName.CONTENT_ITEM_TYPE, "mockPkg2",
+
+                        "groupId",
+
+                        StatusUpdates.INVISIBLE, null,
+                        "Having dinner", "mockPkg3", 0,
+                        20, 0
+                    );
+        }
+
+        void fetchLookupAndId(final Uri sourceUri, final long expectedContactId,
+                final String expectedEncodedLookup) {
+            mContactsProvider.expectQuery(sourceUri)
+                    .withProjection(Contacts.LOOKUP_KEY, Contacts._ID)
+                    .returnRow(expectedEncodedLookup, expectedContactId);
+        }
+
+        void fetchContactIdAndLookupFromRawContactUri(final Uri rawContactUri,
+                final long expectedContactId, final String expectedEncodedLookup) {
+            // TODO: use a lighter query by joining rawcontacts with contacts in provider
+            // (See ContactContracts.java)
+            final Uri dataUri = Uri.withAppendedPath(rawContactUri,
+                    RawContacts.Data.CONTENT_DIRECTORY);
+            mContactsProvider.expectQuery(dataUri)
+                    .withProjection(RawContacts.CONTACT_ID, Contacts.LOOKUP_KEY)
+                    .returnRow(expectedContactId, expectedEncodedLookup);
+        }
+    }
+}
diff --git a/tests/src/com/android/contacts/ContactsUtilsTests.java b/tests/src/com/android/contacts/ContactsUtilsTests.java
index 8e18044..7e85c32 100644
--- a/tests/src/com/android/contacts/ContactsUtilsTests.java
+++ b/tests/src/com/android/contacts/ContactsUtilsTests.java
@@ -16,6 +16,8 @@
 
 package com.android.contacts;
 
+import com.android.contacts.ContactsUtils.ImActions;
+
 import android.content.ContentValues;
 import android.content.Intent;
 import android.net.Uri;
@@ -34,24 +36,63 @@
     private static final String TEST_PROTOCOL = "prot%col";
 
     public void testImIntent() throws Exception {
-        // Normal IM is appended as path
+        // Test GTalk XMPP URI. No chat capabilities provided
         final ContentValues values = new ContentValues();
         values.put(Im.MIMETYPE, Im.CONTENT_ITEM_TYPE);
         values.put(Im.TYPE, Im.TYPE_HOME);
         values.put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK);
         values.put(Im.DATA, TEST_ADDRESS);
 
-        final Intent intent = ContactsUtils.buildImIntent(values);
+        final ImActions imActions = ContactsUtils.buildImActions(values);
+        final Intent intent = imActions.getPrimaryIntent();
         assertEquals(Intent.ACTION_SENDTO, intent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?message", intent.getData().toString());
 
-        final Uri data = intent.getData();
-        assertEquals("imto", data.getScheme());
-        assertEquals("gtalk", data.getAuthority());
-        assertEquals(TEST_ADDRESS, data.getPathSegments().get(0));
+        assertNull(imActions.getSecondaryIntent());
+    }
+
+    public void testImIntentWithAudio() throws Exception {
+        // Test GTalk XMPP URI. Audio chat capabilities provided
+        final ContentValues values = new ContentValues();
+        values.put(Im.MIMETYPE, Im.CONTENT_ITEM_TYPE);
+        values.put(Im.TYPE, Im.TYPE_HOME);
+        values.put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK);
+        values.put(Im.DATA, TEST_ADDRESS);
+        values.put(Im.CHAT_CAPABILITY, Im.CAPABILITY_HAS_VOICE | Im.CAPABILITY_HAS_VIDEO);
+
+        final ImActions imActions = ContactsUtils.buildImActions(values);
+        final Intent primaryIntent = imActions.getPrimaryIntent();
+        assertEquals(Intent.ACTION_SENDTO, primaryIntent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?message", primaryIntent.getData().toString());
+
+        final Intent secondaryIntent = imActions.getSecondaryIntent();
+        assertEquals(Intent.ACTION_SENDTO, secondaryIntent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?call", secondaryIntent.getData().toString());
+    }
+
+    public void testImIntentWithVideo() throws Exception {
+        // Test GTalk XMPP URI. Video chat capabilities provided
+        final ContentValues values = new ContentValues();
+        values.put(Im.MIMETYPE, Im.CONTENT_ITEM_TYPE);
+        values.put(Im.TYPE, Im.TYPE_HOME);
+        values.put(Im.PROTOCOL, Im.PROTOCOL_GOOGLE_TALK);
+        values.put(Im.DATA, TEST_ADDRESS);
+        values.put(Im.CHAT_CAPABILITY, Im.CAPABILITY_HAS_VOICE | Im.CAPABILITY_HAS_VIDEO |
+                Im.CAPABILITY_HAS_VOICE);
+
+        final ImActions imActions = ContactsUtils.buildImActions(values);
+        final Intent primaryIntent = imActions.getPrimaryIntent();
+        assertEquals(Intent.ACTION_SENDTO, primaryIntent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?message", primaryIntent.getData().toString());
+
+        final Intent secondaryIntent = imActions.getSecondaryIntent();
+        assertEquals(Intent.ACTION_SENDTO, secondaryIntent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?call", secondaryIntent.getData().toString());
     }
 
     public void testImIntentCustom() throws Exception {
-        // Custom IM types have encoded authority
+        // Custom IM types have encoded authority. We send the imto Intent here, because
+        // legacy third party apps might not accept xmpp yet
         final ContentValues values = new ContentValues();
         values.put(Im.MIMETYPE, Im.CONTENT_ITEM_TYPE);
         values.put(Im.TYPE, Im.TYPE_HOME);
@@ -59,29 +100,37 @@
         values.put(Im.CUSTOM_PROTOCOL, TEST_PROTOCOL);
         values.put(Im.DATA, TEST_ADDRESS);
 
-        final Intent intent = ContactsUtils.buildImIntent(values);
+        final ImActions actions = ContactsUtils.buildImActions(values);
+        final Intent intent = actions.getPrimaryIntent();
         assertEquals(Intent.ACTION_SENDTO, intent.getAction());
 
         final Uri data = intent.getData();
         assertEquals("imto", data.getScheme());
         assertEquals(TEST_PROTOCOL, data.getAuthority());
         assertEquals(TEST_ADDRESS, data.getPathSegments().get(0));
+
+        assertNull(actions.getSecondaryIntent());
     }
 
     public void testImEmailIntent() throws Exception {
         // Email addresses are treated as Google Talk entries
+        // This test only tests the VIDEO+CAMERA case. The other cases have been addressed by the
+        // Im tests
         final ContentValues values = new ContentValues();
         values.put(Email.MIMETYPE, Email.CONTENT_ITEM_TYPE);
         values.put(Email.TYPE, Email.TYPE_HOME);
         values.put(Email.DATA, TEST_ADDRESS);
+        values.put(Email.CHAT_CAPABILITY, Im.CAPABILITY_HAS_VOICE | Im.CAPABILITY_HAS_VIDEO |
+                Im.CAPABILITY_HAS_VOICE);
 
-        final Intent intent = ContactsUtils.buildImIntent(values);
-        assertEquals(Intent.ACTION_SENDTO, intent.getAction());
+        final ImActions imActions = ContactsUtils.buildImActions(values);
+        final Intent primaryIntent = imActions.getPrimaryIntent();
+        assertEquals(Intent.ACTION_SENDTO, primaryIntent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?message", primaryIntent.getData().toString());
 
-        final Uri data = intent.getData();
-        assertEquals("imto", data.getScheme());
-        assertEquals("gtalk", data.getAuthority());
-        assertEquals(TEST_ADDRESS, data.getPathSegments().get(0));
+        final Intent secondaryIntent = imActions.getSecondaryIntent();
+        assertEquals(Intent.ACTION_SENDTO, secondaryIntent.getAction());
+        assertEquals("xmpp:" + TEST_ADDRESS + "?call", secondaryIntent.getData().toString());
     }
 
     public void testIsGraphicNull() throws Exception {
diff --git a/tests/src/com/android/contacts/DefaultContactBrowseListFragmentTest.java b/tests/src/com/android/contacts/DefaultContactBrowseListFragmentTest.java
new file mode 100644
index 0000000..8ad3cb9
--- /dev/null
+++ b/tests/src/com/android/contacts/DefaultContactBrowseListFragmentTest.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2009 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 com.android.contacts.list.DefaultContactBrowseListFragment;
+import com.android.contacts.tests.mocks.ContactsMockContext;
+import com.android.contacts.tests.mocks.MockContentProvider;
+import com.android.contacts.widget.TestLoaderManager;
+
+import android.database.Cursor;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.ContactCounts;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.ProviderStatus;
+import android.provider.ContactsContract.StatusUpdates;
+import android.provider.Settings;
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.Smoke;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+
+
+/**
+ * Tests for {@link DefaultContactBrowseListFragment}.
+ *
+ * Running all tests:
+ *
+ *   runtest contacts
+ * or
+ *   adb shell am instrument \
+ *     -w com.android.contacts.tests/android.test.InstrumentationTestRunner
+ */
+@Smoke
+public class DefaultContactBrowseListFragmentTest
+        extends InstrumentationTestCase {
+
+    private ContactsMockContext mContext;
+    private MockContentProvider mContactsProvider;
+    private MockContentProvider mSettingsProvider;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mContext = new ContactsMockContext(getInstrumentation().getTargetContext());
+        mContactsProvider = mContext.getContactsProvider();
+        mSettingsProvider = mContext.getSettingsProvider();
+    }
+
+    public void testDefaultMode() throws Exception {
+
+        mSettingsProvider.expectQuery(Settings.System.CONTENT_URI)
+                .withProjection(Settings.System.VALUE)
+                .withSelection(Settings.System.NAME + "=?",
+                        ContactsContract.Preferences.DISPLAY_ORDER);
+
+        mSettingsProvider.expectQuery(Settings.System.CONTENT_URI)
+                .withProjection(Settings.System.VALUE)
+                .withSelection(Settings.System.NAME + "=?",
+                        ContactsContract.Preferences.SORT_ORDER);
+
+        mContactsProvider.expectQuery(
+                Contacts.CONTENT_URI.buildUpon()
+                        .appendQueryParameter(ContactCounts.ADDRESS_BOOK_INDEX_EXTRAS, "true")
+                        .build())
+                .withProjection(
+                        Contacts._ID,
+                        Contacts.DISPLAY_NAME,
+                        Contacts.DISPLAY_NAME_ALTERNATIVE,
+                        Contacts.SORT_KEY_PRIMARY,
+                        Contacts.STARRED,
+                        Contacts.CONTACT_PRESENCE,
+                        Contacts.PHOTO_ID,
+                        Contacts.LOOKUP_KEY,
+                        Contacts.PHONETIC_NAME,
+                        Contacts.HAS_PHONE_NUMBER)
+                .withSelection(Contacts.IN_VISIBLE_GROUP + "=1")
+                .withSortOrder(Contacts.SORT_KEY_PRIMARY)
+                .returnRow(1, "John", "John", "john", 1,
+                        StatusUpdates.AVAILABLE, 23, "lk1", "john", 1)
+                .returnRow(2, "Jim", "Jim", "jim", 1,
+                        StatusUpdates.AWAY, 24, "lk2", "jim", 0);
+
+        mContactsProvider.expectQuery(ProviderStatus.CONTENT_URI)
+                .withProjection(ProviderStatus.STATUS, ProviderStatus.DATA1);
+
+        DefaultContactBrowseListFragment fragment = new DefaultContactBrowseListFragment();
+
+        TestLoaderManager loaderManager = new TestLoaderManager();
+
+        // Divert loader registration the TestLoaderManager to ensure that loading is
+        // done synchronously
+        fragment.setLoaderManager(loaderManager);
+
+        // Fragment life cycle
+        fragment.onCreate(null);
+
+        // Instead of attaching the fragment to an activity, "attach" it to the target context
+        // of the instrumentation
+        fragment.setContext(mContext);
+
+        // Fragment life cycle
+        View view = fragment.onCreateView(LayoutInflater.from(mContext), null, null);
+
+        // Fragment life cycle
+        fragment.onStart();
+
+        // All loaders have been registered. Now perform the loading synchronously.
+        loaderManager.executeLoaders();
+
+        // Now we can assert that the data got loaded into the list.
+        ListView listView = (ListView)view.findViewById(android.R.id.list);
+        ListAdapter adapter = listView.getAdapter();
+        assertEquals(3, adapter.getCount());        // It has two items + header view
+
+        // Assert that all queries have been called
+        mSettingsProvider.verify();
+        mContactsProvider.verify();
+    }
+}
diff --git a/tests/src/com/android/contacts/EntityDeltaListTests.java b/tests/src/com/android/contacts/EntityDeltaListTests.java
new file mode 100644
index 0000000..4904fa8
--- /dev/null
+++ b/tests/src/com/android/contacts/EntityDeltaListTests.java
@@ -0,0 +1,594 @@
+/*
+ * Copyright (C) 2009 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 static android.content.ContentProviderOperation.TYPE_ASSERT;
+import static android.content.ContentProviderOperation.TYPE_DELETE;
+import static android.content.ContentProviderOperation.TYPE_INSERT;
+import static android.content.ContentProviderOperation.TYPE_UPDATE;
+
+import com.android.contacts.EntityModifierTests.MockContactsSource;
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.EntityDelta;
+import com.android.contacts.model.EntityModifier;
+import com.android.contacts.model.EntityDeltaList;
+import com.android.contacts.model.EntityDelta.ValuesDelta;
+import com.google.android.collect.Lists;
+
+import android.content.ContentProviderOperation;
+import android.content.ContentValues;
+import android.content.Entity;
+import android.net.Uri;
+import android.provider.BaseColumns;
+import android.provider.ContactsContract.AggregationExceptions;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.test.AndroidTestCase;
+import android.test.suitebuilder.annotation.LargeTest;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+
+/**
+ * Tests for {@link EntityDeltaList} which focus on "diff" operations that should
+ * create {@link AggregationExceptions} in certain cases.
+ */
+@LargeTest
+public class EntityDeltaListTests extends AndroidTestCase {
+    public static final String TAG = "EntityDeltaListTests";
+
+    private static final long CONTACT_FIRST = 1;
+    private static final long CONTACT_SECOND = 2;
+
+    public static final long CONTACT_BOB = 10;
+    public static final long CONTACT_MARY = 11;
+
+    public static final long PHONE_RED = 20;
+    public static final long PHONE_GREEN = 21;
+    public static final long PHONE_BLUE = 22;
+
+    public static final long EMAIL_YELLOW = 25;
+
+    public static final long VER_FIRST = 100;
+    public static final long VER_SECOND = 200;
+
+    public static final String TEST_PHONE = "555-1212";
+    public static final String TEST_ACCOUNT = "org.example.test";
+
+    public EntityDeltaListTests() {
+        super();
+    }
+
+    @Override
+    public void setUp() {
+        mContext = getContext();
+    }
+
+    /**
+     * Build a {@link BaseAccountType} that has various odd constraints for
+     * testing purposes.
+     */
+    protected BaseAccountType getSource() {
+        final BaseAccountType source = new MockContactsSource();
+        source.ensureInflated(getContext(), BaseAccountType.LEVEL_CONSTRAINTS);
+        return source;
+    }
+
+    static ContentValues getValues(ContentProviderOperation operation)
+            throws NoSuchFieldException, IllegalAccessException {
+        final Field field = ContentProviderOperation.class.getDeclaredField("mValues");
+        field.setAccessible(true);
+        return (ContentValues) field.get(operation);
+    }
+
+    static EntityDelta getUpdate(long rawContactId) {
+        final Entity before = EntityDeltaTests.getEntity(rawContactId,
+                EntityDeltaTests.TEST_PHONE_ID);
+        return EntityDelta.fromBefore(before);
+    }
+
+    static EntityDelta getInsert() {
+        final ContentValues after = new ContentValues();
+        after.put(RawContacts.ACCOUNT_NAME, EntityDeltaTests.TEST_ACCOUNT_NAME);
+        after.put(RawContacts.SEND_TO_VOICEMAIL, 1);
+
+        final ValuesDelta values = ValuesDelta.fromAfter(after);
+        return new EntityDelta(values);
+    }
+
+    static EntityDeltaList buildSet(EntityDelta... deltas) {
+        final EntityDeltaList set = EntityDeltaList.fromSingle(deltas[0]);
+        for (int i = 1; i < deltas.length; i++) {
+            set.add(deltas[i]);
+        }
+        return set;
+    }
+
+    static EntityDelta buildBeforeEntity(long rawContactId, long version,
+            ContentValues... entries) {
+        // Build an existing contact read from database
+        final ContentValues contact = new ContentValues();
+        contact.put(RawContacts.VERSION, version);
+        contact.put(RawContacts._ID, rawContactId);
+        final Entity before = new Entity(contact);
+        for (ContentValues entry : entries) {
+            before.addSubValue(Data.CONTENT_URI, entry);
+        }
+        return EntityDelta.fromBefore(before);
+    }
+
+    static EntityDelta buildAfterEntity(ContentValues... entries) {
+        // Build an existing contact read from database
+        final ContentValues contact = new ContentValues();
+        contact.put(RawContacts.ACCOUNT_TYPE, TEST_ACCOUNT);
+        final EntityDelta after = new EntityDelta(ValuesDelta.fromAfter(contact));
+        for (ContentValues entry : entries) {
+            after.addEntry(ValuesDelta.fromAfter(entry));
+        }
+        return after;
+    }
+
+    static ContentValues buildPhone(long phoneId) {
+        return buildPhone(phoneId, Long.toString(phoneId));
+    }
+
+    static ContentValues buildPhone(long phoneId, String value) {
+        final ContentValues values = new ContentValues();
+        values.put(Data._ID, phoneId);
+        values.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
+        values.put(Phone.NUMBER, value);
+        values.put(Phone.TYPE, Phone.TYPE_HOME);
+        return values;
+    }
+
+    static ContentValues buildEmail(long emailId) {
+        final ContentValues values = new ContentValues();
+        values.put(Data._ID, emailId);
+        values.put(Data.MIMETYPE, Email.CONTENT_ITEM_TYPE);
+        values.put(Email.DATA, Long.toString(emailId));
+        values.put(Email.TYPE, Email.TYPE_HOME);
+        return values;
+    }
+
+    static void insertPhone(EntityDeltaList set, long rawContactId, ContentValues values) {
+        final EntityDelta match = set.getByRawContactId(rawContactId);
+        match.addEntry(ValuesDelta.fromAfter(values));
+    }
+
+    static ValuesDelta getPhone(EntityDeltaList set, long rawContactId, long dataId) {
+        final EntityDelta match = set.getByRawContactId(rawContactId);
+        return match.getEntry(dataId);
+    }
+
+    static void assertDiffPattern(EntityDelta delta, ContentProviderOperation... pattern) {
+        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
+        delta.buildAssert(diff);
+        delta.buildDiff(diff);
+        assertDiffPattern(diff, pattern);
+    }
+
+    static void assertDiffPattern(EntityDeltaList set, ContentProviderOperation... pattern) {
+        assertDiffPattern(set.buildDiff(), pattern);
+    }
+
+    static void assertDiffPattern(ArrayList<ContentProviderOperation> diff,
+            ContentProviderOperation... pattern) {
+        assertEquals("Unexpected operations", pattern.length, diff.size());
+        for (int i = 0; i < pattern.length; i++) {
+            final ContentProviderOperation expected = pattern[i];
+            final ContentProviderOperation found = diff.get(i);
+
+            assertEquals("Unexpected uri", expected.getUri(), found.getUri());
+
+            final String expectedType = getStringForType(expected.getType());
+            final String foundType = getStringForType(found.getType());
+            assertEquals("Unexpected type", expectedType, foundType);
+
+            if (expected.getType() == TYPE_DELETE) continue;
+
+            try {
+                final ContentValues expectedValues = getValues(expected);
+                final ContentValues foundValues = getValues(found);
+
+                expectedValues.remove(BaseColumns._ID);
+                foundValues.remove(BaseColumns._ID);
+
+                assertEquals("Unexpected values", expectedValues, foundValues);
+            } catch (NoSuchFieldException e) {
+                fail(e.toString());
+            } catch (IllegalAccessException e) {
+                fail(e.toString());
+            }
+        }
+    }
+
+    static String getStringForType(int type) {
+        switch (type) {
+            case TYPE_ASSERT: return "TYPE_ASSERT";
+            case TYPE_INSERT: return "TYPE_INSERT";
+            case TYPE_UPDATE: return "TYPE_UPDATE";
+            case TYPE_DELETE: return "TYPE_DELETE";
+            default: return Integer.toString(type);
+        }
+    }
+
+    static ContentProviderOperation buildAssertVersion(long version) {
+        final ContentValues values = new ContentValues();
+        values.put(RawContacts.VERSION, version);
+        return buildOper(RawContacts.CONTENT_URI, TYPE_ASSERT, values);
+    }
+
+    static ContentProviderOperation buildAggregationModeUpdate(int mode) {
+        final ContentValues values = new ContentValues();
+        values.put(RawContacts.AGGREGATION_MODE, mode);
+        return buildOper(RawContacts.CONTENT_URI, TYPE_UPDATE, values);
+    }
+
+    static ContentProviderOperation buildUpdateAggregationSuspended() {
+        return buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_SUSPENDED);
+    }
+
+    static ContentProviderOperation buildUpdateAggregationDefault() {
+        return buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT);
+    }
+
+    static ContentProviderOperation buildUpdateAggregationKeepTogether(long rawContactId) {
+        final ContentValues values = new ContentValues();
+        values.put(AggregationExceptions.RAW_CONTACT_ID1, rawContactId);
+        values.put(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_TOGETHER);
+        return buildOper(AggregationExceptions.CONTENT_URI, TYPE_UPDATE, values);
+    }
+
+    static ContentValues buildDataInsert(ValuesDelta values, long rawContactId) {
+        final ContentValues insertValues = values.getCompleteValues();
+        insertValues.put(Data.RAW_CONTACT_ID, rawContactId);
+        return insertValues;
+    }
+
+    static ContentProviderOperation buildDelete(Uri uri) {
+        return buildOper(uri, TYPE_DELETE, (ContentValues)null);
+    }
+
+    static ContentProviderOperation buildOper(Uri uri, int type, ValuesDelta values) {
+        return buildOper(uri, type, values.getCompleteValues());
+    }
+
+    static ContentProviderOperation buildOper(Uri uri, int type, ContentValues values) {
+        switch (type) {
+            case TYPE_ASSERT:
+                return ContentProviderOperation.newAssertQuery(uri).withValues(values).build();
+            case TYPE_INSERT:
+                return ContentProviderOperation.newInsert(uri).withValues(values).build();
+            case TYPE_UPDATE:
+                return ContentProviderOperation.newUpdate(uri).withValues(values).build();
+            case TYPE_DELETE:
+                return ContentProviderOperation.newDelete(uri).build();
+        }
+        return null;
+    }
+
+    static Long getVersion(EntityDeltaList set, Long rawContactId) {
+        return set.getByRawContactId(rawContactId).getValues().getAsLong(RawContacts.VERSION);
+    }
+
+    /**
+     * Count number of {@link AggregationExceptions} updates contained in the
+     * given list of {@link ContentProviderOperation}.
+     */
+    static int countExceptionUpdates(ArrayList<ContentProviderOperation> diff) {
+        int updateCount = 0;
+        for (ContentProviderOperation oper : diff) {
+            if (AggregationExceptions.CONTENT_URI.equals(oper.getUri())
+                    && oper.getType() == ContentProviderOperation.TYPE_UPDATE) {
+                updateCount++;
+            }
+        }
+        return updateCount;
+    }
+
+    public void testInsert() {
+        final EntityDelta insert = getInsert();
+        final EntityDeltaList set = buildSet(insert);
+
+        // Inserting single shouldn't create rules
+        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
+        final int exceptionCount = countExceptionUpdates(diff);
+        assertEquals("Unexpected exception updates", 0, exceptionCount);
+    }
+
+    public void testUpdateUpdate() {
+        final EntityDelta updateFirst = getUpdate(CONTACT_FIRST);
+        final EntityDelta updateSecond = getUpdate(CONTACT_SECOND);
+        final EntityDeltaList set = buildSet(updateFirst, updateSecond);
+
+        // Updating two existing shouldn't create rules
+        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
+        final int exceptionCount = countExceptionUpdates(diff);
+        assertEquals("Unexpected exception updates", 0, exceptionCount);
+    }
+
+    public void testUpdateInsert() {
+        final EntityDelta update = getUpdate(CONTACT_FIRST);
+        final EntityDelta insert = getInsert();
+        final EntityDeltaList set = buildSet(update, insert);
+
+        // New insert should only create one rule
+        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
+        final int exceptionCount = countExceptionUpdates(diff);
+        assertEquals("Unexpected exception updates", 1, exceptionCount);
+    }
+
+    public void testInsertUpdateInsert() {
+        final EntityDelta insertFirst = getInsert();
+        final EntityDelta update = getUpdate(CONTACT_FIRST);
+        final EntityDelta insertSecond = getInsert();
+        final EntityDeltaList set = buildSet(insertFirst, update, insertSecond);
+
+        // Two inserts should create two rules to bind against single existing
+        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
+        final int exceptionCount = countExceptionUpdates(diff);
+        assertEquals("Unexpected exception updates", 2, exceptionCount);
+    }
+
+    public void testInsertInsertInsert() {
+        final EntityDelta insertFirst = getInsert();
+        final EntityDelta insertSecond = getInsert();
+        final EntityDelta insertThird = getInsert();
+        final EntityDeltaList set = buildSet(insertFirst, insertSecond, insertThird);
+
+        // Three new inserts should create only two binding rules
+        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
+        final int exceptionCount = countExceptionUpdates(diff);
+        assertEquals("Unexpected exception updates", 2, exceptionCount);
+    }
+
+    public void testMergeDataRemoteInsert() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_RED), buildPhone(PHONE_GREEN)));
+
+        // Merge in second version, verify they match
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertEquals("Unexpected change when merging", second, merged);
+    }
+
+    public void testMergeDataLocalUpdateRemoteInsert() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_RED), buildPhone(PHONE_GREEN)));
+
+        // Change the local number to trigger update
+        final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED);
+        phone.put(Phone.NUMBER, TEST_PHONE);
+
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
+                buildUpdateAggregationDefault());
+
+        // Merge in the second version, verify diff matches
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged,
+                buildAssertVersion(VER_SECOND),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
+                buildUpdateAggregationDefault());
+    }
+
+    public void testMergeDataLocalUpdateRemoteDelete() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_GREEN)));
+
+        // Change the local number to trigger update
+        final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED);
+        phone.put(Phone.NUMBER, TEST_PHONE);
+
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
+                buildUpdateAggregationDefault());
+
+        // Merge in the second version, verify that our update changed to
+        // insert, since RED was deleted on remote side
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged,
+                buildAssertVersion(VER_SECOND),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(phone, CONTACT_BOB)),
+                buildUpdateAggregationDefault());
+    }
+
+    public void testMergeDataLocalDeleteRemoteUpdate() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_RED, TEST_PHONE)));
+
+        // Delete phone locally
+        final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED);
+        phone.markDeleted();
+
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildUpdateAggregationSuspended(),
+                buildDelete(Data.CONTENT_URI),
+                buildUpdateAggregationDefault());
+
+        // Merge in the second version, verify that our delete remains
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged,
+                buildAssertVersion(VER_SECOND),
+                buildUpdateAggregationSuspended(),
+                buildDelete(Data.CONTENT_URI),
+                buildUpdateAggregationDefault());
+    }
+
+    public void testMergeDataLocalInsertRemoteInsert() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_RED), buildPhone(PHONE_GREEN)));
+
+        // Insert new phone locally
+        final ValuesDelta bluePhone = ValuesDelta.fromAfter(buildPhone(PHONE_BLUE));
+        first.getByRawContactId(CONTACT_BOB).addEntry(bluePhone);
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(bluePhone, CONTACT_BOB)),
+                buildUpdateAggregationDefault());
+
+        // Merge in the second version, verify that our insert remains
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged,
+                buildAssertVersion(VER_SECOND),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(bluePhone, CONTACT_BOB)),
+                buildUpdateAggregationDefault());
+    }
+
+    public void testMergeRawContactLocalInsertRemoteInsert() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_RED)), buildBeforeEntity(CONTACT_MARY, VER_SECOND,
+                buildPhone(PHONE_RED)));
+
+        // Add new contact locally, should remain insert
+        final ContentValues joePhoneInsert = buildPhone(PHONE_BLUE);
+        final EntityDelta joeContact = buildAfterEntity(joePhoneInsert);
+        final ContentValues joeContactInsert = joeContact.getValues().getCompleteValues();
+        joeContactInsert.put(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_SUSPENDED);
+        first.add(joeContact);
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, joeContactInsert),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, joePhoneInsert),
+                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
+                buildUpdateAggregationKeepTogether(CONTACT_BOB));
+
+        // Merge in the second version, verify that our insert remains
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged,
+                buildAssertVersion(VER_SECOND),
+                buildAssertVersion(VER_SECOND),
+                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, joeContactInsert),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, joePhoneInsert),
+                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
+                buildUpdateAggregationKeepTogether(CONTACT_BOB));
+    }
+
+    public void testMergeRawContactLocalDeleteRemoteDelete() {
+        final EntityDeltaList first = buildSet(
+                buildBeforeEntity(CONTACT_BOB, VER_FIRST, buildPhone(PHONE_RED)),
+                buildBeforeEntity(CONTACT_MARY, VER_FIRST, buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(
+                buildBeforeEntity(CONTACT_BOB, VER_SECOND, buildPhone(PHONE_RED)));
+
+        // Remove contact locally
+        first.getByRawContactId(CONTACT_MARY).markDeleted();
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildAssertVersion(VER_FIRST),
+                buildDelete(RawContacts.CONTENT_URI));
+
+        // Merge in the second version, verify that our delete isn't needed
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged);
+    }
+
+    public void testMergeRawContactLocalUpdateRemoteDelete() {
+        final EntityDeltaList first = buildSet(
+                buildBeforeEntity(CONTACT_BOB, VER_FIRST, buildPhone(PHONE_RED)),
+                buildBeforeEntity(CONTACT_MARY, VER_FIRST, buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(
+                buildBeforeEntity(CONTACT_BOB, VER_SECOND, buildPhone(PHONE_RED)));
+
+        // Perform local update
+        final ValuesDelta phone = getPhone(first, CONTACT_MARY, PHONE_RED);
+        phone.put(Phone.NUMBER, TEST_PHONE);
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildAssertVersion(VER_FIRST),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
+                buildUpdateAggregationDefault());
+
+        final ContentValues phoneInsert = phone.getCompleteValues();
+        final ContentValues contactInsert = first.getByRawContactId(CONTACT_MARY).getValues()
+                .getCompleteValues();
+        contactInsert.put(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_SUSPENDED);
+
+        // Merge and verify that update turned into insert
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged,
+                buildAssertVersion(VER_SECOND),
+                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, contactInsert),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, phoneInsert),
+                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
+                buildUpdateAggregationKeepTogether(CONTACT_BOB));
+    }
+
+    public void testMergeUsesNewVersion() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildPhone(PHONE_RED)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildPhone(PHONE_RED)));
+
+        assertEquals((Long)VER_FIRST, getVersion(first, CONTACT_BOB));
+        assertEquals((Long)VER_SECOND, getVersion(second, CONTACT_BOB));
+
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertEquals((Long)VER_SECOND, getVersion(merged, CONTACT_BOB));
+    }
+
+    public void testMergeAfterEnsureAndTrim() {
+        final EntityDeltaList first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
+                buildEmail(EMAIL_YELLOW)));
+        final EntityDeltaList second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
+                buildEmail(EMAIL_YELLOW)));
+
+        // Ensure we have at least one phone
+        final BaseAccountType source = getSource();
+        final EntityDelta bobContact = first.getByRawContactId(CONTACT_BOB);
+        EntityModifier.ensureKindExists(bobContact, source, Phone.CONTENT_ITEM_TYPE);
+        final ValuesDelta bobPhone = bobContact.getSuperPrimaryEntry(Phone.CONTENT_ITEM_TYPE, true);
+
+        // Make sure the update would insert a row
+        assertDiffPattern(first,
+                buildAssertVersion(VER_FIRST),
+                buildUpdateAggregationSuspended(),
+                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(bobPhone, CONTACT_BOB)),
+                buildUpdateAggregationDefault());
+
+        // Trim values and ensure that we don't insert things
+        EntityModifier.trimEmpty(bobContact, source);
+        assertDiffPattern(first);
+
+        // Now re-parent the change, which should remain no-op
+        final EntityDeltaList merged = EntityDeltaList.mergeAfter(second, first);
+        assertDiffPattern(merged);
+    }
+}
diff --git a/tests/src/com/android/contacts/EntityModifierTests.java b/tests/src/com/android/contacts/EntityModifierTests.java
index 18877a3..1a0fc07 100644
--- a/tests/src/com/android/contacts/EntityModifierTests.java
+++ b/tests/src/com/android/contacts/EntityModifierTests.java
@@ -20,13 +20,13 @@
 import static android.content.ContentProviderOperation.TYPE_INSERT;
 import static android.content.ContentProviderOperation.TYPE_UPDATE;
 
-import com.android.contacts.model.ContactsSource;
+import com.android.contacts.model.BaseAccountType;
 import com.android.contacts.model.EntityDelta;
 import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.EntitySet;
-import com.android.contacts.model.Sources;
-import com.android.contacts.model.ContactsSource.DataKind;
-import com.android.contacts.model.ContactsSource.EditType;
+import com.android.contacts.model.EntityDeltaList;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.model.BaseAccountType.DataKind;
+import com.android.contacts.model.BaseAccountType.EditType;
 import com.android.contacts.model.EntityDelta.ValuesDelta;
 import com.google.android.collect.Lists;
 
@@ -51,7 +51,7 @@
 import java.util.List;
 
 /**
- * Tests for {@link EntityModifier} to verify that {@link ContactsSource}
+ * Tests for {@link EntityModifier} to verify that {@link BaseAccountType}
  * constraints are being enforced correctly.
  */
 @LargeTest
@@ -79,11 +79,11 @@
         mContext = getContext();
     }
 
-    public static class MockContactsSource extends ContactsSource {
+    public static class MockContactsSource extends BaseAccountType {
         @Override
         protected void inflate(Context context, int inflateLevel) {
             this.accountType = TEST_ACCOUNT_TYPE;
-            this.setInflatedLevel(ContactsSource.LEVEL_CONSTRAINTS);
+            this.setInflatedLevel(BaseAccountType.LEVEL_CONSTRAINTS);
 
             // Phone allows maximum 2 home, 1 work, and unlimited other, with
             // constraint of 5 numbers maximum.
@@ -138,20 +138,20 @@
     }
 
     /**
-     * Build a {@link ContactsSource} that has various odd constraints for
+     * Build a {@link BaseAccountType} that has various odd constraints for
      * testing purposes.
      */
-    protected ContactsSource getSource() {
-        final ContactsSource source = new MockContactsSource();
-        source.ensureInflated(getContext(), ContactsSource.LEVEL_CONSTRAINTS);
+    protected BaseAccountType getSource() {
+        final BaseAccountType source = new MockContactsSource();
+        source.ensureInflated(getContext(), BaseAccountType.LEVEL_CONSTRAINTS);
         return source;
     }
 
     /**
-     * Build {@link Sources} instance.
+     * Build {@link AccountTypes} instance.
      */
-    protected Sources getSources(ContactsSource... sources) {
-        return new Sources(sources);
+    protected AccountTypes getSources(BaseAccountType... sources) {
+        return new AccountTypes(sources);
     }
 
     /**
@@ -192,7 +192,7 @@
      */
     public void testValidTypes() {
         // Build a source and pull specific types
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
         final EditType typeWork = EntityModifier.getType(kindPhone, Phone.TYPE_WORK);
@@ -237,7 +237,7 @@
      */
     public void testCanInsert() {
         // Build a source and pull specific types
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
         final EditType typeWork = EntityModifier.getType(kindPhone, Phone.TYPE_WORK);
@@ -266,7 +266,7 @@
      */
     public void testBestValidType() {
         // Build a source and pull specific types
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
         final EditType typeWork = EntityModifier.getType(kindPhone, Phone.TYPE_WORK);
@@ -302,7 +302,7 @@
     }
 
     public void testIsEmptyEmpty() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
 
         // Test entirely empty row
@@ -313,7 +313,7 @@
     }
 
     public void testIsEmptyDirectFields() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
@@ -330,7 +330,7 @@
     }
 
     public void testTrimEmptySingle() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
@@ -371,60 +371,60 @@
     }
 
     public void testTrimEmptySpaces() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
         // Test row that has type values, but values are spaces
-        final EntityDelta state = EntitySetTests.buildBeforeEntity(TEST_ID, VER_FIRST);
+        final EntityDelta state = EntityDeltaListTests.buildBeforeEntity(TEST_ID, VER_FIRST);
         final ValuesDelta values = EntityModifier.insertChild(state, kindPhone, typeHome);
         values.put(Phone.NUMBER, "   ");
 
         // Build diff, expecting insert for data row and update enforcement
-        EntitySetTests.assertDiffPattern(state,
-                EntitySetTests.buildAssertVersion(VER_FIRST),
-                EntitySetTests.buildUpdateAggregationSuspended(),
-                EntitySetTests.buildOper(Data.CONTENT_URI, TYPE_INSERT,
-                        EntitySetTests.buildDataInsert(values, TEST_ID)),
-                EntitySetTests.buildUpdateAggregationDefault());
+        EntityDeltaListTests.assertDiffPattern(state,
+                EntityDeltaListTests.buildAssertVersion(VER_FIRST),
+                EntityDeltaListTests.buildUpdateAggregationSuspended(),
+                EntityDeltaListTests.buildOper(Data.CONTENT_URI, TYPE_INSERT,
+                        EntityDeltaListTests.buildDataInsert(values, TEST_ID)),
+                EntityDeltaListTests.buildUpdateAggregationDefault());
 
         // Trim empty rows and try again, expecting delete of overall contact
         EntityModifier.trimEmpty(state, source);
-        EntitySetTests.assertDiffPattern(state,
-                EntitySetTests.buildAssertVersion(VER_FIRST),
-                EntitySetTests.buildDelete(RawContacts.CONTENT_URI));
+        EntityDeltaListTests.assertDiffPattern(state,
+                EntityDeltaListTests.buildAssertVersion(VER_FIRST),
+                EntityDeltaListTests.buildDelete(RawContacts.CONTENT_URI));
     }
 
     public void testTrimLeaveValid() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
         // Test row that has type values with valid number
-        final EntityDelta state = EntitySetTests.buildBeforeEntity(TEST_ID, VER_FIRST);
+        final EntityDelta state = EntityDeltaListTests.buildBeforeEntity(TEST_ID, VER_FIRST);
         final ValuesDelta values = EntityModifier.insertChild(state, kindPhone, typeHome);
         values.put(Phone.NUMBER, TEST_PHONE);
 
         // Build diff, expecting insert for data row and update enforcement
-        EntitySetTests.assertDiffPattern(state,
-                EntitySetTests.buildAssertVersion(VER_FIRST),
-                EntitySetTests.buildUpdateAggregationSuspended(),
-                EntitySetTests.buildOper(Data.CONTENT_URI, TYPE_INSERT,
-                        EntitySetTests.buildDataInsert(values, TEST_ID)),
-                EntitySetTests.buildUpdateAggregationDefault());
+        EntityDeltaListTests.assertDiffPattern(state,
+                EntityDeltaListTests.buildAssertVersion(VER_FIRST),
+                EntityDeltaListTests.buildUpdateAggregationSuspended(),
+                EntityDeltaListTests.buildOper(Data.CONTENT_URI, TYPE_INSERT,
+                        EntityDeltaListTests.buildDataInsert(values, TEST_ID)),
+                EntityDeltaListTests.buildUpdateAggregationDefault());
 
         // Trim empty rows and try again, expecting no differences
         EntityModifier.trimEmpty(state, source);
-        EntitySetTests.assertDiffPattern(state,
-                EntitySetTests.buildAssertVersion(VER_FIRST),
-                EntitySetTests.buildUpdateAggregationSuspended(),
-                EntitySetTests.buildOper(Data.CONTENT_URI, TYPE_INSERT,
-                        EntitySetTests.buildDataInsert(values, TEST_ID)),
-                EntitySetTests.buildUpdateAggregationDefault());
+        EntityDeltaListTests.assertDiffPattern(state,
+                EntityDeltaListTests.buildAssertVersion(VER_FIRST),
+                EntityDeltaListTests.buildUpdateAggregationSuspended(),
+                EntityDeltaListTests.buildOper(Data.CONTENT_URI, TYPE_INSERT,
+                        EntityDeltaListTests.buildDataInsert(values, TEST_ID)),
+                EntityDeltaListTests.buildUpdateAggregationDefault());
     }
 
     public void testTrimEmptyUntouched() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
@@ -448,7 +448,7 @@
     }
 
     public void testTrimEmptyAfterUpdate() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
@@ -500,14 +500,14 @@
     }
 
     public void testTrimInsertEmpty() {
-        final ContactsSource source = getSource();
-        final Sources sources = getSources(source);
+        final BaseAccountType source = getSource();
+        final AccountTypes sources = getSources(source);
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
         // Try creating a contact without any child entries
         final EntityDelta state = getEntity(null);
-        final EntitySet set = EntitySet.fromSingle(state);
+        final EntityDeltaList set = EntityDeltaList.fromSingle(state);
 
         // Build diff, expecting single insert
         final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
@@ -527,15 +527,15 @@
     }
 
     public void testTrimInsertInsert() {
-        final ContactsSource source = getSource();
-        final Sources sources = getSources(source);
+        final BaseAccountType source = getSource();
+        final AccountTypes sources = getSources(source);
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
         // Try creating a contact with single empty entry
         final EntityDelta state = getEntity(null);
         final ValuesDelta values = EntityModifier.insertChild(state, kindPhone, typeHome);
-        final EntitySet set = EntitySet.fromSingle(state);
+        final EntityDeltaList set = EntityDeltaList.fromSingle(state);
 
         // Build diff, expecting two insert operations
         final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
@@ -560,8 +560,8 @@
     }
 
     public void testTrimUpdateRemain() {
-        final ContactsSource source = getSource();
-        final Sources sources = getSources(source);
+        final BaseAccountType source = getSource();
+        final AccountTypes sources = getSources(source);
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
@@ -579,7 +579,7 @@
         second.put(Phone.NUMBER, TEST_PHONE);
 
         final EntityDelta state = getEntity(TEST_ID, first, second);
-        final EntitySet set = EntitySet.fromSingle(state);
+        final EntityDeltaList set = EntityDeltaList.fromSingle(state);
 
         // Build diff, expecting no changes
         final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
@@ -631,8 +631,8 @@
     }
 
     public void testTrimUpdateUpdate() {
-        final ContactsSource source = getSource();
-        final Sources sources = getSources(source);
+        final BaseAccountType source = getSource();
+        final AccountTypes sources = getSources(source);
         final DataKind kindPhone = source.getKindForMimetype(Phone.CONTENT_ITEM_TYPE);
         final EditType typeHome = EntityModifier.getType(kindPhone, Phone.TYPE_HOME);
 
@@ -644,7 +644,7 @@
         first.put(Phone.NUMBER, TEST_PHONE);
 
         final EntityDelta state = getEntity(TEST_ID, first);
-        final EntitySet set = EntitySet.fromSingle(state);
+        final EntityDeltaList set = EntityDeltaList.fromSingle(state);
 
         // Build diff, expecting no changes
         final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
@@ -686,7 +686,7 @@
     }
 
     public void testParseExtrasExistingName() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindName = source.getKindForMimetype(StructuredName.CONTENT_ITEM_TYPE);
 
         // Build "before" name
@@ -706,7 +706,7 @@
     }
 
     public void testParseExtrasIgnoreLimit() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final DataKind kindIm = source.getKindForMimetype(Im.CONTENT_ITEM_TYPE);
 
         // Build "before" IM
@@ -730,7 +730,7 @@
     }
 
     public void testParseExtrasIgnoreUnhandled() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final EntityDelta state = getEntity(TEST_ID);
 
         // We should silently ignore types unsupported by source
@@ -742,7 +742,7 @@
     }
 
     public void testParseExtrasJobTitle() {
-        final ContactsSource source = getSource();
+        final BaseAccountType source = getSource();
         final EntityDelta state = getEntity(TEST_ID);
 
         // Make sure that we create partial Organizations
diff --git a/tests/src/com/android/contacts/EntitySetTests.java b/tests/src/com/android/contacts/EntitySetTests.java
deleted file mode 100644
index 037c927..0000000
--- a/tests/src/com/android/contacts/EntitySetTests.java
+++ /dev/null
@@ -1,646 +0,0 @@
-/*
- * Copyright (C) 2009 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 static android.content.ContentProviderOperation.TYPE_ASSERT;
-import static android.content.ContentProviderOperation.TYPE_DELETE;
-import static android.content.ContentProviderOperation.TYPE_INSERT;
-import static android.content.ContentProviderOperation.TYPE_UPDATE;
-
-import com.android.contacts.EntityModifierTests.MockContactsSource;
-import com.android.contacts.model.ContactsSource;
-import com.android.contacts.model.EntityDelta;
-import com.android.contacts.model.EntityModifier;
-import com.android.contacts.model.EntitySet;
-import com.android.contacts.model.EntityDelta.ValuesDelta;
-import com.google.android.collect.Lists;
-
-import android.content.ContentProviderOperation;
-import android.content.ContentValues;
-import android.content.Entity;
-import android.net.Uri;
-import android.provider.BaseColumns;
-import android.provider.ContactsContract.AggregationExceptions;
-import android.provider.ContactsContract.Data;
-import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Email;
-import android.provider.ContactsContract.CommonDataKinds.Phone;
-import android.test.AndroidTestCase;
-import android.test.suitebuilder.annotation.LargeTest;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-
-/**
- * Tests for {@link EntitySet} which focus on "diff" operations that should
- * create {@link AggregationExceptions} in certain cases.
- */
-@LargeTest
-public class EntitySetTests extends AndroidTestCase {
-    public static final String TAG = "EntitySetTests";
-
-    private static final long CONTACT_FIRST = 1;
-    private static final long CONTACT_SECOND = 2;
-
-    public static final long CONTACT_BOB = 10;
-    public static final long CONTACT_MARY = 11;
-
-    public static final long PHONE_RED = 20;
-    public static final long PHONE_GREEN = 21;
-    public static final long PHONE_BLUE = 22;
-
-    public static final long EMAIL_YELLOW = 25;
-
-    public static final long VER_FIRST = 100;
-    public static final long VER_SECOND = 200;
-
-    public static final String TEST_PHONE = "555-1212";
-    public static final String TEST_ACCOUNT = "org.example.test";
-
-    public EntitySetTests() {
-        super();
-    }
-
-    @Override
-    public void setUp() {
-        mContext = getContext();
-    }
-
-    /**
-     * Build a {@link ContactsSource} that has various odd constraints for
-     * testing purposes.
-     */
-    protected ContactsSource getSource() {
-        final ContactsSource source = new MockContactsSource();
-        source.ensureInflated(getContext(), ContactsSource.LEVEL_CONSTRAINTS);
-        return source;
-    }
-
-    static ContentValues getValues(ContentProviderOperation operation)
-            throws NoSuchFieldException, IllegalAccessException {
-        final Field field = ContentProviderOperation.class.getDeclaredField("mValues");
-        field.setAccessible(true);
-        return (ContentValues) field.get(operation);
-    }
-
-    static EntityDelta getUpdate(long rawContactId) {
-        final Entity before = EntityDeltaTests.getEntity(rawContactId,
-                EntityDeltaTests.TEST_PHONE_ID);
-        return EntityDelta.fromBefore(before);
-    }
-
-    static EntityDelta getInsert() {
-        final ContentValues after = new ContentValues();
-        after.put(RawContacts.ACCOUNT_NAME, EntityDeltaTests.TEST_ACCOUNT_NAME);
-        after.put(RawContacts.SEND_TO_VOICEMAIL, 1);
-
-        final ValuesDelta values = ValuesDelta.fromAfter(after);
-        return new EntityDelta(values);
-    }
-
-    static EntitySet buildSet(EntityDelta... deltas) {
-        final EntitySet set = EntitySet.fromSingle(deltas[0]);
-        for (int i = 1; i < deltas.length; i++) {
-            set.add(deltas[i]);
-        }
-        return set;
-    }
-
-    static EntityDelta buildBeforeEntity(long rawContactId, long version,
-            ContentValues... entries) {
-        // Build an existing contact read from database
-        final ContentValues contact = new ContentValues();
-        contact.put(RawContacts.VERSION, version);
-        contact.put(RawContacts._ID, rawContactId);
-        final Entity before = new Entity(contact);
-        for (ContentValues entry : entries) {
-            before.addSubValue(Data.CONTENT_URI, entry);
-        }
-        return EntityDelta.fromBefore(before);
-    }
-
-    static EntityDelta buildAfterEntity(ContentValues... entries) {
-        // Build an existing contact read from database
-        final ContentValues contact = new ContentValues();
-        contact.put(RawContacts.ACCOUNT_TYPE, TEST_ACCOUNT);
-        final EntityDelta after = new EntityDelta(ValuesDelta.fromAfter(contact));
-        for (ContentValues entry : entries) {
-            after.addEntry(ValuesDelta.fromAfter(entry));
-        }
-        return after;
-    }
-
-    static ContentValues buildPhone(long phoneId) {
-        return buildPhone(phoneId, Long.toString(phoneId));
-    }
-
-    static ContentValues buildPhone(long phoneId, String value) {
-        final ContentValues values = new ContentValues();
-        values.put(Data._ID, phoneId);
-        values.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
-        values.put(Phone.NUMBER, value);
-        values.put(Phone.TYPE, Phone.TYPE_HOME);
-        return values;
-    }
-
-    static ContentValues buildEmail(long emailId) {
-        final ContentValues values = new ContentValues();
-        values.put(Data._ID, emailId);
-        values.put(Data.MIMETYPE, Email.CONTENT_ITEM_TYPE);
-        values.put(Email.DATA, Long.toString(emailId));
-        values.put(Email.TYPE, Email.TYPE_HOME);
-        return values;
-    }
-
-    static void insertPhone(EntitySet set, long rawContactId, ContentValues values) {
-        final EntityDelta match = set.getByRawContactId(rawContactId);
-        match.addEntry(ValuesDelta.fromAfter(values));
-    }
-
-    static ValuesDelta getPhone(EntitySet set, long rawContactId, long dataId) {
-        final EntityDelta match = set.getByRawContactId(rawContactId);
-        return match.getEntry(dataId);
-    }
-
-    static void assertDiffPattern(EntityDelta delta, ContentProviderOperation... pattern) {
-        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
-        delta.buildAssert(diff);
-        delta.buildDiff(diff);
-        assertDiffPattern(diff, pattern);
-    }
-
-    static void assertDiffPattern(EntitySet set, ContentProviderOperation... pattern) {
-        assertDiffPattern(set.buildDiff(), pattern);
-    }
-
-    static void assertDiffPattern(ArrayList<ContentProviderOperation> diff,
-            ContentProviderOperation... pattern) {
-        assertEquals("Unexpected operations", pattern.length, diff.size());
-        for (int i = 0; i < pattern.length; i++) {
-            final ContentProviderOperation expected = pattern[i];
-            final ContentProviderOperation found = diff.get(i);
-
-            assertEquals("Unexpected uri", expected.getUri(), found.getUri());
-
-            final String expectedType = getStringForType(expected.getType());
-            final String foundType = getStringForType(found.getType());
-            assertEquals("Unexpected type", expectedType, foundType);
-
-            if (expected.getType() == TYPE_DELETE) continue;
-
-            try {
-                final ContentValues expectedValues = getValues(expected);
-                final ContentValues foundValues = getValues(found);
-
-                expectedValues.remove(BaseColumns._ID);
-                foundValues.remove(BaseColumns._ID);
-
-                assertEquals("Unexpected values", expectedValues, foundValues);
-            } catch (NoSuchFieldException e) {
-                fail(e.toString());
-            } catch (IllegalAccessException e) {
-                fail(e.toString());
-            }
-        }
-    }
-
-    static String getStringForType(int type) {
-        switch (type) {
-            case TYPE_ASSERT: return "TYPE_ASSERT";
-            case TYPE_INSERT: return "TYPE_INSERT";
-            case TYPE_UPDATE: return "TYPE_UPDATE";
-            case TYPE_DELETE: return "TYPE_DELETE";
-            default: return Integer.toString(type);
-        }
-    }
-
-    static ContentProviderOperation buildAssertVersion(long version) {
-        final ContentValues values = new ContentValues();
-        values.put(RawContacts.VERSION, version);
-        return buildOper(RawContacts.CONTENT_URI, TYPE_ASSERT, values);
-    }
-
-    static ContentProviderOperation buildAggregationModeUpdate(int mode) {
-        final ContentValues values = new ContentValues();
-        values.put(RawContacts.AGGREGATION_MODE, mode);
-        return buildOper(RawContacts.CONTENT_URI, TYPE_UPDATE, values);
-    }
-
-    static ContentProviderOperation buildUpdateAggregationSuspended() {
-        return buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_SUSPENDED);
-    }
-
-    static ContentProviderOperation buildUpdateAggregationDefault() {
-        return buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT);
-    }
-
-    static ContentProviderOperation buildUpdateAggregationKeepTogether(long rawContactId) {
-        final ContentValues values = new ContentValues();
-        values.put(AggregationExceptions.RAW_CONTACT_ID1, rawContactId);
-        values.put(AggregationExceptions.TYPE, AggregationExceptions.TYPE_KEEP_TOGETHER);
-        return buildOper(AggregationExceptions.CONTENT_URI, TYPE_UPDATE, values);
-    }
-
-    static ContentValues buildDataInsert(ValuesDelta values, long rawContactId) {
-        final ContentValues insertValues = values.getCompleteValues();
-        insertValues.put(Data.RAW_CONTACT_ID, rawContactId);
-        return insertValues;
-    }
-
-    static ContentProviderOperation buildDelete(Uri uri) {
-        return buildOper(uri, TYPE_DELETE, (ContentValues)null);
-    }
-
-    static ContentProviderOperation buildOper(Uri uri, int type, ValuesDelta values) {
-        return buildOper(uri, type, values.getCompleteValues());
-    }
-
-    static ContentProviderOperation buildOper(Uri uri, int type, ContentValues values) {
-        switch (type) {
-            case TYPE_ASSERT:
-                return ContentProviderOperation.newAssertQuery(uri).withValues(values).build();
-            case TYPE_INSERT:
-                return ContentProviderOperation.newInsert(uri).withValues(values).build();
-            case TYPE_UPDATE:
-                return ContentProviderOperation.newUpdate(uri).withValues(values).build();
-            case TYPE_DELETE:
-                return ContentProviderOperation.newDelete(uri).build();
-        }
-        return null;
-    }
-
-    static Long getVersion(EntitySet set, Long rawContactId) {
-        return set.getByRawContactId(rawContactId).getValues().getAsLong(RawContacts.VERSION);
-    }
-
-    /**
-     * Count number of {@link AggregationExceptions} updates contained in the
-     * given list of {@link ContentProviderOperation}.
-     */
-    static int countExceptionUpdates(ArrayList<ContentProviderOperation> diff) {
-        int updateCount = 0;
-        for (ContentProviderOperation oper : diff) {
-            if (AggregationExceptions.CONTENT_URI.equals(oper.getUri())
-                    && oper.getType() == ContentProviderOperation.TYPE_UPDATE) {
-                updateCount++;
-            }
-        }
-        return updateCount;
-    }
-
-    public void testInsert() {
-        final EntityDelta insert = getInsert();
-        final EntitySet set = buildSet(insert);
-
-        // Inserting single shouldn't create rules
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 0, exceptionCount);
-    }
-
-    public void testUpdateUpdate() {
-        final EntityDelta updateFirst = getUpdate(CONTACT_FIRST);
-        final EntityDelta updateSecond = getUpdate(CONTACT_SECOND);
-        final EntitySet set = buildSet(updateFirst, updateSecond);
-
-        // Updating two existing shouldn't create rules
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 0, exceptionCount);
-    }
-
-    public void testUpdateInsert() {
-        final EntityDelta update = getUpdate(CONTACT_FIRST);
-        final EntityDelta insert = getInsert();
-        final EntitySet set = buildSet(update, insert);
-
-        // New insert should only create one rule
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 1, exceptionCount);
-    }
-
-    public void testInsertUpdateInsert() {
-        final EntityDelta insertFirst = getInsert();
-        final EntityDelta update = getUpdate(CONTACT_FIRST);
-        final EntityDelta insertSecond = getInsert();
-        final EntitySet set = buildSet(insertFirst, update, insertSecond);
-
-        // Two inserts should create two rules to bind against single existing
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 2, exceptionCount);
-    }
-
-    public void testInsertInsertInsert() {
-        final EntityDelta insertFirst = getInsert();
-        final EntityDelta insertSecond = getInsert();
-        final EntityDelta insertThird = getInsert();
-        final EntitySet set = buildSet(insertFirst, insertSecond, insertThird);
-
-        // Three new inserts should create only two binding rules
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 2, exceptionCount);
-    }
-
-    public void testInsertInsertSeparate() {
-        // This assumes getInsert() will return back an "empty" raw
-        // contact meaning it will contain no actual information
-        final EntityDelta insertFirst = getInsert();
-        final EntityDelta insertSecond = getInsert();
-        final EntitySet set = buildSet(insertFirst, insertSecond);
-
-        // This would normally build a TYPE_KEEP_SEPARATE aggregation exception,
-        // but since the raw contacts won't be added because they are empty,
-        // we should get 0 exceptions back
-        set.splitRawContacts();
-
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 0, exceptionCount);
-    }
-
-    public void testUpdateInsertSeparate() {
-        // This assumes getInsert() will return back an "empty" raw
-        // contact meaning it will contain no actual information
-        final EntityDelta update = getUpdate(CONTACT_FIRST);
-        final EntityDelta insert = getInsert();
-        final EntitySet set = buildSet(update, insert);
-
-        // This would normally build a KEEP_SEPARATE aggregation exception,
-        // but since the insert won't be added because it is empty,
-        // we should get 0 exceptions back
-        set.splitRawContacts();
-
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 0, exceptionCount);
-    }
-
-    public void testUpdateInsertInsertSeparate() {
-        // This assumes getInsert() will return back an "empty" raw
-        // contact meaning it will contain no actual information
-        final EntityDelta update = getUpdate(CONTACT_FIRST);
-        final EntityDelta insertFirst = getInsert();
-        final EntityDelta insertSecond = getInsert();
-        final EntitySet set = buildSet(update, insertFirst, insertSecond);
-
-        // This would normally build a KEEP_SEPARATE aggregation exception,
-        // but since the inserts won't be added because they are empty,
-        // we should get 0 exceptions back
-        set.splitRawContacts();
-
-        final ArrayList<ContentProviderOperation> diff = set.buildDiff();
-        final int exceptionCount = countExceptionUpdates(diff);
-        assertEquals("Unexpected exception updates", 0, exceptionCount);
-    }
-
-    public void testMergeDataRemoteInsert() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_RED), buildPhone(PHONE_GREEN)));
-
-        // Merge in second version, verify they match
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertEquals("Unexpected change when merging", second, merged);
-    }
-
-    public void testMergeDataLocalUpdateRemoteInsert() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_RED), buildPhone(PHONE_GREEN)));
-
-        // Change the local number to trigger update
-        final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED);
-        phone.put(Phone.NUMBER, TEST_PHONE);
-
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
-                buildUpdateAggregationDefault());
-
-        // Merge in the second version, verify diff matches
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged,
-                buildAssertVersion(VER_SECOND),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
-                buildUpdateAggregationDefault());
-    }
-
-    public void testMergeDataLocalUpdateRemoteDelete() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_GREEN)));
-
-        // Change the local number to trigger update
-        final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED);
-        phone.put(Phone.NUMBER, TEST_PHONE);
-
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
-                buildUpdateAggregationDefault());
-
-        // Merge in the second version, verify that our update changed to
-        // insert, since RED was deleted on remote side
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged,
-                buildAssertVersion(VER_SECOND),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(phone, CONTACT_BOB)),
-                buildUpdateAggregationDefault());
-    }
-
-    public void testMergeDataLocalDeleteRemoteUpdate() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_RED, TEST_PHONE)));
-
-        // Delete phone locally
-        final ValuesDelta phone = getPhone(first, CONTACT_BOB, PHONE_RED);
-        phone.markDeleted();
-
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildUpdateAggregationSuspended(),
-                buildDelete(Data.CONTENT_URI),
-                buildUpdateAggregationDefault());
-
-        // Merge in the second version, verify that our delete remains
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged,
-                buildAssertVersion(VER_SECOND),
-                buildUpdateAggregationSuspended(),
-                buildDelete(Data.CONTENT_URI),
-                buildUpdateAggregationDefault());
-    }
-
-    public void testMergeDataLocalInsertRemoteInsert() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_RED), buildPhone(PHONE_GREEN)));
-
-        // Insert new phone locally
-        final ValuesDelta bluePhone = ValuesDelta.fromAfter(buildPhone(PHONE_BLUE));
-        first.getByRawContactId(CONTACT_BOB).addEntry(bluePhone);
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(bluePhone, CONTACT_BOB)),
-                buildUpdateAggregationDefault());
-
-        // Merge in the second version, verify that our insert remains
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged,
-                buildAssertVersion(VER_SECOND),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(bluePhone, CONTACT_BOB)),
-                buildUpdateAggregationDefault());
-    }
-
-    public void testMergeRawContactLocalInsertRemoteInsert() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_RED)), buildBeforeEntity(CONTACT_MARY, VER_SECOND,
-                buildPhone(PHONE_RED)));
-
-        // Add new contact locally, should remain insert
-        final ContentValues joePhoneInsert = buildPhone(PHONE_BLUE);
-        final EntityDelta joeContact = buildAfterEntity(joePhoneInsert);
-        final ContentValues joeContactInsert = joeContact.getValues().getCompleteValues();
-        joeContactInsert.put(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_SUSPENDED);
-        first.add(joeContact);
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, joeContactInsert),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, joePhoneInsert),
-                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
-                buildUpdateAggregationKeepTogether(CONTACT_BOB));
-
-        // Merge in the second version, verify that our insert remains
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged,
-                buildAssertVersion(VER_SECOND),
-                buildAssertVersion(VER_SECOND),
-                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, joeContactInsert),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, joePhoneInsert),
-                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
-                buildUpdateAggregationKeepTogether(CONTACT_BOB));
-    }
-
-    public void testMergeRawContactLocalDeleteRemoteDelete() {
-        final EntitySet first = buildSet(
-                buildBeforeEntity(CONTACT_BOB, VER_FIRST, buildPhone(PHONE_RED)),
-                buildBeforeEntity(CONTACT_MARY, VER_FIRST, buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(
-                buildBeforeEntity(CONTACT_BOB, VER_SECOND, buildPhone(PHONE_RED)));
-
-        // Remove contact locally
-        first.getByRawContactId(CONTACT_MARY).markDeleted();
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildAssertVersion(VER_FIRST),
-                buildDelete(RawContacts.CONTENT_URI));
-
-        // Merge in the second version, verify that our delete isn't needed
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged);
-    }
-
-    public void testMergeRawContactLocalUpdateRemoteDelete() {
-        final EntitySet first = buildSet(
-                buildBeforeEntity(CONTACT_BOB, VER_FIRST, buildPhone(PHONE_RED)),
-                buildBeforeEntity(CONTACT_MARY, VER_FIRST, buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(
-                buildBeforeEntity(CONTACT_BOB, VER_SECOND, buildPhone(PHONE_RED)));
-
-        // Perform local update
-        final ValuesDelta phone = getPhone(first, CONTACT_MARY, PHONE_RED);
-        phone.put(Phone.NUMBER, TEST_PHONE);
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildAssertVersion(VER_FIRST),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_UPDATE, phone.getAfter()),
-                buildUpdateAggregationDefault());
-
-        final ContentValues phoneInsert = phone.getCompleteValues();
-        final ContentValues contactInsert = first.getByRawContactId(CONTACT_MARY).getValues()
-                .getCompleteValues();
-        contactInsert.put(RawContacts.AGGREGATION_MODE, RawContacts.AGGREGATION_MODE_SUSPENDED);
-
-        // Merge and verify that update turned into insert
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged,
-                buildAssertVersion(VER_SECOND),
-                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, contactInsert),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, phoneInsert),
-                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
-                buildUpdateAggregationKeepTogether(CONTACT_BOB));
-    }
-
-    public void testMergeUsesNewVersion() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildPhone(PHONE_RED)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildPhone(PHONE_RED)));
-
-        assertEquals((Long)VER_FIRST, getVersion(first, CONTACT_BOB));
-        assertEquals((Long)VER_SECOND, getVersion(second, CONTACT_BOB));
-
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertEquals((Long)VER_SECOND, getVersion(merged, CONTACT_BOB));
-    }
-
-    public void testMergeAfterEnsureAndTrim() {
-        final EntitySet first = buildSet(buildBeforeEntity(CONTACT_BOB, VER_FIRST,
-                buildEmail(EMAIL_YELLOW)));
-        final EntitySet second = buildSet(buildBeforeEntity(CONTACT_BOB, VER_SECOND,
-                buildEmail(EMAIL_YELLOW)));
-
-        // Ensure we have at least one phone
-        final ContactsSource source = getSource();
-        final EntityDelta bobContact = first.getByRawContactId(CONTACT_BOB);
-        EntityModifier.ensureKindExists(bobContact, source, Phone.CONTENT_ITEM_TYPE);
-        final ValuesDelta bobPhone = bobContact.getSuperPrimaryEntry(Phone.CONTENT_ITEM_TYPE, true);
-
-        // Make sure the update would insert a row
-        assertDiffPattern(first,
-                buildAssertVersion(VER_FIRST),
-                buildUpdateAggregationSuspended(),
-                buildOper(Data.CONTENT_URI, TYPE_INSERT, buildDataInsert(bobPhone, CONTACT_BOB)),
-                buildUpdateAggregationDefault());
-
-        // Trim values and ensure that we don't insert things
-        EntityModifier.trimEmpty(bobContact, source);
-        assertDiffPattern(first);
-
-        // Now re-parent the change, which should remain no-op
-        final EntitySet merged = EntitySet.mergeAfter(second, first);
-        assertDiffPattern(merged);
-    }
-}
diff --git a/tests/src/com/android/contacts/GroupingListAdapterTests.java b/tests/src/com/android/contacts/GroupingListAdapterTests.java
deleted file mode 100644
index 1877fac..0000000
--- a/tests/src/com/android/contacts/GroupingListAdapterTests.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * 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;
-
-import android.content.Context;
-import android.database.CharArrayBuffer;
-import android.database.Cursor;
-import android.database.MatrixCursor;
-import android.provider.CallLog.Calls;
-import android.test.AndroidTestCase;
-import android.text.TextUtils;
-import android.view.View;
-import android.view.ViewGroup;
-
-import static com.android.contacts.GroupingListAdapter.ITEM_TYPE_STANDALONE;
-import static com.android.contacts.GroupingListAdapter.ITEM_TYPE_IN_GROUP;
-import static com.android.contacts.GroupingListAdapter.ITEM_TYPE_GROUP_HEADER;
-
-/**
- * Tests for the contact call list adapter.
- *
- * Running all tests:
- *
- *   runtest contacts
- * or
- *   adb shell am instrument \
- *     -w com.android.contacts.tests/android.test.InstrumentationTestRunner
- */
-public class GroupingListAdapterTests extends AndroidTestCase {
-
-    static private final String[] CALL_LOG_PROJECTION = new String[] {
-        Calls._ID,
-        Calls.NUMBER,
-        Calls.DATE,
-    };
-
-    private static final int CALLS_NUMBER_COLUMN_INDEX = 1;
-
-    private MatrixCursor mCursor;
-    private long mNextCall;
-
-    private GroupingListAdapter mAdapter = new GroupingListAdapter(null) {
-
-        @Override
-        protected void addGroups(Cursor cursor) {
-            int count = cursor.getCount();
-            int groupItemCount = 1;
-            cursor.moveToFirst();
-            String currentValue = cursor.getString(CALLS_NUMBER_COLUMN_INDEX);
-            for (int i = 1; i < count; i++) {
-                cursor.moveToNext();
-                String value = cursor.getString(CALLS_NUMBER_COLUMN_INDEX);
-                if (TextUtils.equals(value, currentValue)) {
-                    groupItemCount++;
-                } else {
-                    if (groupItemCount > 1) {
-                        addGroup(i - groupItemCount, groupItemCount, false);
-                    }
-
-                    groupItemCount = 1;
-                    currentValue = value;
-                }
-            }
-            if (groupItemCount > 1) {
-                addGroup(count - groupItemCount, groupItemCount, false);
-            }
-        }
-
-        @Override
-        protected void bindChildView(View view, Context context, Cursor cursor) {
-        }
-
-        @Override
-        protected void bindGroupView(View view, Context context, Cursor cursor, int groupSize,
-                boolean expanded) {
-        }
-
-        @Override
-        protected void bindStandAloneView(View view, Context context, Cursor cursor) {
-        }
-
-        @Override
-        protected View newChildView(Context context, ViewGroup parent) {
-            return null;
-        }
-
-        @Override
-        protected View newGroupView(Context context, ViewGroup parent) {
-            return null;
-        }
-
-        @Override
-        protected View newStandAloneView(Context context, ViewGroup parent) {
-            return null;
-        }
-    };
-
-    private void buildCursor(String... numbers) {
-        mCursor = new MatrixCursor(CALL_LOG_PROJECTION);
-        mNextCall = 1;
-        for (String number : numbers) {
-            mCursor.addRow(new Object[]{mNextCall, number, 1000 - mNextCall});
-            mNextCall++;
-        }
-    }
-
-    public void testGroupingWithoutGroups() {
-        buildCursor("1", "2", "3");
-        mAdapter.changeCursor(mCursor);
-
-        assertEquals(3, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_STANDALONE, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_STANDALONE, false, 2);
-    }
-
-    public void testGroupingWithCollapsedGroupAtTheBeginning() {
-        buildCursor("1", "1", "2");
-        mAdapter.changeCursor(mCursor);
-
-        assertEquals(2, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_GROUP_HEADER, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_STANDALONE, false, 2);
-    }
-
-    public void testGroupingWithExpandedGroupAtTheBeginning() {
-        buildCursor("1", "1", "2");
-        mAdapter.changeCursor(mCursor);
-        mAdapter.toggleGroup(0);
-
-        assertEquals(4, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_GROUP_HEADER, true, 0);
-        assertPositionMetadata(1, ITEM_TYPE_IN_GROUP, false, 0);
-        assertPositionMetadata(2, ITEM_TYPE_IN_GROUP, false, 1);
-        assertPositionMetadata(3, ITEM_TYPE_STANDALONE, false, 2);
-    }
-
-    public void testGroupingWithExpandCollapseCycleAtTheBeginning() {
-        buildCursor("1", "1", "2");
-        mAdapter.changeCursor(mCursor);
-        mAdapter.toggleGroup(0);
-        mAdapter.toggleGroup(0);
-
-        assertEquals(2, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_GROUP_HEADER, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_STANDALONE, false, 2);
-    }
-
-    public void testGroupingWithCollapsedGroupInTheMiddle() {
-        buildCursor("1", "2", "2", "2", "3");
-        mAdapter.changeCursor(mCursor);
-
-        assertEquals(3, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_STANDALONE, false, 4);
-    }
-
-    public void testGroupingWithExpandedGroupInTheMiddle() {
-        buildCursor("1", "2", "2", "2", "3");
-        mAdapter.changeCursor(mCursor);
-        mAdapter.toggleGroup(1);
-
-        assertEquals(6, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, true, 1);
-        assertPositionMetadata(2, ITEM_TYPE_IN_GROUP, false, 1);
-        assertPositionMetadata(3, ITEM_TYPE_IN_GROUP, false, 2);
-        assertPositionMetadata(4, ITEM_TYPE_IN_GROUP, false, 3);
-        assertPositionMetadata(5, ITEM_TYPE_STANDALONE, false, 4);
-    }
-
-    public void testGroupingWithCollapsedGroupAtTheEnd() {
-        buildCursor("1", "2", "3", "3", "3");
-        mAdapter.changeCursor(mCursor);
-
-        assertEquals(3, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_STANDALONE, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_GROUP_HEADER, false, 2);
-    }
-
-    public void testGroupingWithExpandedGroupAtTheEnd() {
-        buildCursor("1", "2", "3", "3", "3");
-        mAdapter.changeCursor(mCursor);
-        mAdapter.toggleGroup(2);
-
-        assertEquals(6, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_STANDALONE, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_GROUP_HEADER, true, 2);
-        assertPositionMetadata(3, ITEM_TYPE_IN_GROUP, false, 2);
-        assertPositionMetadata(4, ITEM_TYPE_IN_GROUP, false, 3);
-        assertPositionMetadata(5, ITEM_TYPE_IN_GROUP, false, 4);
-    }
-
-    public void testGroupingWithMultipleCollapsedGroups() {
-        buildCursor("1", "2", "2", "3", "4", "4", "5", "5", "6");
-        mAdapter.changeCursor(mCursor);
-
-        assertEquals(6, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_STANDALONE, false, 3);
-        assertPositionMetadata(3, ITEM_TYPE_GROUP_HEADER, false, 4);
-        assertPositionMetadata(4, ITEM_TYPE_GROUP_HEADER, false, 6);
-        assertPositionMetadata(5, ITEM_TYPE_STANDALONE, false, 8);
-    }
-
-    public void testGroupingWithMultipleExpandedGroups() {
-        buildCursor("1", "2", "2", "3", "4", "4", "5", "5", "6");
-        mAdapter.changeCursor(mCursor);
-        mAdapter.toggleGroup(1);
-
-        // Note that expanding the group of 2's shifted the group of 5's down from the
-        // 4th to the 6th position
-        mAdapter.toggleGroup(6);
-
-        assertEquals(10, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, true, 1);
-        assertPositionMetadata(2, ITEM_TYPE_IN_GROUP, false, 1);
-        assertPositionMetadata(3, ITEM_TYPE_IN_GROUP, false, 2);
-        assertPositionMetadata(4, ITEM_TYPE_STANDALONE, false, 3);
-        assertPositionMetadata(5, ITEM_TYPE_GROUP_HEADER, false, 4);
-        assertPositionMetadata(6, ITEM_TYPE_GROUP_HEADER, true, 6);
-        assertPositionMetadata(7, ITEM_TYPE_IN_GROUP, false, 6);
-        assertPositionMetadata(8, ITEM_TYPE_IN_GROUP, false, 7);
-        assertPositionMetadata(9, ITEM_TYPE_STANDALONE, false, 8);
-    }
-
-    public void testPositionCache() {
-        buildCursor("1", "2", "2", "3", "4", "4", "5", "5", "6");
-        mAdapter.changeCursor(mCursor);
-
-        // First pass - building up cache
-        assertEquals(6, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_STANDALONE, false, 3);
-        assertPositionMetadata(3, ITEM_TYPE_GROUP_HEADER, false, 4);
-        assertPositionMetadata(4, ITEM_TYPE_GROUP_HEADER, false, 6);
-        assertPositionMetadata(5, ITEM_TYPE_STANDALONE, false, 8);
-
-        // Second pass - using cache
-        assertEquals(6, mAdapter.getCount());
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, false, 1);
-        assertPositionMetadata(2, ITEM_TYPE_STANDALONE, false, 3);
-        assertPositionMetadata(3, ITEM_TYPE_GROUP_HEADER, false, 4);
-        assertPositionMetadata(4, ITEM_TYPE_GROUP_HEADER, false, 6);
-        assertPositionMetadata(5, ITEM_TYPE_STANDALONE, false, 8);
-
-        // Invalidate cache by expanding a group
-        mAdapter.toggleGroup(1);
-
-        // First pass - building up cache
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, true, 1);
-        assertPositionMetadata(2, ITEM_TYPE_IN_GROUP, false, 1);
-        assertPositionMetadata(3, ITEM_TYPE_IN_GROUP, false, 2);
-        assertPositionMetadata(4, ITEM_TYPE_STANDALONE, false, 3);
-        assertPositionMetadata(5, ITEM_TYPE_GROUP_HEADER, false, 4);
-        assertPositionMetadata(6, ITEM_TYPE_GROUP_HEADER, false, 6);
-        assertPositionMetadata(7, ITEM_TYPE_STANDALONE, false, 8);
-
-        // Second pass - using cache
-        assertPositionMetadata(0, ITEM_TYPE_STANDALONE, false, 0);
-        assertPositionMetadata(1, ITEM_TYPE_GROUP_HEADER, true, 1);
-        assertPositionMetadata(2, ITEM_TYPE_IN_GROUP, false, 1);
-        assertPositionMetadata(3, ITEM_TYPE_IN_GROUP, false, 2);
-        assertPositionMetadata(4, ITEM_TYPE_STANDALONE, false, 3);
-        assertPositionMetadata(5, ITEM_TYPE_GROUP_HEADER, false, 4);
-        assertPositionMetadata(6, ITEM_TYPE_GROUP_HEADER, false, 6);
-        assertPositionMetadata(7, ITEM_TYPE_STANDALONE, false, 8);
-    }
-
-    public void testGroupDescriptorArrayGrowth() {
-        String[] numbers = new String[500];
-        for (int i = 0; i < numbers.length; i++) {
-
-            // Make groups of 2
-            numbers[i] = String.valueOf((i / 2) * 2);
-        }
-
-        buildCursor(numbers);
-        mAdapter.changeCursor(mCursor);
-
-        assertEquals(250, mAdapter.getCount());
-    }
-
-    private void assertPositionMetadata(int position, int itemType, boolean isExpanded,
-            int cursorPosition) {
-        GroupingListAdapter.PositionMetadata metadata = new GroupingListAdapter.PositionMetadata();
-        mAdapter.obtainPositionMetadata(metadata, position);
-        assertEquals(itemType, metadata.itemType);
-        if (metadata.itemType == ITEM_TYPE_GROUP_HEADER) {
-            assertEquals(isExpanded, metadata.isExpanded);
-        }
-        assertEquals(cursorPosition, metadata.cursorPosition);
-    }
-}
diff --git a/tests/src/com/android/contacts/interactions/ContactDeletionInteractionTest.java b/tests/src/com/android/contacts/interactions/ContactDeletionInteractionTest.java
new file mode 100644
index 0000000..377fb1b
--- /dev/null
+++ b/tests/src/com/android/contacts/interactions/ContactDeletionInteractionTest.java
@@ -0,0 +1,123 @@
+/*
+ * 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.interactions;
+
+import com.android.contacts.R;
+import com.android.contacts.model.AccountTypes;
+import com.android.contacts.tests.mocks.ContactsMockContext;
+import com.android.contacts.tests.mocks.MockContentProvider;
+import com.android.contacts.tests.mocks.MockContentProvider.Query;
+import com.android.contacts.tests.mocks.MockSources;
+
+import android.content.AsyncTaskLoader;
+import android.content.ContentUris;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.RawContacts;
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.Smoke;
+
+/**
+ * Tests for {@link ContactDeletionInteraction}.
+ *
+ * Running all tests:
+ *
+ *   runtest contacts
+ * or
+ *   adb shell am instrument \
+ *     -w com.android.contacts.tests/android.test.InstrumentationTestRunner
+ */
+@Smoke
+public class ContactDeletionInteractionTest extends InstrumentationTestCase {
+
+    private final static class TestContactDeletionInteraction extends ContactDeletionInteraction {
+        public Uri contactUri;
+        public int messageId;
+
+        @Override
+        void startLoading(Loader<Cursor> loader) {
+            // Execute the loader synchronously
+            AsyncTaskLoader<Cursor> atLoader = (AsyncTaskLoader<Cursor>)loader;
+            Cursor data = atLoader.loadInBackground();
+            atLoader.deliverResult(data);
+        }
+
+        @Override
+        void showDialog(Bundle bundle) {
+            contactUri = bundle.getParcelable(EXTRA_KEY_CONTACT_URI);
+            messageId = bundle.getInt(EXTRA_KEY_MESSAGE_ID);
+        }
+
+        @Override
+        AccountTypes getSources() {
+            return new MockSources();
+        }
+    }
+
+    private ContactsMockContext mContext;
+    private MockContentProvider mContactsProvider;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mContext = new ContactsMockContext(getInstrumentation().getTargetContext());
+        mContactsProvider = mContext.getContactsProvider();
+    }
+
+    public void testSingleWritableRawContact() {
+        expectQuery().returnRow(1, MockSources.WRITABLE_ACCOUNT_TYPE);
+        assertWithMessageId(R.string.deleteConfirmation);
+    }
+
+    public void testReadOnlyRawContacts() {
+        expectQuery().returnRow(1, MockSources.READONLY_ACCOUNT_TYPE);
+        assertWithMessageId(R.string.readOnlyContactWarning);
+    }
+
+    public void testMixOfWritableAndReadOnlyRawContacts() {
+        expectQuery()
+                .returnRow(1, MockSources.WRITABLE_ACCOUNT_TYPE)
+                .returnRow(2, MockSources.READONLY_ACCOUNT_TYPE);
+        assertWithMessageId(R.string.readOnlyContactDeleteConfirmation);
+    }
+
+    public void testMultipleWritableRawContacts() {
+        expectQuery()
+                .returnRow(1, MockSources.WRITABLE_ACCOUNT_TYPE)
+                .returnRow(2, MockSources.WRITABLE_ACCOUNT_TYPE);
+        assertWithMessageId(R.string.multipleContactDeleteConfirmation);
+    }
+
+    private Query expectQuery() {
+        return mContactsProvider.expectQuery(RawContacts.CONTENT_URI)
+                .withProjection(RawContacts._ID, RawContacts.ACCOUNT_TYPE)
+                .withSelection("contact_id=?", "13");
+    }
+
+    private void assertWithMessageId(int messageId) {
+        TestContactDeletionInteraction interaction = new TestContactDeletionInteraction();
+        interaction.setContext(mContext);
+        interaction.deleteContact(ContentUris.withAppendedId(Contacts.CONTENT_URI, 13));
+        assertEquals("content://com.android.contacts/contacts/13",
+                interaction.contactUri.toString());
+        assertEquals(messageId, interaction.messageId);
+        mContactsProvider.verify();
+    }
+}
diff --git a/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java b/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java
new file mode 100644
index 0000000..8c6a1ac
--- /dev/null
+++ b/tests/src/com/android/contacts/interactions/PhoneNumberInteractionTest.java
@@ -0,0 +1,184 @@
+/*
+ * 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.interactions;
+
+import com.android.contacts.R;
+import com.android.contacts.interactions.PhoneNumberInteraction.PhoneItem;
+import com.android.contacts.tests.mocks.ContactsMockContext;
+import com.android.contacts.tests.mocks.MockContentProvider;
+import com.android.contacts.tests.mocks.MockContentProvider.Query;
+
+import android.content.AsyncTaskLoader;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.DialogInterface.OnDismissListener;
+import android.content.Intent;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.RawContacts;
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.Smoke;
+
+import java.util.ArrayList;
+
+/**
+ * Tests for {@link PhoneNumberInteraction}.
+ *
+ * Running all tests:
+ *
+ *   runtest contacts
+ * or
+ *   adb shell am instrument \
+ *     -w com.android.contacts.tests/android.test.InstrumentationTestRunner
+ */
+@Smoke
+public class PhoneNumberInteractionTest extends InstrumentationTestCase {
+
+    private final static class TestPhoneNumberInteraction extends PhoneNumberInteraction {
+        Intent startedIntent;
+        int dialogId;
+        Bundle dialogArgs;
+
+        public TestPhoneNumberInteraction(
+                Context context, boolean sendTextMessage, OnDismissListener dismissListener) {
+            super(context, sendTextMessage, dismissListener);
+        }
+
+        @Override
+        void startLoading(Loader<Cursor> loader) {
+            // Execute the loader synchronously
+            AsyncTaskLoader<Cursor> atLoader = (AsyncTaskLoader<Cursor>)loader;
+            Cursor data = atLoader.loadInBackground();
+            atLoader.deliverResult(data);
+        }
+
+        @Override
+        void startActivity(Intent intent) {
+            this.startedIntent = intent;
+        }
+
+        @Override
+        void showDialog(int dialogId, Bundle bundle) {
+            this.dialogId = dialogId;
+            this.dialogArgs = bundle;
+        }
+    }
+
+    private ContactsMockContext mContext;
+    private MockContentProvider mContactsProvider;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mContext = new ContactsMockContext(getInstrumentation().getTargetContext());
+        mContactsProvider = mContext.getContactsProvider();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        mContactsProvider.verify();
+        super.tearDown();
+    }
+
+    public void testSendSmsWhenOnlyOneNumberAvailable() {
+        Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
+        expectQuery(contactUri)
+                .returnRow(1, "123", 0, null, Phone.TYPE_HOME, null);
+
+        TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
+                mContext, true, null);
+
+        interaction.startInteraction(contactUri);
+
+        assertEquals(Intent.ACTION_SENDTO, interaction.startedIntent.getAction());
+        assertEquals("sms:123", interaction.startedIntent.getDataString());
+    }
+
+    public void testSendSmsWhenThereIsPrimaryNumber() {
+        Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
+        expectQuery(contactUri)
+                .returnRow(1, "123", 0, null, Phone.TYPE_HOME, null)
+                .returnRow(2, "456", 1, null, Phone.TYPE_HOME, null);
+
+        TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
+                mContext, true, null);
+
+        interaction.startInteraction(contactUri);
+
+        assertEquals(Intent.ACTION_SENDTO, interaction.startedIntent.getAction());
+        assertEquals("sms:456", interaction.startedIntent.getDataString());
+    }
+
+    public void testCallNumberWhenThereAreDuplicates() {
+        Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
+        expectQuery(contactUri)
+                .returnRow(1, "123", 0, null, Phone.TYPE_HOME, null)
+                .returnRow(2, "123", 0, null, Phone.TYPE_WORK, null);
+
+        TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
+                mContext, false, null);
+
+        interaction.startInteraction(contactUri);
+
+        assertEquals(Intent.ACTION_CALL_PRIVILEGED, interaction.startedIntent.getAction());
+        assertEquals("tel:123", interaction.startedIntent.getDataString());
+    }
+
+    public void testShowDisambigDialogForCalling() {
+        Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, 13);
+        expectQuery(contactUri)
+                .returnRow(1, "123", 0, "account", Phone.TYPE_HOME, "label")
+                .returnRow(2, "456", 0, null, Phone.TYPE_WORK, null);
+
+        TestPhoneNumberInteraction interaction = new TestPhoneNumberInteraction(
+                mContext, false, null);
+
+        interaction.startInteraction(contactUri);
+
+        assertEquals(R.id.dialog_phone_number_call_disambiguation, interaction.dialogId);
+
+        ArrayList<PhoneItem> items = interaction.dialogArgs.getParcelableArrayList(
+                PhoneNumberInteraction.EXTRA_KEY_ITEMS);
+        assertEquals(2, items.size());
+
+        PhoneItem item = items.get(0);
+        assertEquals(1, item.id);
+        assertEquals("123", item.phoneNumber);
+        assertEquals("account", item.accountType);
+        assertEquals(Phone.TYPE_HOME, item.type);
+        assertEquals("label", item.label);
+    }
+
+    private Query expectQuery(Uri contactUri) {
+        Uri dataUri = Uri.withAppendedPath(contactUri, Contacts.Data.CONTENT_DIRECTORY);
+        return mContactsProvider
+                .expectQuery(dataUri)
+                .withProjection(
+                        Phone._ID,
+                        Phone.NUMBER,
+                        Phone.IS_SUPER_PRIMARY,
+                        RawContacts.ACCOUNT_TYPE,
+                        Phone.TYPE,
+                        Phone.LABEL)
+                .withSelection("mimetype='vnd.android.cursor.item/phone_v2' AND data1 NOT NULL");
+    }
+}
diff --git a/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java b/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
new file mode 100644
index 0000000..5283f5f
--- /dev/null
+++ b/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
@@ -0,0 +1,579 @@
+/*
+ * 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.tests.allintents;
+
+import com.android.contacts.ContactsSearchManager;
+import com.android.contacts.list.ContactsRequest;
+import com.android.contacts.tests.R;
+import com.google.android.collect.Lists;
+
+import android.app.ListActivity;
+import android.app.SearchManager;
+import android.content.ComponentName;
+import android.content.ContentUris;
+import android.content.ContentValues;
+import android.content.Intent;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.Contacts.ContactMethods;
+import android.provider.Contacts.People;
+import android.provider.Contacts.Phones;
+import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Organization;
+import android.provider.ContactsContract.CommonDataKinds.Phone;
+import android.provider.ContactsContract.CommonDataKinds.StructuredPostal;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.Intents;
+import android.provider.ContactsContract.Intents.Insert;
+import android.provider.ContactsContract.Intents.UI;
+import android.provider.ContactsContract.RawContacts;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.Toast;
+
+/**
+ * An activity that provides access to various modes of the contacts application.
+ * Useful for manual and scripted tests.
+ */
+@SuppressWarnings("deprecation")
+public class AllIntentsActivity extends ListActivity {
+
+    private static final String ANDROID_CONTACTS_PACKAGE = "com.android.contacts";
+
+    private static final String CONTACT_LIST_ACTIVITY_CLASS_NAME =
+            "com.android.contacts.activities.ContactBrowserActivity";
+    private static final String SEARCH_RESULTS_ACTIVITY_CLASS_NAME =
+            "com.android.contacts.SearchResultsActivity";
+    private static final String MULTIPLE_PHONE_PICKER_ACTIVITY_CLASS_NAME =
+            "com.android.contacts.MultiplePhonePickerActivity";
+
+    private static final int LIST_DEFAULT = 0;
+    private static final int LIST_ALL_CONTACTS_ACTION = 1;
+    private static final int LIST_CONTACTS_WITH_PHONES_ACTION = 2;
+    private static final int LIST_STARRED_ACTION = 3;
+    private static final int LIST_STARRED_ACTION_WITH_FILTER = 4;
+    private static final int LIST_FREQUENT_ACTION = 5;
+    private static final int LIST_FREQUENT_ACTION_WITH_FILTER = 6;
+    private static final int LIST_STREQUENT_ACTION = 7;
+    private static final int LIST_STREQUENT_ACTION_WITH_FILTER = 8;
+    private static final int ACTION_PICK_CONTACT = 9;
+    private static final int ACTION_PICK_CONTACT_LEGACY = 10;
+    private static final int ACTION_PICK_PHONE = 11;
+    private static final int ACTION_PICK_PHONE_LEGACY = 12;
+    private static final int ACTION_PICK_POSTAL = 13;
+    private static final int ACTION_PICK_POSTAL_LEGACY = 14;
+    private static final int ACTION_CREATE_SHORTCUT_CONTACT = 15;
+    private static final int ACTION_CREATE_SHORTCUT_CONTACT_FILTER = 16;
+    private static final int ACTION_CREATE_SHORTCUT_DIAL = 17;
+    private static final int ACTION_CREATE_SHORTCUT_DIAL_FILTER = 18;
+    private static final int ACTION_CREATE_SHORTCUT_MESSAGE = 19;
+    private static final int ACTION_CREATE_SHORTCUT_MESSAGE_FILTER = 20;
+    private static final int ACTION_GET_CONTENT_CONTACT = 21;
+    private static final int ACTION_GET_CONTENT_CONTACT_FILTER = 22;
+    private static final int ACTION_GET_CONTENT_CONTACT_LEGACY = 23;
+    private static final int ACTION_GET_CONTENT_CONTACT_FILTER_LEGACY = 24;
+    private static final int ACTION_GET_CONTENT_PHONE = 25;
+    private static final int ACTION_GET_CONTENT_PHONE_FILTER = 26;
+    private static final int ACTION_GET_CONTENT_PHONE_LEGACY = 27;
+    private static final int ACTION_GET_CONTENT_POSTAL = 28;
+    private static final int ACTION_GET_CONTENT_POSTAL_FILTER = 29;
+    private static final int ACTION_GET_CONTENT_POSTAL_LEGACY = 30;
+    private static final int ACTION_INSERT_OR_EDIT = 31;
+    private static final int ACTION_SEARCH_CALL = 32;
+    private static final int ACTION_SEARCH_CONTACT = 33;
+    private static final int ACTION_SEARCH_EMAIL = 34;
+    private static final int ACTION_SEARCH_PHONE = 35;
+    private static final int SEARCH_SUGGESTION_CLICKED_CALL_BUTTON = 36;
+    private static final int SEARCH_SUGGESTION_CLICKED_CONTACT = 37;
+    private static final int SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED = 38;
+    private static final int SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED = 39;
+    private static final int JOIN_CONTACT = 40;
+    private static final int ACTION_GET_MULTIPLE_PHONES = 41;
+
+    private static final int EDIT_CONTACT = 42;
+    private static final int EDIT_CONTACT_LOOKUP = 43;
+    private static final int EDIT_CONTACT_LOOKUP_ID = 44;
+    private static final int EDIT_RAW_CONTACT = 45;
+    private static final int EDIT_LEGACY = 46;
+    private static final int EDIT_NEW_CONTACT = 47;
+    private static final int EDIT_NEW_CONTACT_WITH_DATA = 48;
+    private static final int EDIT_NEW_RAW_CONTACT = 49;
+    private static final int EDIT_NEW_LEGACY = 50;
+
+    private static final int VIEW_CONTACT = 51;
+    private static final int VIEW_CONTACT_LOOKUP = 52;
+    private static final int VIEW_CONTACT_LOOKUP_ID = 53;
+    private static final int VIEW_RAW_CONTACT = 54;
+    private static final int VIEW_LEGACY = 55;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setListAdapter(new ArrayAdapter<String>(this, R.layout.intent_list_item,
+                getResources().getStringArray(R.array.allIntents)));
+    }
+
+    @Override
+    protected void onListItemClick(ListView l, View v, int position, long id) {
+        super.onListItemClick(l, v, position, id);
+
+        switch (position) {
+            case LIST_DEFAULT: {
+                startContactListActivity(
+                        new Intent(Intent.ACTION_VIEW, Contacts.CONTENT_URI));
+                break;
+            }
+            case LIST_ALL_CONTACTS_ACTION: {
+                startContactListActivity(
+                        new Intent(UI.LIST_ALL_CONTACTS_ACTION, Contacts.CONTENT_URI));
+                break;
+            }
+            case LIST_CONTACTS_WITH_PHONES_ACTION: {
+                startContactListActivity(
+                        new Intent(UI.LIST_CONTACTS_WITH_PHONES_ACTION, Contacts.CONTENT_URI));
+                break;
+            }
+            case LIST_STARRED_ACTION: {
+                startContactListActivity(
+                        new Intent(UI.LIST_STARRED_ACTION, Contacts.CONTENT_URI));
+                break;
+            }
+            case LIST_STARRED_ACTION_WITH_FILTER: {
+                startContactListActivity(buildFilterIntent(ContactsRequest.ACTION_STARRED, false));
+                break;
+            }
+            case LIST_FREQUENT_ACTION: {
+                startContactListActivity(
+                        new Intent(UI.LIST_FREQUENT_ACTION, Contacts.CONTENT_URI));
+                break;
+            }
+            case LIST_FREQUENT_ACTION_WITH_FILTER: {
+                startContactListActivity(
+                        buildFilterIntent(ContactsRequest.ACTION_FREQUENT, false));
+                break;
+            }
+            case LIST_STREQUENT_ACTION: {
+                startContactListActivity(
+                        new Intent(UI.LIST_STREQUENT_ACTION, Contacts.CONTENT_URI));
+                break;
+            }
+            case LIST_STREQUENT_ACTION_WITH_FILTER: {
+                startContactListActivity(
+                        buildFilterIntent(ContactsRequest.ACTION_STREQUENT, false));
+                break;
+            }
+            case ACTION_PICK_CONTACT: {
+                startContactSelectionActivityForResult(
+                        new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI));
+                break;
+            }
+            case ACTION_PICK_CONTACT_LEGACY: {
+                startContactSelectionActivityForResult(
+                        new Intent(Intent.ACTION_PICK, People.CONTENT_URI));
+                break;
+            }
+            case ACTION_PICK_PHONE: {
+                startContactSelectionActivityForResult(
+                        new Intent(Intent.ACTION_PICK, Phone.CONTENT_URI));
+                break;
+            }
+            case ACTION_PICK_PHONE_LEGACY: {
+                startContactSelectionActivityForResult(
+                        new Intent(Intent.ACTION_PICK, Phones.CONTENT_URI));
+                break;
+            }
+            case ACTION_PICK_POSTAL: {
+                startContactSelectionActivityForResult(
+                        new Intent(Intent.ACTION_PICK, StructuredPostal.CONTENT_URI));
+                break;
+            }
+            case ACTION_PICK_POSTAL_LEGACY: {
+                Intent intent = new Intent(Intent.ACTION_PICK);
+                intent.setType(ContactMethods.CONTENT_POSTAL_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_CREATE_SHORTCUT_CONTACT: {
+                Intent intent = new Intent(Intent.ACTION_CREATE_SHORTCUT);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_CREATE_SHORTCUT_CONTACT_FILTER: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_CREATE_SHORTCUT_CONTACT,
+                                false));
+                break;
+            }
+            case ACTION_CREATE_SHORTCUT_DIAL: {
+                Intent intent = new Intent(Intent.ACTION_CREATE_SHORTCUT);
+                intent.setComponent(
+                        new ComponentName(ANDROID_CONTACTS_PACKAGE, "alias.DialShortcut"));
+                startActivityForResult(intent, 0);
+                break;
+            }
+            case ACTION_CREATE_SHORTCUT_DIAL_FILTER: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_CREATE_SHORTCUT_CALL,
+                                false));
+                break;
+            }
+            case ACTION_CREATE_SHORTCUT_MESSAGE: {
+                Intent intent = new Intent(Intent.ACTION_CREATE_SHORTCUT);
+                intent.setComponent(
+                        new ComponentName(ANDROID_CONTACTS_PACKAGE, "alias.MessageShortcut"));
+                startActivityForResult(intent, 0);
+                break;
+            }
+            case ACTION_CREATE_SHORTCUT_MESSAGE_FILTER: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_CREATE_SHORTCUT_CALL, false));
+                break;
+            }
+            case ACTION_GET_CONTENT_CONTACT: {
+                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+                intent.setType(Contacts.CONTENT_ITEM_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_GET_CONTENT_CONTACT_LEGACY: {
+                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+                intent.setType(People.CONTENT_ITEM_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_GET_CONTENT_CONTACT_FILTER: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_PICK_OR_CREATE_CONTACT, false));
+                break;
+            }
+            case ACTION_GET_CONTENT_CONTACT_FILTER_LEGACY: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_PICK_OR_CREATE_CONTACT,
+                                true));
+                break;
+            }
+            case ACTION_GET_CONTENT_PHONE: {
+                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+                intent.setType(Phone.CONTENT_ITEM_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_GET_CONTENT_PHONE_FILTER: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_PICK_PHONE, true));
+                break;
+            }
+            case ACTION_GET_CONTENT_PHONE_LEGACY: {
+                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+                intent.setType(Phones.CONTENT_ITEM_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_GET_CONTENT_POSTAL: {
+                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+                intent.setType(StructuredPostal.CONTENT_ITEM_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_GET_CONTENT_POSTAL_FILTER: {
+                startContactSelectionActivityForResult(
+                        buildFilterIntent(ContactsRequest.ACTION_PICK_POSTAL, false));
+                break;
+            }
+            case ACTION_GET_CONTENT_POSTAL_LEGACY: {
+                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
+                intent.setType(ContactMethods.CONTENT_POSTAL_ITEM_TYPE);
+                startContactSelectionActivityForResult(intent);
+                break;
+            }
+            case ACTION_INSERT_OR_EDIT: {
+                Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
+                startContactListActivity(intent);
+                break;
+            }
+            case ACTION_SEARCH_CALL: {
+                Intent intent = new Intent(Intent.ACTION_SEARCH);
+                intent.putExtra(SearchManager.ACTION_MSG, "call");
+                intent.putExtra(SearchManager.QUERY, "800-4664-411");
+                startSearchResultActivity(intent);
+                break;
+            }
+            case ACTION_SEARCH_CONTACT: {
+                Intent intent = new Intent(Intent.ACTION_SEARCH);
+                intent.putExtra(SearchManager.QUERY, "a");
+                startSearchResultActivity(intent);
+                break;
+            }
+            case ACTION_SEARCH_EMAIL: {
+                Intent intent = new Intent(Intent.ACTION_SEARCH);
+                intent.putExtra(Insert.EMAIL, "a");
+                startSearchResultActivity(intent);
+                break;
+            }
+            case ACTION_SEARCH_PHONE: {
+                Intent intent = new Intent(Intent.ACTION_SEARCH);
+                intent.putExtra(Insert.PHONE, "800");
+                startSearchResultActivity(intent);
+                break;
+            }
+            case SEARCH_SUGGESTION_CLICKED_CALL_BUTTON: {
+                long contactId = findArbitraryContactWithPhoneNumber();
+                if (contactId != -1) {
+                    Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                    Intent intent = new Intent(Intents.SEARCH_SUGGESTION_CLICKED);
+                    intent.setData(contactUri);
+                    intent.putExtra(SearchManager.ACTION_MSG, "call");
+                    startContactListActivity(intent);
+                }
+                break;
+            }
+            case SEARCH_SUGGESTION_CLICKED_CONTACT: {
+                long contactId = findArbitraryContactWithPhoneNumber();
+                if (contactId != -1) {
+                    Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                    Intent intent = new Intent(Intents.SEARCH_SUGGESTION_CLICKED);
+                    intent.setData(contactUri);
+                    startContactListActivity(intent);
+                }
+                break;
+            }
+            case SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED: {
+                Intent intent = new Intent(Intents.SEARCH_SUGGESTION_DIAL_NUMBER_CLICKED);
+                intent.setData(Uri.parse("tel:800-4664411"));
+                startContactListActivity(intent);
+                break;
+            }
+            case SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED: {
+                Intent intent = new Intent(Intents.SEARCH_SUGGESTION_CREATE_CONTACT_CLICKED);
+                intent.setData(Uri.parse("tel:800-4664411"));
+                startContactListActivity(intent);
+                break;
+            }
+            case JOIN_CONTACT: {
+                // TODO
+                break;
+            }
+            case ACTION_GET_MULTIPLE_PHONES: {
+                Intent intent = new Intent(Intents.ACTION_GET_MULTIPLE_PHONES);
+                intent.setType(Phone.CONTENT_TYPE);
+                intent.putExtra(Intents.EXTRA_PHONE_URIS, new Uri[] {
+                        Uri.parse("tel:555-1212"), Uri.parse("tel:555-2121")
+                });
+                startMultiplePhoneSelectionActivityForResult(intent);
+                break;
+            }
+            case EDIT_CONTACT: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Intent intent = new Intent(Intent.ACTION_EDIT, uri);
+                startActivity(intent);
+                break;
+            }
+            case EDIT_CONTACT_LOOKUP: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), uri);
+                final String lookupKey = lookupUri.getPathSegments().get(2);
+                final Uri lookupWithoutIdUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI,
+                        lookupKey);
+                final Intent intent = new Intent(Intent.ACTION_EDIT, lookupWithoutIdUri);
+                startActivity(intent);
+                break;
+            }
+            case EDIT_CONTACT_LOOKUP_ID: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), uri);
+                final Intent intent = new Intent(Intent.ACTION_EDIT, lookupUri);
+                startActivity(intent);
+                break;
+            }
+            case EDIT_RAW_CONTACT: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final long rawContactId = findArbitraryRawContactOfContact(contactId);
+                final Uri uri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
+                final Intent intent = new Intent(Intent.ACTION_EDIT, uri);
+                startActivity(intent);
+                break;
+            }
+            case EDIT_LEGACY: {
+                final Uri legacyContentUri = Uri.parse("content://contacts/people");
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final long rawContactId = findArbitraryRawContactOfContact(contactId);
+                final Uri uri = ContentUris.withAppendedId(legacyContentUri, rawContactId);
+                final Intent intent = new Intent(Intent.ACTION_EDIT, uri);
+                startActivity(intent);
+                break;
+            }
+            case EDIT_NEW_CONTACT: {
+                startActivity(new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI));
+                break;
+            }
+            case EDIT_NEW_CONTACT_WITH_DATA: {
+                Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
+
+                ContentValues row1 = new ContentValues();
+                row1.put(Data.MIMETYPE, Organization.CONTENT_ITEM_TYPE);
+                row1.put(Organization.COMPANY, "Android");
+
+                ContentValues row2 = new ContentValues();
+                row2.put(Data.MIMETYPE, Email.CONTENT_ITEM_TYPE);
+                row2.put(Email.TYPE, Email.TYPE_CUSTOM);
+                row2.put(Email.LABEL, "Green Bot");
+                row2.put(Email.ADDRESS, "android@android.com");
+
+                intent.putParcelableArrayListExtra(Insert.DATA, Lists.newArrayList(row1, row2));
+
+                startActivity(intent);
+                break;
+            }
+            case EDIT_NEW_RAW_CONTACT: {
+                startActivity(new Intent(Intent.ACTION_INSERT, RawContacts.CONTENT_URI));
+                break;
+            }
+            case EDIT_NEW_LEGACY: {
+                final Uri legacyContentUri = Uri.parse("content://contacts/people");
+                startActivity(new Intent(Intent.ACTION_INSERT, legacyContentUri));
+                break;
+            }
+            case VIEW_CONTACT: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_CONTACT_LOOKUP: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), uri);
+                final String lookupKey = lookupUri.getPathSegments().get(2);
+                final Uri lookupWithoutIdUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI,
+                        lookupKey);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, lookupWithoutIdUri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_CONTACT_LOOKUP_ID: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), uri);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, lookupUri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_RAW_CONTACT: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final long rawContactId = findArbitraryRawContactOfContact(contactId);
+                final Uri uri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_LEGACY: {
+                final Uri legacyContentUri = Uri.parse("content://contacts/people");
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final long rawContactId = findArbitraryRawContactOfContact(contactId);
+                final Uri uri = ContentUris.withAppendedId(legacyContentUri, rawContactId);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                startActivity(intent);
+                break;
+            }
+            default: {
+                Toast.makeText(this, "Sorry, we forgot to write this...", Toast.LENGTH_LONG).show();
+            }
+        }
+    }
+
+    private Intent buildFilterIntent(int actionCode, boolean legacy) {
+        Intent intent = new Intent(UI.FILTER_CONTACTS_ACTION);
+        intent.putExtra(UI.FILTER_TEXT_EXTRA_KEY, "A");
+        ContactsRequest request = new ContactsRequest();
+        request.setActionCode(actionCode);
+        intent.putExtra(ContactsSearchManager.ORIGINAL_REQUEST_KEY, request);
+        return intent;
+    }
+
+    private void startContactListActivity(Intent intent) {
+        intent.setComponent(
+                new ComponentName(ANDROID_CONTACTS_PACKAGE, CONTACT_LIST_ACTIVITY_CLASS_NAME));
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        startActivity(intent);
+    }
+
+    private void startContactSelectionActivityForResult(Intent intent) {
+        startActivityForResult(intent, 12);
+    }
+
+    private void startSearchResultActivity(Intent intent) {
+        intent.setComponent(
+                new ComponentName(ANDROID_CONTACTS_PACKAGE, SEARCH_RESULTS_ACTIVITY_CLASS_NAME));
+        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        startActivity(intent);
+    }
+
+    private void startMultiplePhoneSelectionActivityForResult(Intent intent) {
+        intent.setComponent(
+                new ComponentName(ANDROID_CONTACTS_PACKAGE,
+                        MULTIPLE_PHONE_PICKER_ACTIVITY_CLASS_NAME));
+        startActivityForResult(intent, 13);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        Intent intent = new Intent(this, ResultActivity.class);
+        intent.putExtra("resultCode", resultCode);
+        intent.putExtra("data", data);
+        startActivity(intent);
+    }
+
+    private long findArbitraryContactWithPhoneNumber() {
+        final Cursor cursor = getContentResolver().query(Contacts.CONTENT_URI,
+                new String[] { Contacts._ID },
+                Contacts.HAS_PHONE_NUMBER + "!=0 AND " + Contacts.STARRED + "!=0" ,
+                null, "RANDOM() LIMIT 1");
+        try {
+            if (cursor.moveToFirst()) {
+                return cursor.getLong(0);
+            }
+        } finally {
+            cursor.close();
+        }
+
+        return -1;
+    }
+
+    private long findArbitraryRawContactOfContact(long contactId) {
+        final Cursor cursor = getContentResolver().query(RawContacts.CONTENT_URI,
+                new String[] { RawContacts._ID },
+                RawContacts.CONTACT_ID + "=?",
+                new String[] { String.valueOf(contactId) },
+                RawContacts._ID + " LIMIT 1");
+        try {
+            if (cursor.moveToFirst()) {
+                return cursor.getLong(0);
+            }
+        } finally {
+            cursor.close();
+        }
+
+        return -1;
+    }
+}
diff --git a/tests/src/com/android/contacts/tests/allintents/ResultActivity.java b/tests/src/com/android/contacts/tests/allintents/ResultActivity.java
new file mode 100644
index 0000000..562f2ba
--- /dev/null
+++ b/tests/src/com/android/contacts/tests/allintents/ResultActivity.java
@@ -0,0 +1,196 @@
+/*
+ * 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.tests.allintents;
+
+import com.android.contacts.tests.R;
+
+import android.app.Activity;
+import android.content.ContentUris;
+import android.content.Intent;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Color;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.CommonDataKinds.Photo;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TableLayout;
+import android.widget.TableRow;
+import android.widget.TextView;
+import android.widget.ImageView.ScaleType;
+
+import java.util.Arrays;
+
+/**
+ * An activity that shows the result of a contacts activity invocation.
+ */
+public class ResultActivity extends Activity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.result);
+
+        Intent intent = getIntent();
+        addRowsForIntent((Intent)intent.getExtras().get("data"));
+    }
+
+    private void addRowsForIntent(Intent intent) {
+        if (intent == null) {
+            addRow("", "No data intent returned");
+        } else {
+            addRow("INTENT", intent.toString());
+            addSeparator(3);
+
+            Bundle extras = intent.getExtras();
+            if (extras != null && !extras.isEmpty()) {
+                for (String key : extras.keySet()) {
+                    Object value = extras.get(key);
+                    addRow("EXTRA", key);
+                    addRowForValue("", value);
+                }
+
+                addSeparator(3);
+            }
+
+            String dataUri = intent.getDataString();
+            if (dataUri != null) {
+                addRowsForQuery(Uri.parse(dataUri));
+            }
+        }
+    }
+
+    private void addRowForValue(String label, Object value) {
+        if (value == null) {
+            addRow(label, "null");
+        } else if (value instanceof Bitmap) {
+            addRowWithBitmap(label, (Bitmap)value);
+        } else if (value instanceof Intent) {
+            addRow(label, "INTENT");
+            addRowsForIntent((Intent)value);
+        } else if (value instanceof Uri) {
+            addRow(label, "DATA");
+            addRowsForQuery((Uri)value);
+        } else if (value.getClass().isArray()) {
+            addRow(label, "ARRAY");
+            Parcelable[] array = (Parcelable[])value;
+            for (int i = 0; i < array.length; i++) {
+                addRowForValue("[" + i + "]", String.valueOf(array[i]));
+            }
+        } else {
+            addRow(label, String.valueOf(value));
+        }
+    }
+
+    private void addRowsForQuery(Uri dataUri) {
+        Cursor cursor = getContentResolver().query(dataUri, null, null, null, null);
+        if (cursor == null) {
+            addRow("", "No data for this URI");
+        } else {
+            try {
+                while (cursor.moveToNext()) {
+                    addRow("", "DATA");
+                    String[] columnNames = cursor.getColumnNames();
+                    String[] names = new String[columnNames.length];
+                    System.arraycopy(columnNames, 0, names, 0, columnNames.length);
+                    Arrays.sort(names);
+                    for (int i = 0; i < names.length; i++) {
+                        int index = cursor.getColumnIndex(names[i]);
+                        String value = cursor.getString(index);
+                        addRow(names[i], value);
+
+                        if (names[i].equals(Contacts.PHOTO_ID) && !TextUtils.isEmpty(value)) {
+                            addRowWithPhoto(Long.parseLong(value));
+                        }
+                    }
+                }
+            } finally {
+                cursor.close();
+            }
+        }
+    }
+
+    private void addRow(String column0, String column1) {
+        TextView label = new TextView(this);
+        label.setPadding(4, 4, 4, 4);
+        label.setText(column0);
+        TextView value = new TextView(this);
+        value.setPadding(4, 4, 4, 4);
+        value.setText(column1);
+        addRow(label, value);
+    }
+
+    private void addRowWithPhoto(long photoId) {
+        byte[] data = null;
+        Cursor cursor = getContentResolver().query(
+                ContentUris.withAppendedId(Data.CONTENT_URI, photoId),
+                new String[]{Photo.PHOTO}, null, null, null);
+        try {
+            if (cursor.moveToNext()) {
+                data = cursor.getBlob(0);
+            }
+        } finally {
+            if (cursor != null) {
+                cursor.close();
+            }
+        }
+
+        if (data == null) {
+            return;
+        }
+
+        addRowWithBitmap("Photo", BitmapFactory.decodeByteArray(data, 0, data.length));
+    }
+
+    private void addRowWithBitmap(String label, Bitmap bitmap) {
+        TextView labelView = new TextView(this);
+        labelView.setPadding(4, 4, 4, 4);
+        labelView.setText(label);
+
+        ImageView imageView = new ImageView(this);
+        imageView.setImageBitmap(bitmap);
+        imageView.setPadding(4, 4, 4, 4);
+        imageView.setScaleType(ScaleType.FIT_START);
+        addRow(labelView, imageView);
+    }
+
+    private void addRow(View column0, View column1) {
+        TableLayout table = (TableLayout)findViewById(R.id.table);
+        TableRow row = new TableRow(this);
+        row.addView(column0);
+        row.addView(column1);
+        table.addView(row);
+
+        addSeparator(1);
+    }
+
+    private void addSeparator(int height) {
+        TableLayout table = (TableLayout)findViewById(R.id.table);
+        View separator = new View(this);
+        TableLayout.LayoutParams params = new TableLayout.LayoutParams();
+        params.height = height;
+        separator.setLayoutParams(params);
+        separator.setBackgroundColor(Color.rgb(33, 66, 33));
+        table.addView(separator);
+    }
+}
diff --git a/tests/src/com/android/contacts/tests/mocks/ContactsMockContext.java b/tests/src/com/android/contacts/tests/mocks/ContactsMockContext.java
new file mode 100644
index 0000000..4697b83
--- /dev/null
+++ b/tests/src/com/android/contacts/tests/mocks/ContactsMockContext.java
@@ -0,0 +1,63 @@
+/*
+ * 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.tests.mocks;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.ContextWrapper;
+import android.provider.ContactsContract;
+import android.provider.Settings;
+import android.test.mock.MockContentResolver;
+
+/**
+ * A mock context for contact activity unit tests. Forwards everything to
+ * a supplied context, except content resolver operations, which are sent
+ * to mock content providers.
+ */
+public class ContactsMockContext extends ContextWrapper {
+
+    private MockContentResolver mContentResolver;
+    private MockContentProvider mContactsProvider;
+    private MockContentProvider mSettingsProvider;
+
+    public ContactsMockContext(Context base) {
+        super(base);
+        mContentResolver = new MockContentResolver();
+        mContactsProvider = new MockContentProvider();
+        mContentResolver.addProvider(ContactsContract.AUTHORITY, mContactsProvider);
+        mSettingsProvider = new MockContentProvider();
+        mContentResolver.addProvider(Settings.AUTHORITY, mSettingsProvider);
+    }
+
+    @Override
+    public ContentResolver getContentResolver() {
+        return mContentResolver;
+    }
+
+    public MockContentProvider getContactsProvider() {
+        return mContactsProvider;
+    }
+
+    public MockContentProvider getSettingsProvider() {
+        return mSettingsProvider;
+    }
+
+    @Override
+    public Context getApplicationContext() {
+        return this;
+    }
+}
diff --git a/tests/src/com/android/contacts/tests/mocks/MockContentProvider.java b/tests/src/com/android/contacts/tests/mocks/MockContentProvider.java
new file mode 100644
index 0000000..14d563c
--- /dev/null
+++ b/tests/src/com/android/contacts/tests/mocks/MockContentProvider.java
@@ -0,0 +1,259 @@
+/*
+ * 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.tests.mocks;
+
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.net.Uri;
+import android.text.TextUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedList;
+
+import junit.framework.Assert;
+
+/**
+ * A programmable mock content provider.
+ */
+public class MockContentProvider extends ContentProvider {
+    private static final String TAG = "MockContentProvider";
+
+    public static class Query {
+
+        private final Uri mUri;
+        private String[] mProjection;
+        private String[] mDefaultProjection;
+        private String mSelection;
+        private String[] mSelectionArgs;
+        private String mSortOrder;
+        private ArrayList<Object[]> mRows = new ArrayList<Object[]>();
+
+        public Query(Uri uri) {
+            mUri = uri;
+        }
+
+        @Override
+        public String toString() {
+            return queryToString(mUri, mProjection, mSelection, mSelectionArgs, mSortOrder);
+        }
+
+        public Query withProjection(String... projection) {
+            mProjection = projection;
+            return this;
+        }
+
+        public Query withDefaultProjection(String... projection) {
+            mDefaultProjection = projection;
+            return this;
+        }
+
+        public Query withSelection(String selection, String... selectionArgs) {
+            mSelection = selection;
+            mSelectionArgs = selectionArgs;
+            return this;
+        }
+
+        public Query withSortOrder(String sortOrder) {
+            mSortOrder = sortOrder;
+            return this;
+        }
+
+        public Query returnRow(Object... row) {
+            mRows.add(row);
+            return this;
+        }
+
+        public boolean equals(Uri uri, String[] projection, String selection,
+                String[] selectionArgs, String sortOrder) {
+            if (!uri.equals(mUri)) {
+                return false;
+            }
+
+            if (!equals(projection, mProjection)) {
+                return false;
+            }
+
+            if (!TextUtils.equals(selection, mSelection)) {
+                return false;
+            }
+
+            if (!equals(selectionArgs, mSelectionArgs)) {
+                return false;
+            }
+
+            if (!TextUtils.equals(sortOrder, mSortOrder)) {
+                return false;
+            }
+
+            return true;
+        }
+
+        private static boolean equals(String[] array1, String[] array2) {
+            boolean empty1 = array1 == null || array1.length == 0;
+            boolean empty2 = array2 == null || array2.length == 0;
+            if (empty1 && empty2) {
+                return true;
+            }
+            if (empty1 != empty2 && (empty1 || empty2)) {
+                return false;
+            }
+
+            if (array1.length != array2.length) return false;
+
+            for (int i = 0; i < array1.length; i++) {
+                if (!array1[i].equals(array2[i])) {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        public Cursor getResult() {
+            String[] columnNames = mProjection != null ? mProjection : mDefaultProjection;
+            MatrixCursor cursor = new MatrixCursor(columnNames);
+            for (Object[] row : mRows) {
+                cursor.addRow(row);
+            }
+            return cursor;
+        }
+    }
+
+    public static class TypeQuery {
+        private final Uri mUri;
+        private final String mType;
+
+        public TypeQuery(Uri uri, String type) {
+            mUri = uri;
+            mType = type;
+        }
+
+        public Uri getUri() {
+            return mUri;
+        }
+
+        public String getType() {
+            return mType;
+        }
+
+        @Override
+        public String toString() {
+            return mUri + " --> " + mType;
+        }
+
+        public boolean equals(Uri uri) {
+            return getUri().equals(uri);
+        }
+    }
+
+    private LinkedList<Query> mExpectedQueries = new LinkedList<Query>();
+    private LinkedList<TypeQuery> mExpectedTypeQueries = new LinkedList<TypeQuery>();
+
+    @Override
+    public boolean onCreate() {
+        return true;
+    }
+
+    public Query expectQuery(Uri contentUri) {
+        Query query = new Query(contentUri);
+        mExpectedQueries.offer(query);
+        return query;
+    }
+
+    public void expectTypeQuery(Uri uri, String type) {
+        TypeQuery result = new TypeQuery(uri, type);
+        mExpectedTypeQueries.offer(result);
+    }
+
+    @Override
+    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+            String sortOrder) {
+        if (mExpectedQueries.isEmpty()) {
+            Assert.fail("Unexpected query: "
+                    + queryToString(uri, projection, selection, selectionArgs, sortOrder));
+        }
+
+        Query query = mExpectedQueries.remove();
+        if (!query.equals(uri, projection, selection, selectionArgs, sortOrder)) {
+            Assert.fail("Incorrect query.\n    Expected: " + query + "\n      Actual: " +
+                    queryToString(uri, projection, selection, selectionArgs, sortOrder));
+        }
+
+        return query.getResult();
+    }
+
+    @Override
+    public int delete(Uri uri, String selection, String[] selectionArgs) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String getType(Uri uri) {
+        if (mExpectedTypeQueries.isEmpty()) {
+            Assert.fail("Unexpected getType query: " + uri);
+        }
+
+        TypeQuery query = mExpectedTypeQueries.remove();
+        if (!query.equals(uri)) {
+            Assert.fail("Incorrect query.\n    Expected: " + query + "\n      Actual: " + uri);
+        }
+
+        return query.getType();
+    }
+
+    @Override
+    public Uri insert(Uri uri, ContentValues values) {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+        throw new UnsupportedOperationException();
+    }
+
+    private static String queryToString(Uri uri, String[] projection, String selection,
+            String[] selectionArgs, String sortOrder) {
+        StringBuilder sb = new StringBuilder();
+        sb.append(uri).append(" ");
+        if (projection != null) {
+            sb.append(Arrays.toString(projection));
+        } else {
+            sb.append("[]");
+        }
+        if (selection != null) {
+            sb.append(" selection: '").append(selection).append("'");
+            if (selectionArgs != null) {
+                sb.append(Arrays.toString(selectionArgs));
+            } else {
+                sb.append("[]");
+            }
+        }
+        if (sortOrder != null) {
+            sb.append(" sort: '").append(sortOrder).append("'");
+        }
+        return sb.toString();
+    }
+
+    public void verify() {
+        Assert.assertTrue("Not all expected queries have been called: " +
+                mExpectedQueries, mExpectedQueries.isEmpty());
+        Assert.assertTrue("Not all expected getType-queries have been called: " +
+                mExpectedQueries, mExpectedTypeQueries.isEmpty());
+    }
+}
diff --git a/tests/src/com/android/contacts/tests/mocks/MockSources.java b/tests/src/com/android/contacts/tests/mocks/MockSources.java
new file mode 100644
index 0000000..4c3007a
--- /dev/null
+++ b/tests/src/com/android/contacts/tests/mocks/MockSources.java
@@ -0,0 +1,46 @@
+/*
+ * 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.tests.mocks;
+
+import com.android.contacts.model.BaseAccountType;
+import com.android.contacts.model.FallbackAccountType;
+import com.android.contacts.model.AccountTypes;
+
+/**
+ * A mock {@link AccountTypes} class.
+ */
+public class MockSources extends AccountTypes {
+
+    public static final String WRITABLE_ACCOUNT_TYPE = "writable";
+    public static final String READONLY_ACCOUNT_TYPE = "readonly";
+
+    @Override
+    public BaseAccountType getInflatedSource(String accountType, int inflateLevel) {
+        if (accountType.equals(WRITABLE_ACCOUNT_TYPE)) {
+            BaseAccountType source = new FallbackAccountType();
+            source.readOnly = false;
+            return source;
+        }
+
+        if (accountType.equals(READONLY_ACCOUNT_TYPE)) {
+            BaseAccountType source = new FallbackAccountType();
+            source.readOnly = true;
+            return source;
+        }
+
+        return null;
+    }
+}
diff --git a/tests/src/com/android/contacts/tests/widget/PinnedHeaderUseCaseActivity.java b/tests/src/com/android/contacts/tests/widget/PinnedHeaderUseCaseActivity.java
new file mode 100644
index 0000000..b01963f
--- /dev/null
+++ b/tests/src/com/android/contacts/tests/widget/PinnedHeaderUseCaseActivity.java
@@ -0,0 +1,89 @@
+/*
+ * 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.tests.widget;
+
+import com.android.contacts.tests.R;
+import com.android.contacts.widget.PinnedHeaderListView;
+
+import android.app.ListActivity;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+
+/**
+ * An activity that demonstrates various use cases for the {@link PinnedHeaderListView}.
+ */
+public class PinnedHeaderUseCaseActivity extends ListActivity {
+
+    private static final int SINGLE_SHORT_SECTION_NO_HEADERS = 0;
+    private static final int TWO_SHORT_SECTIONS_WITH_HEADERS = 1;
+    private static final int FIVE_SHORT_SECTIONS_WITH_HEADERS = 2;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setListAdapter(new ArrayAdapter<String>(this, R.layout.intent_list_item,
+                getResources().getStringArray(R.array.pinnedHeaderUseCases)));
+    }
+
+    @Override
+    protected void onListItemClick(ListView l, View v, int position, long id) {
+        switch (position) {
+            case SINGLE_SHORT_SECTION_NO_HEADERS:
+                startActivity(
+                        new int[]{5},
+                        new String[]{"Line"},
+                        new boolean[]{false},
+                        new boolean[]{false},
+                        new int[]{0});
+                break;
+            case TWO_SHORT_SECTIONS_WITH_HEADERS:
+                startActivity(
+                        new int[]{2, 30},
+                        new String[]{"First", "Second"},
+                        new boolean[]{true, true},
+                        new boolean[]{false, false},
+                        new int[]{0, 2000});
+                break;
+            case FIVE_SHORT_SECTIONS_WITH_HEADERS:
+                startActivity(
+                        new int[]{1, 5, 5, 5, 5},
+                        new String[]{"First", "Second", "Third", "Fourth", "Fifth"},
+                        new boolean[]{true, true, true, true, true},
+                        new boolean[]{false, false, false, false, false},
+                        new int[]{0, 2000, 3000, 4000, 5000});
+                break;
+        }
+    }
+
+    private void startActivity(int[] counts, String[] names, boolean[] headers,
+            boolean[] showIfEmpty, int[] delays) {
+        Intent intent = new Intent();
+        intent.setComponent(new ComponentName("com.android.contacts",
+                "com.android.contacts.widget.PinnedHeaderListDemoActivity"));
+        intent.putExtra("counts", counts);
+        intent.putExtra("names", names);
+        intent.putExtra("headers", headers);
+        intent.putExtra("showIfEmpty", showIfEmpty);
+        intent.putExtra("delays", delays);
+
+        startActivity(intent);
+    }
+}
diff --git a/tests/src/com/android/contacts/vcard/ImportProcessorTest.java b/tests/src/com/android/contacts/vcard/ImportProcessorTest.java
new file mode 100644
index 0000000..72245ba
--- /dev/null
+++ b/tests/src/com/android/contacts/vcard/ImportProcessorTest.java
@@ -0,0 +1,180 @@
+/*
+ * 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.vcard;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.net.Uri;
+import android.test.AndroidTestCase;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.contacts.vcard.ImportProcessor.CommitterGenerator;
+import com.android.vcard.VCardEntryCommitter;
+import com.android.vcard.VCardInterpreter;
+import com.android.vcard.VCardSourceDetector;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.channels.WritableByteChannel;
+import java.util.List;
+
+public class ImportProcessorTest extends AndroidTestCase {
+    private static final String LOG_TAG = "ImportProcessorTest";
+    private ImportProcessor mImportProcessor;
+
+    private String mCopiedFileName;
+
+    // XXX: better way to copy stream?
+    private Uri copyToLocal(final String fileName) throws IOException {
+        final Context context = getContext();
+        // We need to use Context of this unit test runner (not of test to be tested),
+        // as only the former knows assets to be copied.
+        final Context testContext = getTestContext();
+        final ContentResolver resolver = testContext.getContentResolver();
+        mCopiedFileName = fileName;
+        ReadableByteChannel inputChannel = null;
+        WritableByteChannel outputChannel = null;
+        Uri destUri;
+        try {
+            inputChannel = Channels.newChannel(testContext.getAssets().open(fileName));
+            destUri = Uri.parse(context.getFileStreamPath(fileName).toURI().toString());
+            outputChannel =
+                    getContext().openFileOutput(fileName,
+                            Context.MODE_WORLD_WRITEABLE).getChannel();
+            final ByteBuffer buffer = ByteBuffer.allocateDirect(8192);
+            while (inputChannel.read(buffer) != -1) {
+                buffer.flip();
+                outputChannel.write(buffer);
+                buffer.compact();
+            }
+            buffer.flip();
+            while (buffer.hasRemaining()) {
+                outputChannel.write(buffer);
+            }
+        } finally {
+            if (inputChannel != null) {
+                try {
+                    inputChannel.close();
+                } catch (IOException e) {
+                    Log.w(LOG_TAG, "Failed to close inputChannel.");
+                }
+            }
+            if (outputChannel != null) {
+                try {
+                    outputChannel.close();
+                } catch(IOException e) {
+                    Log.w(LOG_TAG, "Failed to close outputChannel");
+                }
+            }
+        }
+        return destUri;
+    }
+
+    @Override
+    public void setUp() {
+        mImportProcessor = new ImportProcessor(getContext());
+        mImportProcessor.ensureInit();
+        mCopiedFileName = null;
+    }
+
+    @Override
+    public void tearDown() {
+        if (!TextUtils.isEmpty(mCopiedFileName)) {
+            getContext().deleteFile(mCopiedFileName);
+            mCopiedFileName = null;
+        }
+    }
+
+    /**
+     * Confirms {@link ImportProcessor#readOneVCard(android.net.Uri, int, String,
+     * com.android.vcard.VCardInterpreter, int[])} successfully handles correct input.
+     */
+    public void testProcessSimple() throws IOException {
+        final Uri uri = copyToLocal("v21_simple.vcf");
+        final int vcardType = VCardSourceDetector.PARSE_TYPE_UNKNOWN;
+        final String charset = null;
+        final VCardInterpreter interpreter = new EmptyVCardInterpreter();
+        final int[] versions = new int[] {
+                ImportVCardActivity.VCARD_VERSION_V21
+        };
+
+        assertTrue(mImportProcessor.readOneVCard(
+                uri, vcardType, charset, interpreter, versions));
+    }
+
+    /**
+     * Confirms {@link ImportProcessor#handleOneRequest(ImportRequest)} accepts
+     * one request and import it.
+     */
+    public void testHandleOneRequestSimple() throws IOException {
+        CommitterGenerator generator = new CommitterGenerator() {
+            public VCardEntryCommitter generate(ContentResolver resolver) {
+                return new MockVCardEntryCommitter();
+            }
+        };
+        mImportProcessor.injectCommitterGeneratorForTest(generator);
+        mImportProcessor.initNotifierForTest();
+
+        final ImportRequest request = new ImportRequest(
+                null,  // account
+                copyToLocal("v30_simple.vcf"),
+                VCardSourceDetector.PARSE_TYPE_UNKNOWN,
+                null,  // estimatedCharset
+                ImportVCardActivity.VCARD_VERSION_AUTO_DETECT,
+                1);
+        assertTrue(mImportProcessor.handleOneRequest(request));
+        assertEquals(1, mImportProcessor.getCreatedUrisForTest().size());
+    }
+}
+
+/* package */ class EmptyVCardInterpreter implements VCardInterpreter {
+    @Override
+    public void end() {
+    }
+    @Override
+    public void endEntry() {
+    }
+    @Override
+    public void endProperty() {
+    }
+    @Override
+    public void propertyGroup(String group) {
+    }
+    @Override
+    public void propertyName(String name) {
+    }
+    @Override
+    public void propertyParamType(String type) {
+    }
+    @Override
+    public void propertyParamValue(String value) {
+    }
+    @Override
+    public void propertyValues(List<String> values) {
+    }
+    @Override
+    public void start() {
+    }
+    @Override
+    public void startEntry() {
+    }
+    @Override
+    public void startProperty() {
+    }
+}
diff --git a/tests/src/com/android/contacts/vcard/MockVCardEntryCommitter.java b/tests/src/com/android/contacts/vcard/MockVCardEntryCommitter.java
new file mode 100644
index 0000000..4765b38
--- /dev/null
+++ b/tests/src/com/android/contacts/vcard/MockVCardEntryCommitter.java
@@ -0,0 +1,56 @@
+/*
+ * 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.vcard;
+
+import android.net.Uri;
+
+import com.android.vcard.VCardEntry;
+import com.android.vcard.VCardEntryCommitter;
+
+import java.util.ArrayList;
+
+public class MockVCardEntryCommitter extends VCardEntryCommitter {
+
+    private final ArrayList<Uri> mUris = new ArrayList<Uri>(); 
+
+    public MockVCardEntryCommitter() {
+        super(null);
+    }
+
+    /**
+     * Exists for forcing super class to do nothing.
+     */
+    @Override
+    public void onStart() {
+    }
+
+    /**
+     * Exists for forcing super class to do nothing.
+     */
+    @Override
+    public void onEnd() {
+    }
+
+    @Override
+    public void onEntryCreated(final VCardEntry vcardEntry) {
+        mUris.add(null);
+    }
+
+    @Override
+    public ArrayList<Uri> getCreatedUris() {
+        return mUris;
+    }
+}
\ No newline at end of file
diff --git a/tests/src/com/android/contacts/widget/CompositeListAdapterTest.java b/tests/src/com/android/contacts/widget/CompositeListAdapterTest.java
new file mode 100644
index 0000000..87d268b
--- /dev/null
+++ b/tests/src/com/android/contacts/widget/CompositeListAdapterTest.java
@@ -0,0 +1,324 @@
+/*
+ * 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.widget;
+
+import com.google.android.collect.Lists;
+
+import android.content.Context;
+import android.database.DataSetObserver;
+import android.test.AndroidTestCase;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+
+/**
+ * Tests for {@link CompositeListAdapter}.
+ */
+public class CompositeListAdapterTest extends AndroidTestCase {
+
+    private final class MockAdapter extends ArrayAdapter<String> {
+        boolean allItemsEnabled = true;
+        HashSet<Integer> enabledItems = new HashSet<Integer>();
+        int viewTypeCount = 1;
+        HashMap<Integer, Integer> viewTypes = new HashMap<Integer, Integer>();
+
+        private MockAdapter(Context context, List<String> objects) {
+            super(context, android.R.layout.simple_list_item_1, objects);
+            for (int i = 0; i < objects.size(); i++) {
+                viewTypes.put(i, 0);
+            }
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            return new MockView(getContext(), position);
+        }
+
+        @Override
+        public boolean areAllItemsEnabled() {
+            return allItemsEnabled;
+        }
+
+        @Override
+        public boolean isEnabled(int position) {
+            return enabledItems.contains(position);
+        }
+
+        @Override
+        public int getViewTypeCount() {
+            return viewTypeCount;
+        }
+
+        @Override
+        public int getItemViewType(int position) {
+            return viewTypes.get(position);
+        }
+    }
+
+    private final class MockView extends View {
+        public MockView(Context context, int position) {
+            super(context);
+            setTag(position);
+        }
+    }
+
+    private final class TestDataSetObserver extends DataSetObserver {
+
+        public int changeCount;
+        public int invalidationCount;
+
+        @Override
+        public void onChanged() {
+            changeCount++;
+        }
+
+        @Override
+        public void onInvalidated() {
+            invalidationCount++;
+        }
+    }
+
+    private MockAdapter mAdapter1;
+    private MockAdapter mAdapter2;
+    private MockAdapter mAdapter3;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        mAdapter1 = new MockAdapter(getContext(), Lists.newArrayList("A", "B"));
+        mAdapter2 = new MockAdapter(getContext(), new ArrayList<String>());
+        mAdapter3 = new MockAdapter(getContext(), Lists.newArrayList("C", "D", "E"));
+    }
+
+    public void testGetCount() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        assertEquals(5, adapter.getCount());
+    }
+
+    public void testGetCountWithInvalidation() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        assertEquals(0, adapter.getCount());
+
+        adapter.addAdapter(mAdapter1);
+        assertEquals(2, adapter.getCount());
+
+        adapter.addAdapter(mAdapter2);
+        assertEquals(2, adapter.getCount());
+
+        adapter.addAdapter(mAdapter3);
+        assertEquals(5, adapter.getCount());
+    }
+
+    public void testGetItem() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        assertEquals("A", adapter.getItem(0));
+        assertEquals("B", adapter.getItem(1));
+        assertEquals("C", adapter.getItem(2));
+        assertEquals("D", adapter.getItem(3));
+        assertEquals("E", adapter.getItem(4));
+    }
+
+    public void testGetItemId() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        assertEquals(0, adapter.getItemId(0));
+        assertEquals(1, adapter.getItemId(1));
+        assertEquals(0, adapter.getItemId(2));
+        assertEquals(1, adapter.getItemId(3));
+        assertEquals(2, adapter.getItemId(4));
+    }
+
+    public void testGetView() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        assertEquals(0, adapter.getView(0, null, null).getTag());
+        assertEquals(1, adapter.getView(1, null, null).getTag());
+        assertEquals(0, adapter.getView(2, null, null).getTag());
+        assertEquals(1, adapter.getView(3, null, null).getTag());
+        assertEquals(2, adapter.getView(4, null, null).getTag());
+    }
+
+    public void testGetViewTypeCount() {
+        mAdapter1.viewTypeCount = 2;
+        mAdapter2.viewTypeCount = 3;
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        // Note that mAdapter2 adds an implicit +1
+        assertEquals(6, adapter.getViewTypeCount());
+    }
+
+    public void testGetItemViewType() {
+        mAdapter1.viewTypeCount = 2;
+        mAdapter1.viewTypes.put(0, 1);
+        mAdapter1.viewTypes.put(1, 0);
+
+        mAdapter3.viewTypeCount = 3;
+        mAdapter3.viewTypes.put(0, 1);
+        mAdapter3.viewTypes.put(1, 2);
+        mAdapter3.viewTypes.put(2, 0);
+
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        assertEquals(1, adapter.getItemViewType(0));
+        assertEquals(0, adapter.getItemViewType(1));
+
+        // Note: mAdapter2 throws in a +1
+
+        assertEquals(4, adapter.getItemViewType(2));
+        assertEquals(5, adapter.getItemViewType(3));
+        assertEquals(3, adapter.getItemViewType(4));
+    }
+
+    public void testNotifyDataSetChangedPropagated() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+
+        TestDataSetObserver observer = new TestDataSetObserver();
+        adapter.registerDataSetObserver(observer);
+        mAdapter1.add("X");
+
+        assertEquals(1, observer.changeCount);
+        assertEquals(0, observer.invalidationCount);
+        assertEquals(3, adapter.getCount());
+        assertEquals("A", adapter.getItem(0));
+        assertEquals("B", adapter.getItem(1));
+        assertEquals("X", adapter.getItem(2));
+
+        mAdapter2.add("Y");
+        assertEquals(2, observer.changeCount);
+        assertEquals(0, observer.invalidationCount);
+        assertEquals(4, adapter.getCount());
+        assertEquals("A", adapter.getItem(0));
+        assertEquals("B", adapter.getItem(1));
+        assertEquals("X", adapter.getItem(2));
+        assertEquals("Y", adapter.getItem(3));
+
+    }
+
+    public void testNotifyDataSetChangedOnAddingAdapter() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+
+        TestDataSetObserver observer = new TestDataSetObserver();
+        adapter.registerDataSetObserver(observer);
+        adapter.addAdapter(mAdapter3);
+
+        assertEquals(1, observer.changeCount);
+        assertEquals(0, observer.invalidationCount);
+        assertEquals(5, adapter.getCount());
+        assertEquals("A", adapter.getItem(0));
+        assertEquals("B", adapter.getItem(1));
+        assertEquals("C", adapter.getItem(2));
+        assertEquals("D", adapter.getItem(3));
+        assertEquals("E", adapter.getItem(4));
+    }
+
+    public void testNotifyDataSetInvalidated() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+
+        TestDataSetObserver observer = new TestDataSetObserver();
+        adapter.registerDataSetObserver(observer);
+
+        mAdapter1.remove("A");
+        assertEquals(1, observer.changeCount);
+        assertEquals(0, observer.invalidationCount);
+        assertEquals(1, adapter.getCount());
+
+        mAdapter1.remove("B");
+        assertEquals(1, observer.changeCount);
+        assertEquals(1, observer.invalidationCount);
+        assertEquals(0, adapter.getCount());
+    }
+
+    public void testAreAllItemsEnabled() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter3);
+
+        assertTrue(adapter.areAllItemsEnabled());
+    }
+
+    public void testAreAllItemsEnabledWithInvalidation() {
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        assertTrue(adapter.areAllItemsEnabled());
+
+        mAdapter3.allItemsEnabled = false;
+        adapter.addAdapter(mAdapter3);
+
+        assertFalse(adapter.areAllItemsEnabled());
+    }
+
+    public void testIsEnabled() {
+        mAdapter1.allItemsEnabled = false;
+        mAdapter1.enabledItems.add(1);
+
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter2);
+        adapter.addAdapter(mAdapter3);
+
+        assertFalse(adapter.isEnabled(0));
+        assertTrue(adapter.isEnabled(1));
+        assertTrue(adapter.isEnabled(2));
+        assertTrue(adapter.isEnabled(3));
+        assertTrue(adapter.isEnabled(4));
+    }
+
+    public void testIsEnabledWhenAllEnabledAtLeastOneAdapter() {
+        mAdapter1.allItemsEnabled = false;
+        mAdapter1.enabledItems.add(1);
+        mAdapter3.allItemsEnabled = false;
+        mAdapter3.enabledItems.add(1);
+
+        CompositeListAdapter adapter = new CompositeListAdapter();
+        adapter.addAdapter(mAdapter1);
+        adapter.addAdapter(mAdapter3);
+
+        assertFalse(adapter.isEnabled(0));
+        assertTrue(adapter.isEnabled(1));
+        assertFalse(adapter.isEnabled(2));
+        assertTrue(adapter.isEnabled(3));
+        assertFalse(adapter.isEnabled(4));
+    }
+}
diff --git a/tests/src/com/android/contacts/widget/TestLoaderManager.java b/tests/src/com/android/contacts/widget/TestLoaderManager.java
new file mode 100644
index 0000000..e964024
--- /dev/null
+++ b/tests/src/com/android/contacts/widget/TestLoaderManager.java
@@ -0,0 +1,99 @@
+/*
+ * 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.widget;
+
+import android.app.LoaderManager;
+import android.content.AsyncTaskLoader;
+import android.content.Loader;
+import android.content.Loader.OnLoadCompleteListener;
+import android.os.Bundle;
+
+import java.util.LinkedHashMap;
+
+import junit.framework.Assert;
+
+/**
+ * A {@link LoaderManager} that performs synchronous loading on demand for unit
+ * testing.
+ */
+public class TestLoaderManager implements LoaderManager {
+
+    // Using a linked hash map to get all loading done in a predictable order.
+    private LinkedHashMap<Integer, Loader<?>> mStartedLoaders = new LinkedHashMap<
+            Integer, Loader<?>>();
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public <D> Loader<D> getLoader(int id) {
+        return (Loader<D>)mStartedLoaders.get(id);
+    }
+
+    @Override
+    public <D> Loader<D> initLoader(int id, Bundle args, final LoaderCallbacks<D> callbacks) {
+        Loader<D> loader = callbacks.onCreateLoader(id, args);
+        loader.registerListener(id, new OnLoadCompleteListener<D>() {
+            @Override
+            public void onLoadComplete(Loader<D> loader, D data) {
+                callbacks.onLoadFinished(loader, data);
+            }
+        });
+
+        mStartedLoaders.put(id, loader);
+        return loader;
+    }
+
+    @Override
+    public <D> Loader<D> restartLoader(int id, Bundle args, LoaderCallbacks<D> callbacks) {
+        return initLoader(id, args, callbacks);
+    }
+
+    @Override
+    public void stopLoader(int id) {
+        mStartedLoaders.get(id).stopLoading();
+    }
+
+    /**
+     * Synchronously runs all started loaders.
+     */
+    public void executeLoaders() {
+        for (Loader<?> loader : mStartedLoaders.values()) {
+            executeLoader(loader);
+        }
+    }
+
+    /**
+     * Synchronously runs the specified loader.
+     */
+    public void executeLoader(int id) {
+        Loader<?> loader = mStartedLoaders.get(id);
+        if (loader == null) {
+            Assert.fail("Loader not started: " + id);
+        }
+        executeLoader(loader);
+    }
+
+    @SuppressWarnings("unchecked")
+    private <D> void executeLoader(final Loader<D> loader) {
+        if (loader instanceof AsyncTaskLoader) {
+            AsyncTaskLoader<D> atLoader = (AsyncTaskLoader<D>)loader;
+            D data = atLoader.loadInBackground();
+            loader.deliverResult(data);
+        } else {
+            loader.forceLoad();
+        }
+    }
+}
