Skip runUntilComparisonFrameOrEnded checks for nexus's on API 21

verified with nexus 5 running on api 21

PiperOrigin-RevId: 561957198
This commit is contained in:
tofunmi 2023-09-01 08:07:52 -07:00 committed by Copybara-Service
parent e15c05fc3c
commit 502504fd47

View file

@ -27,6 +27,7 @@ import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_FORMAT;
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_URI_STRING;
import static androidx.media3.transformer.AndroidTestUtil.MP4_PORTRAIT_ASSET_URI_STRING;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assume.assumeFalse;
import android.content.Context;
import android.graphics.Bitmap;
@ -44,6 +45,7 @@ import androidx.media3.test.utils.BitmapPixelTestUtil;
import androidx.media3.test.utils.VideoDecodingWrapper;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.common.base.Ascii;
import com.google.common.collect.ImmutableList;
import java.io.IOException;
import java.util.List;
@ -257,6 +259,9 @@ public final class TransformerSequenceEffectTest {
private static ImmutableList<Bitmap> extractBitmapsFromVideo(Context context, String filePath)
throws IOException, InterruptedException {
// b/298599172 - runUntilComparisonFrameOrEnded fails on this device because reading decoder
// output as a bitmap doesn't work.
assumeFalse(Util.SDK_INT == 21 && Ascii.toLowerCase(Util.MODEL).contains("nexus"));
ImmutableList.Builder<Bitmap> bitmaps = new ImmutableList.Builder<>();
try (VideoDecodingWrapper decodingWrapper =
new VideoDecodingWrapper(