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

Commit 0dd9dd84 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Mark Bitmap#getColor as @NonNull

Bug: 126700762
Test: None

This method will never return null. It will either throw an Exception or
return the Color at the specified location. Update the annotation to
make that explicit.

Change-Id: I276c0f84eac030758714b6736da29a7fdc175b7c
parent 869f5c42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13550,7 +13550,7 @@ package android.graphics {
    method @CheckResult public android.graphics.Bitmap extractAlpha(android.graphics.Paint, int[]);
    method public int getAllocationByteCount();
    method public int getByteCount();
    method public android.graphics.Color getColor(int, int);
    method @NonNull public android.graphics.Color getColor(int, int);
    method @Nullable public android.graphics.ColorSpace getColorSpace();
    method public android.graphics.Bitmap.Config getConfig();
    method public int getDensity();
+1 −0
Original line number Diff line number Diff line
@@ -1842,6 +1842,7 @@ public final class Bitmap implements Parcelable {
     * @throws IllegalStateException if the bitmap's config is {@link Config#HARDWARE}
     *
     */
    @NonNull
    public Color getColor(int x, int y) {
        checkRecycled("Can't call getColor() on a recycled bitmap");
        checkHardware("unable to getColor(), "