diff --git a/libraries/common/src/main/java/androidx/media3/common/ColorInfo.java b/libraries/common/src/main/java/androidx/media3/common/ColorInfo.java index e48ff0231d..0c04ff6569 100644 --- a/libraries/common/src/main/java/androidx/media3/common/ColorInfo.java +++ b/libraries/common/src/main/java/androidx/media3/common/ColorInfo.java @@ -253,37 +253,7 @@ public final class ColorInfo implements Bundleable { // Lazily initialized hashcode. private int hashCode; - /** - * Constructs the ColorInfo. - * - * @param colorSpace The color space of the video. - * @param colorRange The color range of the video. - * @param colorTransfer The color transfer characteristics of the video. - * @param hdrStaticInfo HdrStaticInfo as defined in CTA-861.3, or null if none specified. - * @deprecated Use {@link Builder}. - */ - @Deprecated - public ColorInfo( - @C.ColorSpace int colorSpace, - @C.ColorRange int colorRange, - @C.ColorTransfer int colorTransfer, - @Nullable byte[] hdrStaticInfo) { - this(colorSpace, colorRange, colorTransfer, hdrStaticInfo, Format.NO_VALUE, Format.NO_VALUE); - } - - /** - * Constructs the ColorInfo. - * - * @param colorSpace The color space of the video. - * @param colorRange The color range of the video. - * @param colorTransfer The color transfer characteristics of the video. - * @param hdrStaticInfo HdrStaticInfo as defined in CTA-861.3, or null if none specified. - * @param lumaBitdepth The bit depth of the luma samples of the video. - * @param chromaBitdepth The bit depth of the chroma samples of the video. - * @deprecated Use {@link Builder}. - */ - @Deprecated - public ColorInfo( + private ColorInfo( @C.ColorSpace int colorSpace, @C.ColorRange int colorRange, @C.ColorTransfer int colorTransfer, diff --git a/libraries/common/src/test/java/androidx/media3/common/FormatTest.java b/libraries/common/src/test/java/androidx/media3/common/FormatTest.java index b3429a63f0..254ad19d65 100644 --- a/libraries/common/src/test/java/androidx/media3/common/FormatTest.java +++ b/libraries/common/src/test/java/androidx/media3/common/FormatTest.java @@ -74,13 +74,14 @@ public final class FormatTest { Metadata metadata = new Metadata(new FakeMetadataEntry("id1"), new FakeMetadataEntry("id2")); ColorInfo colorInfo = - new ColorInfo( - C.COLOR_SPACE_BT709, - C.COLOR_RANGE_LIMITED, - C.COLOR_TRANSFER_SDR, - new byte[] {1, 2, 3, 4, 5, 6, 7}, - /* lumaBitdepth */ 9, - /* chromaBitdepth */ 11); + new ColorInfo.Builder() + .setColorSpace(C.COLOR_SPACE_BT709) + .setColorRange(C.COLOR_RANGE_LIMITED) + .setColorTransfer(C.COLOR_TRANSFER_SDR) + .setHdrStaticInfo(new byte[] {1, 2, 3, 4, 5, 6, 7}) + .setLumaBitdepth(9) + .setChromaBitdepth(11) + .build(); return new Format.Builder() .setId("id")