Loading graphics/java/android/graphics/drawable/LayerDrawable.java +17 −5 Original line number Diff line number Diff line Loading @@ -269,7 +269,8 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { // If the layer doesn't have a drawable or unresolved theme // attribute for a drawable, attempt to parse one from the child // element. // element. If multiple child elements exist, we'll only use the // first one. if (layer.mDrawable == null && (layer.mThemeAttrs == null || layer.mThemeAttrs[R.styleable.LayerDrawableItem_drawable] == 0)) { while ((type = parser.next()) == XmlPullParser.TEXT) { Loading @@ -279,13 +280,12 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { + ": <item> tag requires a 'drawable' attribute or " + "child tag defining a drawable"); } layer.mDrawable = Drawable.createFromXmlInner(r, parser, attrs, theme); } if (layer.mDrawable != null) { // We found a child drawable. Take ownership. layer.mDrawable = Drawable.createFromXmlInner(r, parser, attrs, theme); layer.mDrawable.setCallback(this); state.mChildrenChangingConfigurations |= layer.mDrawable.getChangingConfigurations(); layer.mDrawable.setCallback(this); } addLayer(layer); Loading Loading @@ -387,7 +387,19 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { final Drawable dr = a.getDrawable(R.styleable.LayerDrawableItem_drawable); if (dr != null) { if (layer.mDrawable != null) { // It's possible that a drawable was already set, in which case // we should clear the callback. We may have also integrated the // drawable's changing configurations, but we don't have enough // information to revert that change. layer.mDrawable.setCallback(null); } // Take ownership of the new drawable. layer.mDrawable = dr; layer.mDrawable.setCallback(this); state.mChildrenChangingConfigurations |= layer.mDrawable.getChangingConfigurations(); } } Loading Loading
graphics/java/android/graphics/drawable/LayerDrawable.java +17 −5 Original line number Diff line number Diff line Loading @@ -269,7 +269,8 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { // If the layer doesn't have a drawable or unresolved theme // attribute for a drawable, attempt to parse one from the child // element. // element. If multiple child elements exist, we'll only use the // first one. if (layer.mDrawable == null && (layer.mThemeAttrs == null || layer.mThemeAttrs[R.styleable.LayerDrawableItem_drawable] == 0)) { while ((type = parser.next()) == XmlPullParser.TEXT) { Loading @@ -279,13 +280,12 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { + ": <item> tag requires a 'drawable' attribute or " + "child tag defining a drawable"); } layer.mDrawable = Drawable.createFromXmlInner(r, parser, attrs, theme); } if (layer.mDrawable != null) { // We found a child drawable. Take ownership. layer.mDrawable = Drawable.createFromXmlInner(r, parser, attrs, theme); layer.mDrawable.setCallback(this); state.mChildrenChangingConfigurations |= layer.mDrawable.getChangingConfigurations(); layer.mDrawable.setCallback(this); } addLayer(layer); Loading Loading @@ -387,7 +387,19 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { final Drawable dr = a.getDrawable(R.styleable.LayerDrawableItem_drawable); if (dr != null) { if (layer.mDrawable != null) { // It's possible that a drawable was already set, in which case // we should clear the callback. We may have also integrated the // drawable's changing configurations, but we don't have enough // information to revert that change. layer.mDrawable.setCallback(null); } // Take ownership of the new drawable. layer.mDrawable = dr; layer.mDrawable.setCallback(this); state.mChildrenChangingConfigurations |= layer.mDrawable.getChangingConfigurations(); } } Loading