mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-08 21:22:16 +00:00
@@ -240,6 +240,10 @@ public class MultiDeviceContactUpdateJob extends MasterSecretJob implements Inje
|
|||||||
Uri displayPhotoUri = Uri.withAppendedPath(uri, ContactsContract.Contacts.Photo.DISPLAY_PHOTO);
|
Uri displayPhotoUri = Uri.withAppendedPath(uri, ContactsContract.Contacts.Photo.DISPLAY_PHOTO);
|
||||||
AssetFileDescriptor fd = context.getContentResolver().openAssetFileDescriptor(displayPhotoUri, "r");
|
AssetFileDescriptor fd = context.getContentResolver().openAssetFileDescriptor(displayPhotoUri, "r");
|
||||||
|
|
||||||
|
if (fd == null) {
|
||||||
|
return Optional.absent();
|
||||||
|
}
|
||||||
|
|
||||||
return Optional.of(SignalServiceAttachment.newStreamBuilder()
|
return Optional.of(SignalServiceAttachment.newStreamBuilder()
|
||||||
.withStream(fd.createInputStream())
|
.withStream(fd.createInputStream())
|
||||||
.withContentType("image/*")
|
.withContentType("image/*")
|
||||||
|
|||||||
Reference in New Issue
Block a user