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

Commit d5e11f6f authored by Diego Perez's avatar Diego Perez Committed by Android (Google) Code Review
Browse files

Merge "Fix crash when shadowSize is 0"

parents be93f28d e8109645
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ public class ShadowPainter {
    @SuppressWarnings({"SuspiciousNameCombination", "UnnecessaryLocalVariable"})  // Imported code
    public static BufferedImage createDropShadow(BufferedImage source, int shadowSize,
            float shadowOpacity, int shadowRgb) {
        if (shadowSize == 0) {
            return source;
        }

        // This code is based on
        //      http://www.jroller.com/gfx/entry/non_rectangular_shadow