Rabbit-R1/original r1/java/sources/androidx/media3/common/util/BitmapLoader.java

24 lines
725 B
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package androidx.media3.common.util;
import android.graphics.Bitmap;
import android.net.Uri;
import androidx.media3.common.MediaMetadata;
import com.google.common.util.concurrent.ListenableFuture;
/* loaded from: classes2.dex */
public interface BitmapLoader {
ListenableFuture<Bitmap> decodeBitmap(byte[] bArr);
ListenableFuture<Bitmap> loadBitmap(Uri uri);
default ListenableFuture<Bitmap> loadBitmapFromMetadata(MediaMetadata mediaMetadata) {
if (mediaMetadata.artworkData != null) {
return decodeBitmap(mediaMetadata.artworkData);
}
if (mediaMetadata.artworkUri != null) {
return loadBitmap(mediaMetadata.artworkUri);
}
return null;
}
}