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

Commit d1a00260 authored by Eric Holk's avatar Eric Holk Committed by android-build-merger
Browse files

Merge "[LayoutInflater] Cleanup - remove some nesting" am: 3a0fe2cd am: a261d6e6

am: 6abf8736

Change-Id: I5b89a07c28f2d38af94a80137fd9a97d72b09091
parents 3cccaf8a 6abf8736
Loading
Loading
Loading
Loading
+105 −105
Original line number Diff line number Diff line
@@ -921,7 +921,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
@@ -963,7 +966,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 {
@@ -1039,10 +1043,6 @@ public abstract class LayoutInflater {
        } finally {
            childParser.close();
        }
            }
        } else {
            throw new InflateException("<include /> can only be used inside of a ViewGroup");
        }

        LayoutInflater.consumeChildElements(parser);
    }