Fix Nullability annotation
The initial commit of the @Nullable annotation appears to have been based off of the javadocs. However, the actual code does not appear to have allowed for null at that time. It's not entirely clear if null was ever allowed, but it hasn't been allowed since API 14 at least Test: make Fixes: 195924626 Change-Id: Ibffdc7b90cbfc3bc65a4a08bee52e2e3412bed3e
This commit is contained in:
@@ -14971,7 +14971,7 @@ package android.graphics {
|
||||
method public void drawTextRun(@NonNull android.graphics.text.MeasuredText, int, int, int, int, float, float, boolean, @NonNull android.graphics.Paint);
|
||||
method public void drawVertices(@NonNull android.graphics.Canvas.VertexMode, int, @NonNull float[], int, @Nullable float[], int, @Nullable int[], int, @Nullable short[], int, int, @NonNull android.graphics.Paint);
|
||||
method public void enableZ();
|
||||
method public boolean getClipBounds(@Nullable android.graphics.Rect);
|
||||
method public boolean getClipBounds(@NonNull android.graphics.Rect);
|
||||
method @NonNull public final android.graphics.Rect getClipBounds();
|
||||
method public int getDensity();
|
||||
method @Nullable public android.graphics.DrawFilter getDrawFilter();
|
||||
|
||||
@@ -1272,11 +1272,10 @@ public class Canvas extends BaseCanvas {
|
||||
* in a way similar to quickReject, in that it tells you that drawing
|
||||
* outside of these bounds will be clipped out.
|
||||
*
|
||||
* @param bounds Return the clip bounds here. If it is null, ignore it but
|
||||
* still return true if the current clip is non-empty.
|
||||
* @param bounds Return the clip bounds here.
|
||||
* @return true if the current clip is non-empty.
|
||||
*/
|
||||
public boolean getClipBounds(@Nullable Rect bounds) {
|
||||
public boolean getClipBounds(@NonNull Rect bounds) {
|
||||
return nGetClipBounds(mNativeCanvasWrapper, bounds);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user