Merge "Update people widget visual style" into ics-factoryrom
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/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-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/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/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;