Merge "AAPT: Gate v21 resource synthesizing logging behind -v flag" into lmp-dev

This commit is contained in:
Adam Lesinski
2014-10-03 22:06:02 +00:00
committed by Android (Google) Code Review

View File

@ -4357,13 +4357,15 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) {
continue; continue;
} }
entriesToAdd[i].value->getPos() if (bundle->getVerbose()) {
.printf("using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.", entriesToAdd[i].value->getPos()
SDK_L, .printf("using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.",
String8(p->getName()).string(), SDK_L,
String8(t->getName()).string(), String8(p->getName()).string(),
String8(entriesToAdd[i].value->getName()).string(), String8(t->getName()).string(),
entriesToAdd[i].key.toString().string()); String8(entriesToAdd[i].value->getName()).string(),
entriesToAdd[i].key.toString().string());
}
sp<Entry> newEntry = t->getEntry(c->getName(), sp<Entry> newEntry = t->getEntry(c->getName(),
entriesToAdd[i].value->getPos(), entriesToAdd[i].value->getPos(),
@ -4437,13 +4439,15 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
resPath.convertToResPath(); resPath.convertToResPath();
// Add a resource table entry. // Add a resource table entry.
SourcePos(target->getSourceFile(), -1).printf( if (bundle->getVerbose()) {
"using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.", SourcePos(target->getSourceFile(), -1).printf(
SDK_L, "using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.",
mAssets->getPackage().string(), SDK_L,
newFile->getResourceType().string(), mAssets->getPackage().string(),
String8(resourceName).string(), newFile->getResourceType().string(),
newConfig.toString().string()); String8(resourceName).string(),
newConfig.toString().string());
}
addEntry(SourcePos(), addEntry(SourcePos(),
String16(mAssets->getPackage()), String16(mAssets->getPackage()),
@ -4466,12 +4470,14 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
sp<XMLNode> node = attrsToRemove[i].key; sp<XMLNode> node = attrsToRemove[i].key;
size_t attrIndex = attrsToRemove[i].value; size_t attrIndex = attrsToRemove[i].value;
const XMLNode::attribute_entry& ae = node->getAttributes()[attrIndex]; const XMLNode::attribute_entry& ae = node->getAttributes()[attrIndex];
SourcePos(node->getFilename(), node->getStartLineNumber()).printf( if (bundle->getVerbose()) {
"removing attribute %s%s%s from <%s>", SourcePos(node->getFilename(), node->getStartLineNumber()).printf(
String8(ae.ns).string(), "removing attribute %s%s%s from <%s>",
(ae.ns.size() == 0 ? "" : ":"), String8(ae.ns).string(),
String8(ae.name).string(), (ae.ns.size() == 0 ? "" : ":"),
String8(node->getElementName()).string()); String8(ae.name).string(),
String8(node->getElementName()).string());
}
node->removeAttribute(attrIndex); node->removeAttribute(attrIndex);
} }