Mark DefaultImageDecoder.BitmapDecoder
as @VisibleForTesting
It seems likely we will define a new "image decoder" interface that returns `ListenableFuture<Bitmap>`, and naming that will be hard/annoying if we need to keep this interface working too. It's also not really clear what a non-test implementation of this interface would be expected to do, since `DefaultImageDecoder` is documented to always decode using `BitmapFactory`. #minor-release PiperOrigin-RevId: 569206325
This commit is contained in:
parent
6d77838a6b
commit
d50f662b10
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package androidx.media3.exoplayer.image;
|
package androidx.media3.exoplayer.image;
|
||||||
|
|
||||||
|
import static androidx.annotation.VisibleForTesting.PRIVATE;
|
||||||
import static androidx.media3.common.util.Assertions.checkArgument;
|
import static androidx.media3.common.util.Assertions.checkArgument;
|
||||||
import static androidx.media3.common.util.Assertions.checkNotNull;
|
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||||
import static androidx.media3.common.util.Assertions.checkState;
|
import static androidx.media3.common.util.Assertions.checkState;
|
||||||
@ -24,6 +25,7 @@ import android.graphics.Bitmap;
|
|||||||
import android.graphics.BitmapFactory;
|
import android.graphics.BitmapFactory;
|
||||||
import android.graphics.Matrix;
|
import android.graphics.Matrix;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.annotation.VisibleForTesting;
|
||||||
import androidx.exifinterface.media.ExifInterface;
|
import androidx.exifinterface.media.ExifInterface;
|
||||||
import androidx.media3.common.C;
|
import androidx.media3.common.C;
|
||||||
import androidx.media3.common.Format;
|
import androidx.media3.common.Format;
|
||||||
@ -51,6 +53,7 @@ public final class DefaultImageDecoder
|
|||||||
implements ImageDecoder {
|
implements ImageDecoder {
|
||||||
|
|
||||||
/** A functional interface for turning byte arrays into bitmaps. */
|
/** A functional interface for turning byte arrays into bitmaps. */
|
||||||
|
@VisibleForTesting(otherwise = PRIVATE)
|
||||||
public interface BitmapDecoder {
|
public interface BitmapDecoder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user