Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45f207d6 authored by Alan Viverette's avatar Alan Viverette
Browse files

Only parse LayerDrawable child items when necessary

Bug: 20098214
Change-Id: Ie9da5f6e494ede47f9fdc94481a3f8ca41d3ef00
parent a323e3f3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -211,7 +211,11 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
            updateLayerFromTypedArray(layer, a);
            a.recycle();

            if (layer.mDrawable == null) {
            // If the layer doesn't have a drawable or unresolved theme
            // attribute for a drawable, attempt to parse one from the child
            // element.
            if (layer.mDrawable == null && (layer.mThemeAttrs == null ||
                    layer.mThemeAttrs[R.styleable.LayerDrawableItem_drawable] == 0)) {
                while ((type = parser.next()) == XmlPullParser.TEXT) {
                }
                if (type != XmlPullParser.START_TAG) {