Merge change 25432 into eclair

* changes:
  Finish up using Contract phone types for EAS.
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index a1ffff4..e39a7fc 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -432,7 +432,10 @@
                 mMode = MODE_PICK_POSTAL;
             } else if (ContactMethods.CONTENT_POSTAL_TYPE.equals(type)) {
                 mMode = MODE_LEGACY_PICK_POSTAL;
+            }  else if (People.CONTENT_ITEM_TYPE.equals(type)) {
+                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)) {
@@ -1046,6 +1049,10 @@
             startActivity(intent);
             finish();
         } else if (id != -1) {
+            // Subtract one if we have Create Contact at the top
+            if ((mMode & MODE_MASK_CREATE_NEW) != 0) {
+                position--;
+            }
             final Uri uri = getSelectedUri(position);
             if ((mMode & MODE_MASK_PICKER) == 0) {
                 final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
@@ -1062,10 +1069,7 @@
                     || mMode == MODE_LEGACY_PICK_PERSON
                     || mMode == MODE_LEGACY_PICK_OR_CREATE_PERSON) {
                 if (mShortcutAction != null) {
-                    // Subtract one if we have Create Contact at the top
-                    Cursor c = (Cursor) mAdapter.getItem(position
-                            - (mMode == MODE_PICK_OR_CREATE_CONTACT
-                                    || mMode == MODE_LEGACY_PICK_OR_CREATE_PERSON ? 1:0));
+                    Cursor c = (Cursor) mAdapter.getItem(position);
                     returnPickerResult(c, c.getString(SUMMARY_NAME_COLUMN_INDEX), uri, id);
                 } else {
                     returnPickerResult(null, null, uri, id);
diff --git a/src/com/android/contacts/ViewContactActivity.java b/src/com/android/contacts/ViewContactActivity.java
index d2328ee..1e51cb9 100644
--- a/src/com/android/contacts/ViewContactActivity.java
+++ b/src/com/android/contacts/ViewContactActivity.java
@@ -441,7 +441,7 @@
         mHandler.startQueryEntities(TOKEN_QUERY, null,
                 RawContacts.CONTENT_URI, RawContacts.CONTACT_ID + "=" + contactId, null, null);
 
-        mContactHeaderWidget.bindFromContactId(ContentUris.parseId(mUri));
+        mContactHeaderWidget.bindFromContactLookupUri(mLookupUri);
     }
 
     private void closeCursor() {