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
This commit is contained in:
Dianne Hackborn
2010-03-09 15:00:30 -08:00
parent ae58f6d747
commit cf244ada58
8 changed files with 321 additions and 185 deletions

View File

@ -27,6 +27,20 @@ status_t compileXmlFile(const sp<AaptAssets>& assets,
return compileXmlFile(assets, root, target, table, options);
}
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,