AAPT2: Allow to inline XML into custom attribute

Previously, doing something like

<parent xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:aapt="http://schemas.android.com/aapt">
    <aapt:attr name="app:foo">
        <child />
    </aapt:attr>
</parent>

would result in something like:

<parent xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:aapt="http://schemas.android.com/aapt"
        foo="@generated_name" />

while it should result in:

<parent xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:aapt="http://schemas.android.com/aapt"
        app:foo="@generated_name" />

Bug: 36809755
Test: make aapt2_tests
Change-Id: I72ea4b402e196ca05b53b788e4768a265190a0dc
3 files changed