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

Commit 3a0fe2cd authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "[LayoutInflater] Cleanup - remove some nesting"

parents 50ee2201 bfc68700
Loading
Loading
Loading
Loading
+105 −105
Original line number Diff line number Diff line
@@ -911,7 +911,10 @@ public abstract class LayoutInflater {
            AttributeSet attrs) throws XmlPullParserException, IOException {
        int type;

        if (parent instanceof ViewGroup) {
        if (!(parent instanceof ViewGroup)) {
            throw new InflateException("<include /> can only be used inside of a ViewGroup");
        }

        // Apply a theme wrapper, if requested. This is sort of a weird
        // edge case, since developers think the <include> overwrites
        // values in the AttributeSet of the included View. So, if the
@@ -953,7 +956,8 @@ public abstract class LayoutInflater {
            final String value = attrs.getAttributeValue(null, ATTR_LAYOUT);
            throw new InflateException("You must specify a valid layout "
                + "reference. The layout ID " + value + " is not valid.");
            } else {
        }

        final XmlResourceParser childParser = context.getResources().getLayout(layout);

        try {
@@ -1029,10 +1033,6 @@ public abstract class LayoutInflater {
        } finally {
            childParser.close();
        }
            }
        } else {
            throw new InflateException("<include /> can only be used inside of a ViewGroup");
        }

        LayoutInflater.consumeChildElements(parser);
    }