Merge "Organization field should receive focus after selecting "Add organization""
diff --git a/res/drawable-hdpi/dial_background_texture.png b/res/drawable-hdpi/dial_background_texture.png
index 9df3b1e..95bec9f 100644
--- a/res/drawable-hdpi/dial_background_texture.png
+++ b/res/drawable-hdpi/dial_background_texture.png
Binary files differ
diff --git a/res/drawable-hdpi/frame_thumbnail_contact_widget_focused_holo.png b/res/drawable-hdpi/frame_thumbnail_contact_widget_focused_holo.png
deleted file mode 100644
index 352d4d9..0000000
--- a/res/drawable-hdpi/frame_thumbnail_contact_widget_focused_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/frame_thumbnail_contact_widget_holo.png b/res/drawable-hdpi/frame_thumbnail_contact_widget_holo.png
deleted file mode 100644
index d4223e1..0000000
--- a/res/drawable-hdpi/frame_thumbnail_contact_widget_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/frame_thumbnail_contact_widget_normal_holo.png b/res/drawable-hdpi/frame_thumbnail_contact_widget_normal_holo.png
deleted file mode 100644
index 21566bc..0000000
--- a/res/drawable-hdpi/frame_thumbnail_contact_widget_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/frame_thumbnail_contact_widget_pressed_holo.png b/res/drawable-hdpi/frame_thumbnail_contact_widget_pressed_holo.png
deleted file mode 100644
index 5f0966f..0000000
--- a/res/drawable-hdpi/frame_thumbnail_contact_widget_pressed_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_contacts.png b/res/drawable-hdpi/ic_launcher_contacts.png
index 3e1ea44..f2657dc 100644
--- a/res/drawable-hdpi/ic_launcher_contacts.png
+++ b/res/drawable-hdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_phone.png b/res/drawable-hdpi/ic_launcher_phone.png
index 0943ce5..37ffb9c 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_launcher_shortcut_contact.png b/res/drawable-hdpi/ic_launcher_shortcut_contact.png
index d86b264..2dc1014 100644
--- a/res/drawable-hdpi/ic_launcher_shortcut_contact.png
+++ b/res/drawable-hdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_shortcut_directdial.png b/res/drawable-hdpi/ic_launcher_shortcut_directdial.png
index e7ff8f8..b5c0dd9 100644
--- a/res/drawable-hdpi/ic_launcher_shortcut_directdial.png
+++ b/res/drawable-hdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png
index 5170a75..10720e4 100644
--- a/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png
+++ b/res/drawable-hdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/drawable-mdpi/dial_background_texture.png b/res/drawable-mdpi/dial_background_texture.png
index 90cd07c..a6d666c 100644
--- a/res/drawable-mdpi/dial_background_texture.png
+++ b/res/drawable-mdpi/dial_background_texture.png
Binary files differ
diff --git a/res/drawable-mdpi/frame_thumbnail_contact_widget_focused_holo.png b/res/drawable-mdpi/frame_thumbnail_contact_widget_focused_holo.png
deleted file mode 100644
index ce60a60..0000000
--- a/res/drawable-mdpi/frame_thumbnail_contact_widget_focused_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/frame_thumbnail_contact_widget_holo.png b/res/drawable-mdpi/frame_thumbnail_contact_widget_holo.png
deleted file mode 100644
index a62834c..0000000
--- a/res/drawable-mdpi/frame_thumbnail_contact_widget_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/frame_thumbnail_contact_widget_normal_holo.png b/res/drawable-mdpi/frame_thumbnail_contact_widget_normal_holo.png
deleted file mode 100644
index a62834c..0000000
--- a/res/drawable-mdpi/frame_thumbnail_contact_widget_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/frame_thumbnail_contact_widget_pressed_holo.png b/res/drawable-mdpi/frame_thumbnail_contact_widget_pressed_holo.png
deleted file mode 100644
index bba0d2c..0000000
--- a/res/drawable-mdpi/frame_thumbnail_contact_widget_pressed_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_contacts.png b/res/drawable-mdpi/ic_launcher_contacts.png
index 618630f..6b06cac 100644
--- a/res/drawable-mdpi/ic_launcher_contacts.png
+++ b/res/drawable-mdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_phone.png b/res/drawable-mdpi/ic_launcher_phone.png
index 724f94a..5ef8c40 100644
--- a/res/drawable-mdpi/ic_launcher_phone.png
+++ b/res/drawable-mdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_shortcut_contact.png b/res/drawable-mdpi/ic_launcher_shortcut_contact.png
index 20d359d..bce245c 100644
--- a/res/drawable-mdpi/ic_launcher_shortcut_contact.png
+++ b/res/drawable-mdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_shortcut_directdial.png b/res/drawable-mdpi/ic_launcher_shortcut_directdial.png
index 7081c08..e4649cf 100644
--- a/res/drawable-mdpi/ic_launcher_shortcut_directdial.png
+++ b/res/drawable-mdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png
index 374c7c4..4be34e5 100644
--- a/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png
+++ b/res/drawable-mdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/drawable-nodpi/background_dial_holo_dark.png b/res/drawable-nodpi/background_dial_holo_dark.png
new file mode 100644
index 0000000..3dba50c
--- /dev/null
+++ b/res/drawable-nodpi/background_dial_holo_dark.png
Binary files differ
diff --git a/res/drawable-xhdpi/dial_background_texture.png b/res/drawable-xhdpi/dial_background_texture.png
index 02aacc8..184049f 100644
--- a/res/drawable-xhdpi/dial_background_texture.png
+++ b/res/drawable-xhdpi/dial_background_texture.png
Binary files differ
diff --git a/res/drawable-xhdpi/frame_thumbnail_contact_widget_focused_holo.png b/res/drawable-xhdpi/frame_thumbnail_contact_widget_focused_holo.png
deleted file mode 100644
index 157ef56..0000000
--- a/res/drawable-xhdpi/frame_thumbnail_contact_widget_focused_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/frame_thumbnail_contact_widget_holo.png b/res/drawable-xhdpi/frame_thumbnail_contact_widget_holo.png
deleted file mode 100644
index 7719710..0000000
--- a/res/drawable-xhdpi/frame_thumbnail_contact_widget_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/frame_thumbnail_contact_widget_pressed_holo.png b/res/drawable-xhdpi/frame_thumbnail_contact_widget_pressed_holo.png
deleted file mode 100644
index 8c5008b..0000000
--- a/res/drawable-xhdpi/frame_thumbnail_contact_widget_pressed_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_contacts.png b/res/drawable-xhdpi/ic_launcher_contacts.png
index 1bb0a3f..a2ba3bc 100644
--- a/res/drawable-xhdpi/ic_launcher_contacts.png
+++ b/res/drawable-xhdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_phone.png b/res/drawable-xhdpi/ic_launcher_phone.png
index 6a454da..2226b7b 100644
--- a/res/drawable-xhdpi/ic_launcher_phone.png
+++ b/res/drawable-xhdpi/ic_launcher_phone.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_contact.png b/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
index 94c7da5..a5a71fa 100644
--- a/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png b/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
index 42f8f0a..b839084 100644
--- a/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png b/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
index babcc02..35e1467 100644
--- a/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
+++ b/res/drawable-xhdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/drawable/frame_thumbnail_contact_widget_holo.xml b/res/drawable/frame_thumbnail_contact_widget_holo.xml
index 1858f9d..2da03da 100644
--- a/res/drawable/frame_thumbnail_contact_widget_holo.xml
+++ b/res/drawable/frame_thumbnail_contact_widget_holo.xml
@@ -16,9 +16,7 @@
 
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_pressed="true"
-        android:drawable="@drawable/frame_thumbnail_contact_widget_pressed_holo" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/frame_thumbnail_contact_widget_focused_holo" />
+        android:drawable="@*android:drawable/quickcontact_badge_overlay_pressed_light" />
     <item
-        android:drawable="@drawable/frame_thumbnail_contact_widget_normal_holo" />
+        android:drawable="@*android:drawable/quickcontact_badge_overlay_normal_light" />
 </selector>
diff --git a/res/layout/dialpad_additional_buttons.xml b/res/layout/dialpad_additional_buttons.xml
index ae37fd5..2d42ad0 100644
--- a/res/layout/dialpad_additional_buttons.xml
+++ b/res/layout/dialpad_additional_buttons.xml
@@ -21,7 +21,6 @@
     android:layout_height="0px"
     android:layout_weight="0.150"
     android:layout_gravity="center_horizontal"
-    android:layout_marginTop="@dimen/dialpad_vertical_margin"
     android:background="@drawable/dialpad_background"
     android:orientation="horizontal">
 
@@ -37,6 +36,12 @@
         android:contentDescription="@string/description_search_button"
         android:src="@drawable/ic_see_contacts_holo_dark"/>
 
+    <View
+        android:layout_width="1dip"
+        android:layout_height="24dip"
+        android:layout_gravity="center_vertical"
+        android:background="?android:attr/dividerVertical" />
+
     <!-- Onscreen "Dial" button, diused on all platforms by
          default. Its usage can be disabled using resources (see
          config.xml.) -->
@@ -50,6 +55,12 @@
         android:contentDescription="@string/description_dial_button"
         android:src="@drawable/ic_dial_action_call" />
 
+    <View
+        android:layout_width="1dip"
+        android:layout_height="24dip"
+        android:layout_gravity="center_vertical"
+        android:background="?android:attr/dividerVertical" />
+
     <!-- Onscreen "Backspace/Delete" button -->
     <ImageButton android:id="@+id/deleteButton"
         android:layout_width="0px"
diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml
index 96cf543..ed16caf 100644
--- a/res/layout/dialpad_fragment.xml
+++ b/res/layout/dialpad_fragment.xml
@@ -59,6 +59,11 @@
     <!-- Keypad section -->
     <include layout="@layout/dialpad" />
 
+    <View
+       android:layout_width="match_parent"
+       android:layout_height="@dimen/dialpad_vertical_margin"
+       android:background="#66000000"/>
+
     <!-- Horizontal row of buttons (Search + DialButton + Delete.) -->
     <include layout="@layout/dialpad_additional_buttons" />
 
diff --git a/res/layout/dialtacts_activity.xml b/res/layout/dialtacts_activity.xml
index 6484d87..af85bba 100644
--- a/res/layout/dialtacts_activity.xml
+++ b/res/layout/dialtacts_activity.xml
@@ -19,7 +19,7 @@
     android:layout_height="match_parent"
     android:layout_marginTop="?android:attr/actionBarSize">
 
-    <android.support.v4.view.ViewPager
+    <com.android.contacts.activities.DialtactsViewPager
         android:id="@+id/pager"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
diff --git a/res/layout/social_widget.xml b/res/layout/social_widget.xml
index e9847f9..3668e8d 100644
--- a/res/layout/social_widget.xml
+++ b/res/layout/social_widget.xml
@@ -17,23 +17,19 @@
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="96dip"
-    android:background="#00000000"
-    android:paddingTop="1dip"
-    android:paddingBottom="20dip">
+    android:layout_height="match_parent"
+    android:background="#00000000">
     <LinearLayout
         android:id="@+id/widget_container"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
         <FrameLayout
-            android:layout_width="70dip"
-            android:layout_height="70dip"
-            android:layout_marginTop="1dip"
-            android:layout_marginLeft="13dip">
+            android:layout_width="70dp"
+            android:layout_height="70dp"
+            android:layout_gravity="center_vertical">
             <ImageView
                 android:id="@+id/image"
-                android:padding="4dip"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent" />
             <ImageButton
@@ -44,19 +40,14 @@
         </FrameLayout>
         <RelativeLayout
             android:id="@+id/name_and_snippet_container"
-            android:layout_width="0dip"
+            android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:background="@drawable/bg_status_contact_widget"
-            android:layout_marginTop="@dimen/widget_snippet_top_margin"
-            android:layout_marginRight="16dip"
-            android:layout_marginBottom="@dimen/widget_snippet_bottom_margin"
-            android:layout_marginLeft="0dip"
-            android:paddingLeft="47dip"
-            android:paddingRight="8dip"
-            android:paddingTop="@dimen/widget_snippet_top_padding"
-            android:paddingBottom="@dimen/widget_snippet_bottom_padding">
-
+            android:paddingTop="4dp"
+            android:paddingBottom="4dp"
+            android:paddingRight="4dp"
+            android:paddingLeft="43dp"
+            android:background="@drawable/bg_status_contact_widget">
             <TextView
                 android:id="@+id/name_and_snippet"
                 android:layout_width="match_parent"
@@ -67,7 +58,6 @@
                 android:lineSpacingExtra="2sp"
                 android:textColor="#FFFFFFFF"
                 android:textSize="@dimen/widget_text_size_snippet" />
-
             <TextView
                 android:id="@+id/name"
                 android:layout_width="match_parent"
@@ -77,4 +67,4 @@
                 android:textSize="@dimen/widget_text_size_name" />
         </RelativeLayout>
     </LinearLayout>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/res/mipmap-hdpi/ic_launcher_shortcut_contact.png b/res/mipmap-hdpi/ic_launcher_shortcut_contact.png
index d86b264..c867181 100644
--- a/res/mipmap-hdpi/ic_launcher_shortcut_contact.png
+++ b/res/mipmap-hdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_shortcut_directdial.png b/res/mipmap-hdpi/ic_launcher_shortcut_directdial.png
index e7ff8f8..c515815 100644
--- a/res/mipmap-hdpi/ic_launcher_shortcut_directdial.png
+++ b/res/mipmap-hdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_shortcut_directmessage.png b/res/mipmap-hdpi/ic_launcher_shortcut_directmessage.png
index 5170a75..a347fa1 100644
--- a/res/mipmap-hdpi/ic_launcher_shortcut_directmessage.png
+++ b/res/mipmap-hdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_shortcut_contact.png b/res/mipmap-mdpi/ic_launcher_shortcut_contact.png
index 20d359d..dd3c8ff 100644
--- a/res/mipmap-mdpi/ic_launcher_shortcut_contact.png
+++ b/res/mipmap-mdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_shortcut_directdial.png b/res/mipmap-mdpi/ic_launcher_shortcut_directdial.png
index 7081c08..1dfe8cc 100644
--- a/res/mipmap-mdpi/ic_launcher_shortcut_directdial.png
+++ b/res/mipmap-mdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_shortcut_directmessage.png b/res/mipmap-mdpi/ic_launcher_shortcut_directmessage.png
index 374c7c4..c7dc525 100644
--- a/res/mipmap-mdpi/ic_launcher_shortcut_directmessage.png
+++ b/res/mipmap-mdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png b/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png
index 94c7da5..baeb41f 100644
--- a/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_contact.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png b/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png
index 42f8f0a..39d039a 100644
--- a/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_directdial.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png b/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png
index babcc02..7dd5d39 100644
--- a/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png
+++ b/res/mipmap-xhdpi/ic_launcher_shortcut_directmessage.png
Binary files differ
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index defd229..5a94324 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -110,11 +110,6 @@
     <!-- Font size used for the social status in the widget -->
     <dimen name="widget_text_size_snippet">13sp</dimen>
 
-    <!-- Margins and padding for text in widget -->
-    <dimen name="widget_snippet_top_margin">4dip</dimen>
-    <dimen name="widget_snippet_bottom_margin">7dip</dimen>
-    <dimen name="widget_snippet_top_padding">3dip</dimen>
-    <dimen name="widget_snippet_bottom_padding">6dip</dimen>
 
     <!-- Size of the shortcut icon. 0dip means: use the system default -->
     <dimen name="shortcut_icon_size">0dip</dimen>
@@ -141,7 +136,7 @@
     <dimen name="group_detail_border_padding">32dip</dimen>
 
     <!-- Height of edit text in dialpad fragment -->
-    <dimen name="dialpad_horizontal_margin">4dip</dimen>
+    <dimen name="dialpad_horizontal_margin">0dip</dimen>
     <dimen name="dialpad_vertical_margin">2dip</dimen>
     <dimen name="dialpad_digits_text_size">35sp</dimen>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 0b47d5a..24822c0 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -20,7 +20,7 @@
         <item name="android:windowActionBarOverlay">true</item>
         <item name="android:actionBarStyle">@style/DialtactsActionBarStyle</item>
         <item name="android:windowContentOverlay">@null</item>
-        <item name="android:windowBackground">@android:color/black</item>
+        <item name="android:windowBackground">@drawable/background_dial_holo_dark</item>
         <item name="activated_background">@drawable/list_item_activated_background</item>
         <item name="section_header_background">@drawable/list_title_holo</item>
         <item name="list_section_header_height">32dip</item>
diff --git a/src/com/android/contacts/ContactsUtils.java b/src/com/android/contacts/ContactsUtils.java
index f1f73ed..4de62b6 100644
--- a/src/com/android/contacts/ContactsUtils.java
+++ b/src/com/android/contacts/ContactsUtils.java
@@ -102,8 +102,8 @@
      * considered equal for collapsing in the GUI. For caller-id, use
      * {@link PhoneNumberUtils#compare(Context, String, String)} instead
      */
-    public static final boolean shouldCollapse(Context context, CharSequence mimetype1,
-            CharSequence data1, CharSequence mimetype2, CharSequence data2) {
+    public static final boolean shouldCollapse(CharSequence mimetype1, CharSequence data1,
+            CharSequence mimetype2, CharSequence data2) {
         // different mimetypes? don't collapse
         if (!TextUtils.equals(mimetype1, mimetype2)) return false;
 
diff --git a/src/com/android/contacts/NfcHandler.java b/src/com/android/contacts/NfcHandler.java
index e3e94a9..ee3e002 100644
--- a/src/com/android/contacts/NfcHandler.java
+++ b/src/com/android/contacts/NfcHandler.java
@@ -26,6 +26,7 @@
 import android.nfc.NfcAdapter;
 import android.nfc.NfcEvent;
 import android.provider.ContactsContract.Contacts;
+import android.provider.ContactsContract.Profile;
 
 import android.util.Log;
 
@@ -43,9 +44,9 @@
   */
 public class NfcHandler implements NfcAdapter.CreateNdefMessageCallback {
 
-    static final String TAG = "ContactNfcHandler";
-
-    final ContactDetailFragment mContactFragment;
+    private static final String TAG = "ContactNfcHandler";
+    private static final String PROFILE_LOOKUP_KEY = "profile";
+    private final ContactDetailFragment mContactFragment;
 
     public static void register(Activity activity, ContactDetailFragment contactFragment) {
         NfcAdapter adapter = NfcAdapter.getDefaultAdapter(activity.getApplicationContext());
@@ -66,10 +67,19 @@
         ContentResolver resolver = mContactFragment.getActivity().getContentResolver();
         if (contactUri != null) {
             final String lookupKey = Uri.encode(contactUri.getPathSegments().get(2));
-            final Uri shareUri = Contacts.CONTENT_VCARD_URI.buildUpon().
-                    appendPath(lookupKey).
-                    appendQueryParameter(Contacts.QUERY_PARAMETER_VCARD_NO_PHOTO, "true").
-                    build();
+            final Uri shareUri;
+            // TODO find out where to get this constant from, or find another way
+            // of determining this.
+            if (lookupKey.equals(PROFILE_LOOKUP_KEY)) {
+                shareUri = Profile.CONTENT_VCARD_URI.buildUpon().
+                appendQueryParameter(Contacts.QUERY_PARAMETER_VCARD_NO_PHOTO, "true").
+                build();
+            } else {
+                shareUri = Contacts.CONTENT_VCARD_URI.buildUpon().
+                appendPath(lookupKey).
+                appendQueryParameter(Contacts.QUERY_PARAMETER_VCARD_NO_PHOTO, "true").
+                build();
+            }
             ByteArrayOutputStream ndefBytes = new ByteArrayOutputStream();
             byte[] buffer = new byte[1024];
             int r;
diff --git a/src/com/android/contacts/activities/DialtactsViewPager.java b/src/com/android/contacts/activities/DialtactsViewPager.java
new file mode 100644
index 0000000..fb869a9
--- /dev/null
+++ b/src/com/android/contacts/activities/DialtactsViewPager.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.contacts.activities;
+
+import android.content.Context;
+import android.support.v4.view.ViewPager;
+import android.util.AttributeSet;
+
+public class DialtactsViewPager extends ViewPager {
+    public DialtactsViewPager(Context context) {
+        super(context);
+    }
+
+    public DialtactsViewPager(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    /**
+     * ViewPager inherits ViewGroup's default behavior of delayed clicks
+     * on its children, but in order to make the dialpad more responsive we
+     * disable that here. The Call Log and Favorites tabs are both
+     * ListViews which delay their children anyway, as desired to prevent
+     * seeing pressed states flashing while scrolling lists
+     */
+    public boolean shouldDelayChildPressedState() {
+        return false;
+    }
+}
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index d2759dc..3430109 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -949,9 +949,7 @@
             }
 
             TabState tab = mActionBarAdapter.getCurrentTab();
-            if (tab == TabState.GROUPS) {
-                mGroupsFragment.setAddAccountsVisibility(!areAccountsAvailable());
-            }
+            showEmptyStateForTab(tab);
         }
 
         invalidateOptionsMenuIfNeeded();
diff --git a/src/com/android/contacts/detail/ContactDetailFragment.java b/src/com/android/contacts/detail/ContactDetailFragment.java
index 775b50a..e111620 100644
--- a/src/com/android/contacts/detail/ContactDetailFragment.java
+++ b/src/com/android/contacts/detail/ContactDetailFragment.java
@@ -1348,8 +1348,7 @@
                 return false;
             }
 
-            if (!ContactsUtils.shouldCollapse(context, mimetype, data, entry.mimetype,
-                    entry.data)) {
+            if (!ContactsUtils.shouldCollapse(mimetype, data, entry.mimetype, entry.data)) {
                 return false;
             }
 
diff --git a/src/com/android/contacts/interactions/PhoneNumberInteraction.java b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
index 918dac0..a42456c 100644
--- a/src/com/android/contacts/interactions/PhoneNumberInteraction.java
+++ b/src/com/android/contacts/interactions/PhoneNumberInteraction.java
@@ -19,6 +19,7 @@
 import com.android.contacts.Collapser;
 import com.android.contacts.Collapser.Collapsible;
 import com.android.contacts.ContactSaveService;
+import com.android.contacts.ContactsUtils;
 import com.android.contacts.R;
 import com.android.contacts.model.AccountType;
 import com.android.contacts.model.AccountType.StringInflater;
@@ -123,18 +124,8 @@
         }
 
         public boolean shouldCollapseWith(PhoneItem phoneItem) {
-            try {
-                PhoneNumberUtil util = PhoneNumberUtil.getInstance();
-                PhoneNumber phoneNumber1 = util.parse(phoneNumber, "ZZ" /* Unknown */);
-                PhoneNumber phoneNumber2 = util.parse(phoneItem.phoneNumber, "ZZ" /* Unknown */);
-                MatchType matchType = util.isNumberMatch(phoneNumber1, phoneNumber2);
-                if (matchType == MatchType.SHORT_NSN_MATCH) {
-                    return true;
-                }
-            } catch (NumberParseException e) {
-                return TextUtils.equals(phoneNumber, phoneItem.phoneNumber);
-            }
-            return false;
+            return ContactsUtils.shouldCollapse(Phone.CONTENT_ITEM_TYPE, phoneNumber,
+                    Phone.CONTENT_ITEM_TYPE, phoneItem.phoneNumber);
         }
 
         @Override
diff --git a/src/com/android/contacts/quickcontact/DataAction.java b/src/com/android/contacts/quickcontact/DataAction.java
index 2066997..13e824e 100644
--- a/src/com/android/contacts/quickcontact/DataAction.java
+++ b/src/com/android/contacts/quickcontact/DataAction.java
@@ -294,8 +294,7 @@
             return false;
         }
         DataAction that = (DataAction)t;
-        if (!ContactsUtils.shouldCollapse(mContext, mMimeType, mBody, that.mMimeType,
-                that.mBody)) {
+        if (!ContactsUtils.shouldCollapse(mMimeType, mBody, that.mMimeType, that.mBody)) {
             return false;
         }
         if (!TextUtils.equals(mMimeType, that.mMimeType)
diff --git a/tests/src/com/android/contacts/ContactsUtilsTests.java b/tests/src/com/android/contacts/ContactsUtilsTests.java
index 97a2c8e..82d0cb0 100644
--- a/tests/src/com/android/contacts/ContactsUtilsTests.java
+++ b/tests/src/com/android/contacts/ContactsUtilsTests.java
@@ -160,9 +160,9 @@
     private void assertCollapses(String message, boolean expected, CharSequence mimetype1,
             CharSequence data1, CharSequence mimetype2, CharSequence data2) {
         assertEquals(message, expected,
-                ContactsUtils.shouldCollapse(mContext, mimetype1, data1, mimetype2, data2));
+                ContactsUtils.shouldCollapse(mimetype1, data1, mimetype2, data2));
         assertEquals(message, expected,
-                ContactsUtils.shouldCollapse(mContext, mimetype2, data2, mimetype1, data1));
+                ContactsUtils.shouldCollapse(mimetype2, data2, mimetype1, data1));
 
         if (data1 == data2 && data1 != null) {
             // make sure we also do a test where object equality is not given
@@ -173,10 +173,10 @@
 
             // we have two different instances, now make sure we get the same result as before
             assertEquals(message, expected,
-                    ContactsUtils.shouldCollapse(mContext, mimetype1, data1, mimetype2,
+                    ContactsUtils.shouldCollapse(mimetype1, data1, mimetype2,
                     data2_newref));
             assertEquals(message, expected,
-                    ContactsUtils.shouldCollapse(mContext, mimetype2, data2_newref, mimetype1,
+                    ContactsUtils.shouldCollapse(mimetype2, data2_newref, mimetype1,
                     data1));
         }
     }