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

Commit 0b684913 authored by Doris Liu's avatar Doris Liu Committed by android-build-merger
Browse files

Restrict AVD and VD parsing to the current element instead of the whole...

Restrict AVD and VD parsing to the current element instead of the whole document am: 1f859716 am: 897f5ca7
am: 43104389

Change-Id: I1730b80585c5d5064fda8ec4d598a95651d7c3eb
parents 9de8f7f6 43104389
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -455,7 +455,11 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable2 {

        int eventType = parser.getEventType();
        float pathErrorScale = 1;
        while (eventType != XmlPullParser.END_DOCUMENT) {
        final int innerDepth = parser.getDepth() + 1;

        // Parse everything until the end of the animated-vector element.
        while (eventType != XmlPullParser.END_DOCUMENT
                && (parser.getDepth() >= innerDepth || eventType != XmlPullParser.END_TAG)) {
            if (eventType == XmlPullParser.START_TAG) {
                final String tagName = parser.getName();
                if (ANIMATED_VECTOR.equals(tagName)) {
+5 −1
Original line number Diff line number Diff line
@@ -744,7 +744,11 @@ public class VectorDrawable extends Drawable {
        groupStack.push(state.mRootGroup);

        int eventType = parser.getEventType();
        while (eventType != XmlPullParser.END_DOCUMENT) {
        final int innerDepth = parser.getDepth() + 1;

        // Parse everything until the end of the vector element.
        while (eventType != XmlPullParser.END_DOCUMENT
                && (parser.getDepth() >= innerDepth || eventType != XmlPullParser.END_TAG)) {
            if (eventType == XmlPullParser.START_TAG) {
                final String tagName = parser.getName();
                final VGroup currentGroup = groupStack.peek();