diff options
author | Adam Lesinski <adamlesinski@google.com> | 2014-10-03 22:12:16 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-10-03 22:12:16 +0000 |
commit | 865acc74395a56287ab7bec58947327b5790aa70 (patch) | |
tree | e370b0a9b8f5f6ee5a0bca3a11d85857c2878280 /tools/aapt | |
parent | 366cafa2be06080c891c9090961044d324c6d0c7 (diff) | |
parent | a80aba70728c2843df94474dbd7829dadb77855f (diff) | |
download | frameworks_base-865acc74395a56287ab7bec58947327b5790aa70.zip frameworks_base-865acc74395a56287ab7bec58947327b5790aa70.tar.gz frameworks_base-865acc74395a56287ab7bec58947327b5790aa70.tar.bz2 |
am a80aba70: Merge "AAPT: Gate v21 resource synthesizing logging behind -v flag" into lmp-dev
* commit 'a80aba70728c2843df94474dbd7829dadb77855f':
AAPT: Gate v21 resource synthesizing logging behind -v flag
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 4b9981d..a0f3190 100644 --- a/tools/aapt/ResourceTable.cpp +++ b/tools/aapt/ResourceTable.cpp @@ -4388,13 +4388,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(), @@ -4468,13 +4470,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()), @@ -4497,12 +4501,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); } |