Add namespace handling in attribute values
Previously, you could only reference namespace prefixes in attribute names:
<View xmlns:appcompat="http://schemas.android.com/apk/res/android.support.v7.appcompat"
appcompat:name="hey"
...
Now you can also reference them in resource names within an attribute value:
...
android:text="@appcompat:string/confirm"
...
Which will be treated as "@android.support.v7.appcompat:string/confirm".
Change-Id: Ib076e867a990c80cf877a704eb77cd1ef0b23b52
diff --git a/tools/aapt2/ScopedXmlPullParser.cpp b/tools/aapt2/ScopedXmlPullParser.cpp
index d9ae72c..48da93e 100644
--- a/tools/aapt2/ScopedXmlPullParser.cpp
+++ b/tools/aapt2/ScopedXmlPullParser.cpp
@@ -76,6 +76,11 @@
return mParser->getNamespaceUri();
}
+bool ScopedXmlPullParser::applyPackageAlias(std::u16string* package,
+ const std::u16string& defaultPackage) const {
+ return mParser->applyPackageAlias(package, defaultPackage);
+}
+
const std::u16string& ScopedXmlPullParser::getElementNamespace() const {
return mParser->getElementNamespace();
}