public class DefaultPhotoManager extends Object implements PhotoManager
PhotoManager
that
queries for photo bytes by using the RecipientEntry
's
photoThumbnailUri.PhotoManager.PhotoManagerCallback
PHOTO_CACHE_SIZE
Constructor and Description |
---|
DefaultPhotoManager(ContentResolver contentResolver) |
Modifier and Type | Method and Description |
---|---|
void |
populatePhotoBytesAsync(RecipientEntry entry,
PhotoManager.PhotoManagerCallback callback)
Sets the
RecipientEntry 's photo bytes. |
public DefaultPhotoManager(ContentResolver contentResolver)
public void populatePhotoBytesAsync(RecipientEntry entry, PhotoManager.PhotoManagerCallback callback)
PhotoManager
RecipientEntry
's photo bytes. If the photo bytes
are cached, this action happens immediately. Otherwise, the work to fetch the photo
bytes is performed asynchronously before setting the value on the UI thread.
If the photo bytes were fetched asynchronously,
PhotoManager.PhotoManagerCallback.onPhotoBytesAsynchronouslyPopulated()
is called. This
method is not called if the photo bytes have been cached previously (because no
asynchronous work was performed). In that case,
PhotoManager.PhotoManagerCallback.onPhotoBytesPopulated()
is called.populatePhotoBytesAsync
in interface PhotoManager