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

Commit 72ec557e authored by Jon Miranda's avatar Jon Miranda
Browse files

Remove shadow on folder icon.

Bug: 175329686
Test: manual, verify no shadow on folder icon background
Change-Id: I8ec9ac55ca4fd48155f017376c5bcd6043771d2a
parent 60a4a0b3
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ import com.android.launcher3.views.ActivityContext;
 */
public class PreviewBackground extends CellLayout.DelegatedCellDrawing {

    private static final boolean DRAW_SHADOW = false;

    private static final int CONSUMPTION_ANIMATION_DURATION = 100;

    private final PorterDuffXfermode mShadowPorterDuffXfermode
@@ -163,6 +165,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
        // Stroke width is 1dp
        mStrokeWidth = context.getResources().getDisplayMetrics().density;

        if (DRAW_SHADOW) {
            float radius = getScaledRadius();
            float shadowRadius = radius + mStrokeWidth;
            int shadowColor = Color.argb(SHADOW_OPACITY, 0, 0, 0);
@@ -170,6 +173,7 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
                    new int[]{shadowColor, Color.TRANSPARENT},
                    new float[]{radius / shadowRadius, 1},
                    Shader.TileMode.CLAMP);
        }

        invalidate();
    }
@@ -239,6 +243,9 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
    }

    public void drawShadow(Canvas canvas) {
        if (!DRAW_SHADOW) {
            return;
        }
        if (mShadowShader == null) {
            return;
        }
@@ -277,6 +284,9 @@ public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
    }

    public void fadeInBackgroundShadow() {
        if (!DRAW_SHADOW) {
            return;
        }
        if (mShadowAnimator != null) {
            mShadowAnimator.cancel();
        }