@@ -4357,13 +4357,15 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle) {
43574357 continue ;
43584358 }
43594359
4360- entriesToAdd[i].value ->getPos ()
4361- .printf (" using v%d attributes; synthesizing resource %s:%s/%s for configuration %s." ,
4362- SDK_L,
4363- String8 (p->getName ()).string (),
4364- String8 (t->getName ()).string (),
4365- String8 (entriesToAdd[i].value ->getName ()).string (),
4366- entriesToAdd[i].key .toString ().string ());
4360+ if (bundle->getVerbose ()) {
4361+ entriesToAdd[i].value ->getPos ()
4362+ .printf (" using v%d attributes; synthesizing resource %s:%s/%s for configuration %s." ,
4363+ SDK_L,
4364+ String8 (p->getName ()).string (),
4365+ String8 (t->getName ()).string (),
4366+ String8 (entriesToAdd[i].value ->getName ()).string (),
4367+ entriesToAdd[i].key .toString ().string ());
4368+ }
43674369
43684370 sp<Entry> newEntry = t->getEntry (c->getName (),
43694371 entriesToAdd[i].value ->getPos (),
@@ -4437,13 +4439,15 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
44374439 resPath.convertToResPath ();
44384440
44394441 // Add a resource table entry.
4440- SourcePos (target->getSourceFile (), -1 ).printf (
4441- " using v%d attributes; synthesizing resource %s:%s/%s for configuration %s." ,
4442- SDK_L,
4443- mAssets ->getPackage ().string (),
4444- newFile->getResourceType ().string (),
4445- String8 (resourceName).string (),
4446- newConfig.toString ().string ());
4442+ if (bundle->getVerbose ()) {
4443+ SourcePos (target->getSourceFile (), -1 ).printf (
4444+ " using v%d attributes; synthesizing resource %s:%s/%s for configuration %s." ,
4445+ SDK_L,
4446+ mAssets ->getPackage ().string (),
4447+ newFile->getResourceType ().string (),
4448+ String8 (resourceName).string (),
4449+ newConfig.toString ().string ());
4450+ }
44474451
44484452 addEntry (SourcePos (),
44494453 String16 (mAssets ->getPackage ()),
@@ -4466,12 +4470,14 @@ status_t ResourceTable::modifyForCompat(const Bundle* bundle,
44664470 sp<XMLNode> node = attrsToRemove[i].key ;
44674471 size_t attrIndex = attrsToRemove[i].value ;
44684472 const XMLNode::attribute_entry& ae = node->getAttributes ()[attrIndex];
4469- SourcePos (node->getFilename (), node->getStartLineNumber ()).printf (
4470- " removing attribute %s%s%s from <%s>" ,
4471- String8 (ae.ns ).string (),
4472- (ae.ns .size () == 0 ? " " : " :" ),
4473- String8 (ae.name ).string (),
4474- String8 (node->getElementName ()).string ());
4473+ if (bundle->getVerbose ()) {
4474+ SourcePos (node->getFilename (), node->getStartLineNumber ()).printf (
4475+ " removing attribute %s%s%s from <%s>" ,
4476+ String8 (ae.ns ).string (),
4477+ (ae.ns .size () == 0 ? " " : " :" ),
4478+ String8 (ae.name ).string (),
4479+ String8 (node->getElementName ()).string ());
4480+ }
44754481 node->removeAttribute (attrIndex);
44764482 }
44774483
0 commit comments