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

Commit 410e2df4 authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "CircleFramedDrawable incorrectly has implicit dependency on the hosting...

Merge "CircleFramedDrawable incorrectly has implicit dependency on the hosting view size." into jb-mr2-dev
parents f6d483e6 8397ba60
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -123,12 +123,10 @@ class CircleFramedDrawable extends Drawable {

    @Override
    public void draw(Canvas canvas) {
        // clear background
        final float outside = Math.min(canvas.getWidth(), canvas.getHeight());
        final float inside = mScale * outside;
        final float pad = (outside - inside) / 2f;
        final float inside = mScale * mSize;
        final float pad = (mSize - inside) / 2f;

        mDstRect.set(pad, pad, outside - pad, outside - pad);
        mDstRect.set(pad, pad, mSize - pad, mSize - pad);
        canvas.drawBitmap(mBitmap, mSrcRect, mDstRect, null);

        mFrameRect.set(mDstRect);