Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4580ae12 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Explain why Bitmap#setColorSpace is @NonNull

Bug: 127282638
Test: No change in behavior
Change-Id: I167893b1d80ae37982804ec0dfa98b68d6eaab53
parent 0718be8c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1718,6 +1718,11 @@ public final class Bitmap implements Parcelable {
     * <p>Modifies the bitmap to have the specified {@link ColorSpace}, without
     * affecting the underlying allocation backing the bitmap.</p>
     *
     * <p>This affects how the framework will interpret the color at each pixel. A bitmap
     * with {@link Config#ALPHA_8} never has a color space, since a color space does not
     * affect the alpha channel. Other {@code Config}s must always have a non-null
     * {@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