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

Commit d4e53c88 authored by Winson Chung's avatar Winson Chung
Browse files

Ensuring that we restore bounds when resizing them for folder preview drawing. (Bug 11203738)

Change-Id: I0cef3916217bd3808363cafcfb25c2cd140f35fc
parent 01c0214f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ public class FolderIcon extends LinearLayout implements FolderListener {
    private int mPreviewOffsetY;
    private float mMaxPerspectiveShift;
    boolean mAnimating = false;
    private Rect mOldBounds = new Rect();

    private PreviewItemDrawingParams mParams = new PreviewItemDrawingParams(0, 0, 0, 0);
    private PreviewItemDrawingParams mAnimParams = new PreviewItemDrawingParams(0, 0, 0, 0);
@@ -534,6 +535,7 @@ public class FolderIcon extends LinearLayout implements FolderListener {
        Drawable d = params.drawable;

        if (d != null) {
            mOldBounds.set(d.getBounds());
            d.setBounds(0, 0, mIntrinsicIconSize, mIntrinsicIconSize);
            d.setFilterBitmap(true);
            d.setColorFilter(Color.argb(params.overlayAlpha, 255, 255, 255),
@@ -541,6 +543,7 @@ public class FolderIcon extends LinearLayout implements FolderListener {
            d.draw(canvas);
            d.clearColorFilter();
            d.setFilterBitmap(false);
            d.setBounds(mOldBounds);
        }
        canvas.restore();
    }