summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorviral.vkm <viral.vkm@gmail.com>2010-03-25 17:50:57 +0530
committerviral.vkm <viral.vkm@gmail.com>2010-03-25 17:50:57 +0530
commit1be46d7920dbdce24f878d6f4889ea8591ab75c6 (patch)
tree3866ace5e0f98d13de91553c3540c9b9008fa73f /graphics
parenta2d776b2d36b38d94a30fc5692fd71ce9697fe9c (diff)
downloadframeworks_base-1be46d7920dbdce24f878d6f4889ea8591ab75c6.zip
frameworks_base-1be46d7920dbdce24f878d6f4889ea8591ab75c6.tar.gz
frameworks_base-1be46d7920dbdce24f878d6f4889ea8591ab75c6.tar.bz2
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
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/GradientDrawable.java4
1 files changed, 2 insertions, 2 deletions
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,