summaryrefslogtreecommitdiff
path: root/tools/aapt2/Debug.cpp
diff options
context:
space:
mode:
author Shane Farmer <safarmer@google.com> 2017-09-06 10:00:07 -0700
committer Shane Farmer <safarmer@google.com> 2017-09-06 10:21:02 -0700
commit6ed4061abf6a2b2719e916ffa9498786f01fc6b0 (patch)
tree4763d27c70d51014089de210821d4de994ec29c3 /tools/aapt2/Debug.cpp
parent9e16e1dd17d944d7a06aac1380c0f54415b04982 (diff)
AAPT2: Debug::DumpXml display compiled attribute values.
Test: manually dumped a compiled AndroidManifest.xml file. Change-Id: I14f022fd1f95693b21d07b7b8c1886f23738242a
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r--tools/aapt2/Debug.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp
index 49ed7780f950..dba9cb5c2803 100644
--- a/tools/aapt2/Debug.cpp
+++ b/tools/aapt2/Debug.cpp
@@ -291,7 +291,13 @@ class XmlPrinter : public xml::Visitor {
std::cerr << "(" << attr.compiled_attribute.value().id.value_or_default(ResourceId(0x0))
<< ")";
}
- std::cerr << "=" << attr.value << "\n";
+ std::cerr << "=";
+ if (attr.compiled_value != nullptr) {
+ std::cerr << *attr.compiled_value;
+ } else {
+ std::cerr << attr.value;
+ }
+ std::cerr << "\n";
}
prefix_ += " ";