Add ability for some manifest attributes to reference resources.
This loosens our restriction on many manifest attributes requiring
literal string values, to allow various ones to use values from
resources. This is only allowed if the resource value does not change
from configuration changes, and the restriction is still in place
for attributes that are core to security (requesting permissions) or
market operation (used libraries and features etc).
Change-Id: I4da02f6a5196cb6a7dbcff9ac25403904c42c2c8
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 1f9d152..ab5e937 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -28,6 +28,20 @@
}
status_t compileXmlFile(const sp<AaptAssets>& assets,
+ const sp<AaptFile>& target,
+ const sp<AaptFile>& outTarget,
+ ResourceTable* table,
+ int options)
+{
+ sp<XMLNode> root = XMLNode::parse(target);
+ if (root == NULL) {
+ return UNKNOWN_ERROR;
+ }
+
+ return compileXmlFile(assets, root, outTarget, table, options);
+}
+
+status_t compileXmlFile(const sp<AaptAssets>& assets,
const sp<XMLNode>& root,
const sp<AaptFile>& target,
ResourceTable* table,