summaryrefslogtreecommitdiff
path: root/tools/aapt/XMLNode.cpp
diff options
context:
space:
mode:
authorShachar Shemesh <lingnu@gmail.com>2010-12-20 17:38:33 +0200
committerShachar Shemesh <lingnu@gmail.com>2011-01-04 20:52:08 +0200
commit9872bf4a2d4ae1e7ded170c8e74d400fe6be9bfb (patch)
tree4040c675a82cdab2888c72e56188d8cd91ae547b /tools/aapt/XMLNode.cpp
parent69ebb984f230a523dc316bdb2c9e9c28111364fd (diff)
Normalize output from aapt d
Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed regardless of the content of the strings. Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf
Diffstat (limited to 'tools/aapt/XMLNode.cpp')
-rw-r--r--tools/aapt/XMLNode.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index 8551b0f9c903..c0d74275a8a6 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -451,13 +451,15 @@ void printXMLBlock(ResXMLTree* block)
printf("=?0x%x", (int)value.data);
} else if (value.dataType == Res_value::TYPE_STRING) {
printf("=\"%s\"",
- String8(block->getAttributeStringValue(i, &len)).string());
+ ResTable::normalizeForOutput(String8(block->getAttributeStringValue(i,
+ &len)).string()).string());
} else {
printf("=(type 0x%x)0x%x", (int)value.dataType, (int)value.data);
}
const char16_t* val = block->getAttributeStringValue(i, &len);
if (val != NULL) {
- printf(" (Raw: \"%s\")", String8(val).string());
+ printf(" (Raw: \"%s\")", ResTable::normalizeForOutput(String8(val).string()).
+ string());
}
printf("\n");
}