diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-10-03 14:57:28 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2014-10-03 14:57:28 -0700 |
commit | f15de2e2151ae48338afd27f3ebd33fce5009103 (patch) | |
tree | f0fc010bafa6673fbb17e2f4a9ca90eef07863f1 /tools/aapt | |
parent | b591da942e159588c70687dfe3e792feedc8f3b4 (diff) | |
download | frameworks_base-f15de2e2151ae48338afd27f3ebd33fce5009103.zip frameworks_base-f15de2e2151ae48338afd27f3ebd33fce5009103.tar.gz frameworks_base-f15de2e2151ae48338afd27f3ebd33fce5009103.tar.bz2 |
AAPT: Gate v21 resource synthesizing logging behind -v flag
This is verbose information and should be hidden behind the -v flag.
Bug:17822471
Change-Id: I36e2c6beb54669a31cde73416427477a80ded8a6
Diffstat (limited to 'tools/aapt')
-rw-r--r-- | tools/aapt/ResourceTable.cpp | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp index 77d3beb..c003fa6 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -4357,13 +4357,15 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) { continue; } - entriesToAdd[i].value->getPos() - .printf("using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.", - SDK_L, - String8(p->getName()).string(), - String8(t->getName()).string(), - String8(entriesToAdd[i].value->getName()).string(), - entriesToAdd[i].key.toString().string()); + if (bundle->getVerbose()) { + entriesToAdd[i].value->getPos() + .printf("using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.", + SDK_L, + String8(p->getName()).string(), + String8(t->getName()).string(), + String8(entriesToAdd[i].value->getName()).string(), + entriesToAdd[i].key.toString().string()); + } sp<Entry> newEntry = t->getEntry(c->getName(), entriesToAdd[i].value->getPos(), @@ -4437,13 +4439,15 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle, resPath.convertToResPath(); // Add a resource table entry. - SourcePos(target->getSourceFile(), -1).printf( - "using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.", - SDK_L, - mAssets->getPackage().string(), - newFile->getResourceType().string(), - String8(resourceName).string(), - newConfig.toString().string()); + if (bundle->getVerbose()) { + SourcePos(target->getSourceFile(), -1).printf( + "using v%d attributes; synthesizing resource %s:%s/%s for configuration %s.", + SDK_L, + mAssets->getPackage().string(), + newFile->getResourceType().string(), + String8(resourceName).string(), + newConfig.toString().string()); + } addEntry(SourcePos(), String16(mAssets->getPackage()), @@ -4466,12 +4470,14 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle, sp<XMLNode> node = attrsToRemove[i].key; size_t attrIndex = attrsToRemove[i].value; const XMLNode::attribute_entry& ae = node->getAttributes()[attrIndex]; - SourcePos(node->getFilename(), node->getStartLineNumber()).printf( - "removing attribute %s%s%s from <%s>", - String8(ae.ns).string(), - (ae.ns.size() == 0 ? "" : ":"), - String8(ae.name).string(), - String8(node->getElementName()).string()); + if (bundle->getVerbose()) { + SourcePos(node->getFilename(), node->getStartLineNumber()).printf( + "removing attribute %s%s%s from <%s>", + String8(ae.ns).string(), + (ae.ns.size() == 0 ? "" : ":"), + String8(ae.name).string(), + String8(node->getElementName()).string()); + } node->removeAttribute(attrIndex); } |