Commit 32194def by ibaker Committed by kim-vde

Exclude PC devices from H.265 GTS tests

PiperOrigin-RevId: 333031399
parent ebfeb2f7
...@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.playbacktests.gts; ...@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.playbacktests.gts;
import static com.google.android.exoplayer2.playbacktests.gts.GtsTestUtil.shouldSkipWidevineTest; import static com.google.android.exoplayer2.playbacktests.gts.GtsTestUtil.shouldSkipWidevineTest;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import android.content.pm.PackageManager;
import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule; import androidx.test.rule.ActivityTestRule;
import com.google.android.exoplayer2.ExoPlayer; import com.google.android.exoplayer2.ExoPlayer;
...@@ -168,7 +169,7 @@ public final class DashStreamingTest { ...@@ -168,7 +169,7 @@ public final class DashStreamingTest {
@Test @Test
public void h265FixedV23() throws Exception { public void h265FixedV23() throws Exception {
if (Util.SDK_INT < 23) { if (Util.SDK_INT < 23 || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -183,7 +184,7 @@ public final class DashStreamingTest { ...@@ -183,7 +184,7 @@ public final class DashStreamingTest {
@Test @Test
public void h265AdaptiveV24() throws Exception { public void h265AdaptiveV24() throws Exception {
if (Util.SDK_INT < 24) { if (Util.SDK_INT < 24 || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -199,7 +200,7 @@ public final class DashStreamingTest { ...@@ -199,7 +200,7 @@ public final class DashStreamingTest {
@Test @Test
public void h265AdaptiveWithSeekingV24() throws Exception { public void h265AdaptiveWithSeekingV24() throws Exception {
if (Util.SDK_INT < 24) { if (Util.SDK_INT < 24 || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -216,7 +217,7 @@ public final class DashStreamingTest { ...@@ -216,7 +217,7 @@ public final class DashStreamingTest {
@Test @Test
public void h265AdaptiveWithRendererDisablingV24() throws Exception { public void h265AdaptiveWithRendererDisablingV24() throws Exception {
if (Util.SDK_INT < 24) { if (Util.SDK_INT < 24 || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -435,7 +436,7 @@ public final class DashStreamingTest { ...@@ -435,7 +436,7 @@ public final class DashStreamingTest {
@Test @Test
public void widevineH265FixedV23() throws Exception { public void widevineH265FixedV23() throws Exception {
if (Util.SDK_INT < 23 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity())) { if (Util.SDK_INT < 23 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity()) || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -452,7 +453,7 @@ public final class DashStreamingTest { ...@@ -452,7 +453,7 @@ public final class DashStreamingTest {
@Test @Test
public void widevineH265AdaptiveV24() throws Exception { public void widevineH265AdaptiveV24() throws Exception {
if (Util.SDK_INT < 24 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity())) { if (Util.SDK_INT < 24 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity()) || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -469,7 +470,7 @@ public final class DashStreamingTest { ...@@ -469,7 +470,7 @@ public final class DashStreamingTest {
@Test @Test
public void widevineH265AdaptiveWithSeekingV24() throws Exception { public void widevineH265AdaptiveWithSeekingV24() throws Exception {
if (Util.SDK_INT < 24 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity())) { if (Util.SDK_INT < 24 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity()) || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -487,7 +488,7 @@ public final class DashStreamingTest { ...@@ -487,7 +488,7 @@ public final class DashStreamingTest {
@Test @Test
public void widevineH265AdaptiveWithRendererDisablingV24() throws Exception { public void widevineH265AdaptiveWithRendererDisablingV24() throws Exception {
if (Util.SDK_INT < 24 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity())) { if (Util.SDK_INT < 24 || GtsTestUtil.shouldSkipWidevineTest(testRule.getActivity()) || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -644,7 +645,7 @@ public final class DashStreamingTest { ...@@ -644,7 +645,7 @@ public final class DashStreamingTest {
@Test @Test
public void decoderInfoH265V24() throws Exception { public void decoderInfoH265V24() throws Exception {
if (Util.SDK_INT < 24) { if (Util.SDK_INT < 24 || isPc()) {
// Pass. // Pass.
return; return;
} }
...@@ -670,6 +671,11 @@ public final class DashStreamingTest { ...@@ -670,6 +671,11 @@ public final class DashStreamingTest {
// Internal. // Internal.
private boolean isPc() {
// See [internal b/162990153].
return testRule.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC);
}
private static boolean shouldSkipAdaptiveTest(String mimeType) throws DecoderQueryException { private static boolean shouldSkipAdaptiveTest(String mimeType) throws DecoderQueryException {
MediaCodecInfo decoderInfo = MediaCodecInfo decoderInfo =
MediaCodecUtil.getDecoderInfo(mimeType, /* secure= */ false, /* tunneling= */ false); MediaCodecUtil.getDecoderInfo(mimeType, /* secure= */ false, /* tunneling= */ false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment