diff options
Diffstat (limited to 'tests/media/src/android/mediav2/cts/CodecInfoTest.java')
-rw-r--r-- | tests/media/src/android/mediav2/cts/CodecInfoTest.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/media/src/android/mediav2/cts/CodecInfoTest.java b/tests/media/src/android/mediav2/cts/CodecInfoTest.java index 5f9aa09c891..39b90fff698 100644 --- a/tests/media/src/android/mediav2/cts/CodecInfoTest.java +++ b/tests/media/src/android/mediav2/cts/CodecInfoTest.java @@ -158,10 +158,10 @@ public class CodecInfoTest { .noneMatch(x -> x == COLOR_FormatSurface)); } - // For devices launching with Android T, if a codec supports an HDR profile, it must - // advertise P010 support + // For devices launching with Android T, if a codec supports an HDR profile and device + // supports HDR display, it must advertise P010 support int[] HdrProfileArray = mProfileHdrMap.get(mMediaType); - if (FIRST_SDK_IS_AT_LEAST_T && HdrProfileArray != null) { + if (FIRST_SDK_IS_AT_LEAST_T && HdrProfileArray != null && DISPLAY_HDR_TYPES.length > 0) { for (CodecProfileLevel pl : caps.profileLevels) { if (IntStream.of(HdrProfileArray).anyMatch(x -> x == pl.profile)) { assertFalse(mCodecInfo.getName() + " supports HDR profile " + pl.profile + "," + |