From 0dd9dd84bbf97e1ddf20f375e81191fc70fcf95b Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Thu, 28 Feb 2019 11:56:57 -0500 Subject: 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 --- graphics/java/android/graphics/Bitmap.java | 1 + 1 file changed, 1 insertion(+) (limited to 'graphics/java') diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 8d3bac8622f6..4b1cf35ade82 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -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(), " -- cgit v1.2.3-59-g8ed1b