Annotate return values with @CheckReturn

Change-Id: Icd8fb6adb591ccd7f35f2336ae716b198abf69c5
This commit is contained in:
Tor Norbye
2015-03-02 10:57:08 -08:00
parent c615c6fc9c
commit 1c2bf03d10
3 changed files with 15 additions and 0 deletions

View File

@@ -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;