From 9cda0d98c19c46e52c104c470aa0a0c4ad4b6429 Mon Sep 17 00:00:00 2001
From: Sally Qi
IllegalArgumentException will also be thrown
+ * if the specified color space has a transfer function that is not an
+ * {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}. Starting from
+ * {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, the color spaces with non
+ * ICC parametric curve transfer function are allowed.
+ * E.g., {@link ColorSpace.Named#BT2020_HLG BT2020_HLG}.
*
* @throws IllegalArgumentException If the {@code Config} (returned by {@link #getConfig()})
* is {@link Config#ALPHA_8}.
diff --git a/graphics/java/android/graphics/ImageDecoder.java b/graphics/java/android/graphics/ImageDecoder.java
index 239621eeed1e3..51f99ec637da7 100644
--- a/graphics/java/android/graphics/ImageDecoder.java
+++ b/graphics/java/android/graphics/ImageDecoder.java
@@ -1682,11 +1682,16 @@ public final class ImageDecoder implements AutoCloseable {
* {@link #decodeBitmap decodeBitmap} when setting a non-RGB color space
* such as {@link ColorSpace.Named#CIE_LAB Lab}.
*
- * The specified color space's transfer function must be + *
Prior to {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE},
+ * the specified color space's transfer function must be
* an {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}. An
* IllegalArgumentException will be thrown by the decode methods
* if calling {@link ColorSpace.Rgb#getTransferParameters()} on the
- * specified color space returns null.
Like all setters on ImageDecoder, this must be called inside * {@link OnHeaderDecodedListener#onHeaderDecoded onHeaderDecoded}.