Set type to url for returned photos

This commit is contained in:
macdonst 2011-01-29 04:18:05 +08:00
parent 64310dc85c
commit 7ebf8130e4

View File

@ -678,6 +678,7 @@ public class ContactAccessorSdk5 extends ContactAccessor {
try {
photo.put("id", cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Photo._ID)));
photo.put("pref", false);
photo.put("type", "url");
Uri person = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, (new Long(contactId)));
Uri photoUri = Uri.withAppendedPath(person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);
photo.put("value", photoUri.toString());