am 085c288f: Merge change 6819 into donut
Merge commit '085c288f87389fd08295a941e568a56fd2f11a00'
* commit '085c288f87389fd08295a941e568a56fd2f11a00':
Use correct photo when building direct-dial shortcuts.
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index 712a794..922131b 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -1165,7 +1165,9 @@
Uri phoneUri = Uri.fromParts(scheme, number, null);
shortcutIntent = new Intent(mShortcutAction, phoneUri);
- Uri personUri = ContentUris.withAppendedId(People.CONTENT_URI, id);
+ // Find the People._ID for this phone number
+ final long personId = c.getLong(PHONES_PERSON_ID_INDEX);
+ Uri personUri = ContentUris.withAppendedId(People.CONTENT_URI, personId);
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON,
generatePhoneNumberIcon(personUri, type, resid));