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

Commit 1be46d79 authored by viral.vkm's avatar viral.vkm
Browse files

setCornerRadii should be called when either of corners radius is specified

as 0dp and thus while checking for condition, it should be ORed and not ANDed.

It solves Android Issue: 939
http://code.google.com/p/android/issues/detail?id=939

Change-Id: Ic18fae769480972f763f634e7462c6ed3853220b
parent a2d776b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -778,8 +778,8 @@ public class GradientDrawable extends Drawable {
                        com.android.internal.R.styleable.DrawableCorners_bottomLeftRadius, radius);
                int bottomRightRadius = a.getDimensionPixelSize(
                        com.android.internal.R.styleable.DrawableCorners_bottomRightRadius, radius);
                if (topLeftRadius != radius && topRightRadius != radius &&
                        bottomLeftRadius != radius && bottomRightRadius != radius) {
                if (topLeftRadius != radius || topRightRadius != radius ||
                        bottomLeftRadius != radius || bottomRightRadius != radius) {
                    setCornerRadii(new float[] {
                            topLeftRadius, topLeftRadius,
                            topRightRadius, topRightRadius,