Fix photo picture uri

This commit is contained in:
Margaux Clerc 2015-04-17 17:34:02 +02:00
parent 5b4ab4bc6c
commit d1ec261f35

View file

@ -239,7 +239,7 @@ public class ApiFivePlus {
}
public static InputStream getContactPictureInputStream(ContentResolver cr, String id) {
Uri person = getContactPictureUri(id);
Uri person = ContentUris.withAppendedId(Contacts.CONTENT_URI, Long.parseLong(id));
return Contacts.openContactPhotoInputStream(cr, person);
}
@ -248,7 +248,8 @@ public class ApiFivePlus {
}
private static Uri getContactPictureUri(String id) {
return ContentUris.withAppendedId(Contacts.CONTENT_URI, Long.parseLong(id));
Uri person = ContentUris.withAppendedId(Contacts.CONTENT_URI, Long.parseLong(id));
return Uri.withAppendedPath(person, Contacts.Photo.DISPLAY_PHOTO);
}
public static Uri findUriPictureOfContactAndSetDisplayName(LinphoneAddress address, ContentResolver cr) {