summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/java/android/graphics/Bitmap.java13
-rw-r--r--graphics/java/android/graphics/ImageDecoder.java9
2 files changed, 16 insertions, 6 deletions
diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java
index 318cd32d19fe..3c654d6dec48 100644
--- a/graphics/java/android/graphics/Bitmap.java
+++ b/graphics/java/android/graphics/Bitmap.java
@@ -1810,10 +1810,15 @@ public final class Bitmap implements Parcelable {
* {@code ColorSpace}.</p>
*
* @throws IllegalArgumentException If the specified color space is {@code null}, not
- * {@link ColorSpace.Model#RGB RGB}, has a transfer function that is not an
- * {@link ColorSpace.Rgb.TransferParameters ICC parametric curve}, or whose
- * components min/max values reduce the numerical range compared to the
- * previously assigned color space.
+ * {@link ColorSpace.Model#RGB RGB}, or whose components min/max values reduce
+ * the numerical range compared to the previously assigned color space.
+ * Prior to {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE},
+ * <code>IllegalArgumentException</code> 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 239621eeed1e..51f99ec637da 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}.</p>
*
- * <p class="note">The specified color space's transfer function must be
+ * <p class="note">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
* <code>IllegalArgumentException</code> will be thrown by the decode methods
* if calling {@link ColorSpace.Rgb#getTransferParameters()} on the
- * specified color space returns null.</p>
+ * specified color space returns null.
+ * 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}.
+ * </p>
*
* <p>Like all setters on ImageDecoder, this must be called inside
* {@link OnHeaderDecodedListener#onHeaderDecoded onHeaderDecoded}.</p>