Fix photo picture uri
This commit is contained in:
parent
5b4ab4bc6c
commit
d1ec261f35
1 changed files with 3 additions and 2 deletions
|
@ -239,7 +239,7 @@ public class ApiFivePlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static InputStream getContactPictureInputStream(ContentResolver cr, String id) {
|
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);
|
return Contacts.openContactPhotoInputStream(cr, person);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,8 @@ public class ApiFivePlus {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Uri getContactPictureUri(String id) {
|
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) {
|
public static Uri findUriPictureOfContactAndSetDisplayName(LinphoneAddress address, ContentResolver cr) {
|
||||||
|
|
Loading…
Reference in a new issue