Skip to content

Commit 1be46d7

Browse files
committed
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
1 parent a2d776b commit 1be46d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphics/java/android/graphics/drawable/GradientDrawable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,8 +778,8 @@ public void inflate(Resources r, XmlPullParser parser,
778778
com.android.internal.R.styleable.DrawableCorners_bottomLeftRadius, radius);
779779
int bottomRightRadius = a.getDimensionPixelSize(
780780
com.android.internal.R.styleable.DrawableCorners_bottomRightRadius, radius);
781-
if (topLeftRadius != radius && topRightRadius != radius &&
782-
bottomLeftRadius != radius && bottomRightRadius != radius) {
781+
if (topLeftRadius != radius || topRightRadius != radius ||
782+
bottomLeftRadius != radius || bottomRightRadius != radius) {
783783
setCornerRadii(new float[] {
784784
topLeftRadius, topLeftRadius,
785785
topRightRadius, topRightRadius,

0 commit comments

Comments
 (0)