diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/PlaceholderSurface.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/PlaceholderSurface.java index fb133567f4..ba5eb3bd6c 100644 --- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/PlaceholderSurface.java +++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/PlaceholderSurface.java @@ -32,7 +32,6 @@ import androidx.media3.common.util.EGLSurfaceTexture.SecureMode; import androidx.media3.common.util.GlUtil; import androidx.media3.common.util.Log; import androidx.media3.common.util.UnstableApi; -import androidx.media3.common.util.Util; import com.google.errorprone.annotations.InlineMe; import org.checkerframework.checker.nullness.qual.MonotonicNonNull; @@ -80,8 +79,6 @@ public final class PlaceholderSurface extends Surface { * Returns a newly created placeholder surface. The surface must be released by calling {@link * #release} when it's no longer required. * - *
Must only be called if {@link Util#SDK_INT} is 17 or higher.
- *
* @param context Any {@link Context}.
* @param secure Whether a secure surface is required. Must only be requested if {@link
* #isSecureSupported(Context)} returns {@code true}.
diff --git a/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java b/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java
index 8ad424624b..0c87049e1f 100644
--- a/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java
+++ b/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java
@@ -18,7 +18,6 @@ package androidx.media3.test.utils;
import static androidx.media3.common.util.Assertions.checkArgument;
import static androidx.media3.common.util.Assertions.checkNotNull;
import static androidx.media3.common.util.Assertions.checkState;
-import static androidx.media3.common.util.Util.SDK_INT;
import static androidx.media3.common.util.Util.isRunningOnEmulator;
import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
import static com.google.common.truth.Truth.assertThat;
@@ -49,7 +48,6 @@ import java.io.OutputStream;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.util.Arrays;
-import org.junit.AssumptionViolatedException;
/** Utilities for pixel tests. */
// TODO(b/263395272): After the bug is fixed and dependent tests are moved back to media3.effect,
@@ -539,14 +537,8 @@ public class BitmapPixelTestUtil {
public static Bitmap flipBitmapVertically(Bitmap bitmap) {
boolean wasPremultiplied = bitmap.isPremultiplied();
if (!wasPremultiplied) {
- if (SDK_INT >= 19) {
- // Bitmap.createBitmap must be called on a premultiplied bitmap.
- bitmap.setPremultiplied(true);
- } else {
- throw new AssumptionViolatedException(
- "bitmap is not premultiplied and Bitmap.setPremultiplied is not supported under API 19."
- + " unpremultiplied bitmaps cannot be flipped");
- }
+ // Bitmap.createBitmap must be called on a premultiplied bitmap.
+ bitmap.setPremultiplied(true);
}
Matrix flip = new Matrix();
@@ -561,9 +553,7 @@ public class BitmapPixelTestUtil {
bitmap.getHeight(),
flip,
/* filter= */ true);
- if (SDK_INT >= 19) {
- flippedBitmap.setPremultiplied(wasPremultiplied);
- }
+ flippedBitmap.setPremultiplied(wasPremultiplied);
return flippedBitmap;
}
diff --git a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/performance/EffectPlaybackTest.java b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/performance/EffectPlaybackTest.java
index 093b60502b..bfb033b2c3 100644
--- a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/performance/EffectPlaybackTest.java
+++ b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/mh/performance/EffectPlaybackTest.java
@@ -119,8 +119,6 @@ public class EffectPlaybackTest {
@Test
public void exoplayerEffectsPreviewTest_ensuresFirstFrameRendered() throws Exception {
- assumeTrue(Util.SDK_INT >= 18);
-
String testId =
Util.formatInvariant(
"exoplayerEffectsPreviewTest_withPlayWhenReady[%b]_ensuresFirstFrameRendered",
@@ -202,7 +200,6 @@ public class EffectPlaybackTest {
"This test should run on real devices because OpenGL to ImageReader rendering is not"
+ " always reliable on emulators.",
!Util.isRunningOnEmulator());
- assumeTrue(Util.SDK_INT >= 18);
ArrayList