Annotate return values with @CheckReturn
Change-Id: Icd8fb6adb591ccd7f35f2336ae716b198abf69c5
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.graphics;
|
||||
|
||||
import android.annotation.CheckResult;
|
||||
import android.annotation.ColorInt;
|
||||
import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
@@ -1501,6 +1502,7 @@ public final class Bitmap implements Parcelable {
|
||||
*
|
||||
* @return new bitmap containing the alpha channel of the original bitmap.
|
||||
*/
|
||||
@CheckResult
|
||||
public Bitmap extractAlpha() {
|
||||
return extractAlpha(null, null);
|
||||
}
|
||||
@@ -1530,6 +1532,7 @@ public final class Bitmap implements Parcelable {
|
||||
* Canvas.drawBitmap(), where the color(s) will be taken from the
|
||||
* paint that is passed to the draw call.
|
||||
*/
|
||||
@CheckResult
|
||||
public Bitmap extractAlpha(Paint paint, int[] offsetXY) {
|
||||
checkRecycled("Can't extractAlpha on a recycled bitmap");
|
||||
long nativePaint = paint != null ? paint.getNativeInstance() : 0;
|
||||
|
||||
Reference in New Issue
Block a user