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

Commit d077d777 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Fix BitmapDrawable outline crash" into lmp-dev

parents 20ae7b7c 9745de0f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -602,9 +602,9 @@ public class BitmapDrawable extends Drawable {
    @Override
    public void getOutline(@NonNull Outline outline) {
        super.getOutline(outline);
        if (mBitmapState.mBitmap.hasAlpha()) {
            // Bitmaps with alpha can't report a non-0 alpha,
            // since they may not fill their rectangular bounds
        if (mBitmapState.mBitmap == null || mBitmapState.mBitmap.hasAlpha()) {
            // Only opaque Bitmaps can report a non-0 alpha,
            // since only they are guaranteed to fill their bounds
            outline.setAlpha(0.0f);
        }
    }