am 803d91b2: Fix NPE when inflating GradientDrawables.

* commit '803d91b2b2eef42e1ebe088613f83e555d2bfd04':
  Fix NPE when inflating GradientDrawables.
This commit is contained in:
Tim Kilbourn
2014-03-25 10:26:09 -07:00
committed by Android Git Automerger

View File

@@ -1009,7 +1009,7 @@ public class GradientDrawable extends Drawable {
}
if (state.mInnerRadius == -1
&& themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0) {
&& (themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0)) {
state.mInnerRadiusRatio = a.getFloat(
R.styleable.GradientDrawable_innerRadiusRatio, DEFAULT_INNER_RADIUS_RATIO);
}
@@ -1020,7 +1020,7 @@ public class GradientDrawable extends Drawable {
}
if (state.mThickness == -1
&& themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0) {
&& (themeAttrs == null || themeAttrs[R.styleable.GradientDrawable_thicknessRatio] == 0)) {
state.mThicknessRatio = a.getFloat(
R.styleable.GradientDrawable_thicknessRatio, DEFAULT_THICKNESS_RATIO);
}