|
|
@ -133,9 +133,10 @@ public class RecipientProvider {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (cursor != null && cursor.moveToFirst()) {
|
|
|
|
if (cursor != null && cursor.moveToFirst()) {
|
|
|
|
Uri contactUri = Contacts.getLookupUri(cursor.getLong(2), cursor.getString(1));
|
|
|
|
Uri contactUri = Contacts.getLookupUri(cursor.getLong(2), cursor.getString(1));
|
|
|
|
|
|
|
|
String name = cursor.getString(3).equals(cursor.getString(0)) ? null : cursor.getString(0);
|
|
|
|
Drawable contactPhoto = ContactPhotoFactory.getContactPhoto(context,
|
|
|
|
Drawable contactPhoto = ContactPhotoFactory.getContactPhoto(context,
|
|
|
|
Uri.withAppendedPath(Contacts.CONTENT_URI, cursor.getLong(2) + ""),
|
|
|
|
Uri.withAppendedPath(Contacts.CONTENT_URI, cursor.getLong(2) + ""),
|
|
|
|
cursor.getString(0));
|
|
|
|
name);
|
|
|
|
return new RecipientDetails(cursor.getString(0), cursor.getString(3), contactUri, contactPhoto);
|
|
|
|
return new RecipientDetails(cursor.getString(0), cursor.getString(3), contactUri, contactPhoto);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|