From 1be46d7920dbdce24f878d6f4889ea8591ab75c6 Mon Sep 17 00:00:00 2001 From: "viral.vkm" Date: Thu, 25 Mar 2010 17:50:57 +0530 Subject: 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 --- graphics/java/android/graphics/drawable/GradientDrawable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics') diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index 91a2bc1..63d1446 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -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, -- cgit v1.1