From eb9d9457b6b555f53a2c35701fc6661fcdf28e12 Mon Sep 17 00:00:00 2001 From: ibaker Date: Thu, 28 Sep 2023 09:30:57 -0700 Subject: [PATCH] Mark `DefaultImageDecoder.BitmapDecoder` as `@VisibleForTesting` It seems likely we will define a new "image decoder" interface that returns `ListenableFuture`, 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 (cherry picked from commit d50f662b10fd8e8a36fb3ebde22f044a8f134100) --- .../androidx/media3/exoplayer/image/DefaultImageDecoder.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/image/DefaultImageDecoder.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/image/DefaultImageDecoder.java index b06882db98..88f874dc47 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/image/DefaultImageDecoder.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/image/DefaultImageDecoder.java @@ -15,6 +15,7 @@ */ 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.checkNotNull; import static androidx.media3.common.util.Assertions.checkState; @@ -24,6 +25,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import androidx.exifinterface.media.ExifInterface; import androidx.media3.common.C; import androidx.media3.common.Format; @@ -51,6 +53,7 @@ public final class DefaultImageDecoder implements ImageDecoder { /** A functional interface for turning byte arrays into bitmaps. */ + @VisibleForTesting(otherwise = PRIVATE) public interface BitmapDecoder { /**