From 6ed4061abf6a2b2719e916ffa9498786f01fc6b0 Mon Sep 17 00:00:00 2001 From: Shane Farmer Date: Wed, 6 Sep 2017 10:00:07 -0700 Subject: [PATCH] AAPT2: Debug::DumpXml display compiled attribute values. Test: manually dumped a compiled AndroidManifest.xml file. Change-Id: I14f022fd1f95693b21d07b7b8c1886f23738242a --- tools/aapt2/Debug.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 49ed7780f9501..dba9cb5c28034 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_ += " ";