summaryrefslogtreecommitdiffstats
path: root/tools/aapt
diff options
context:
space:
mode:
authorShachar Shemesh <lingnu@gmail.com>2012-07-08 06:37:48 +0300
committerShachar Shemesh <lingnu@gmail.com>2012-07-08 06:37:48 +0300
commit429dad687bcb5f00587e8b91b3a614502907aaa1 (patch)
treeee2b4ad0c456c6dde1cd81979565b72e9c389fa6 /tools/aapt
parentdc99555d61d50820b398096bb774ee56b2500476 (diff)
downloadframeworks_base-429dad687bcb5f00587e8b91b3a614502907aaa1.zip
frameworks_base-429dad687bcb5f00587e8b91b3a614502907aaa1.tar.gz
frameworks_base-429dad687bcb5f00587e8b91b3a614502907aaa1.tar.bz2
Normalize output from aapt d xmltree
When using aapt dump xmltree to dump an XML which has a content element with newlines, the output contains a newline. This makes it very difficult, sometimes impossible, to understand what is part of the content, and what is the meta-data. We now pass XML content through the same normalizer used for other tags. Change-Id: I327321520fac563eb32aecaf796f2473866697fc
Diffstat (limited to 'tools/aapt')
-rw-r--r--tools/aapt/XMLNode.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index 8d7acee..fbb4302 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -511,7 +511,8 @@ void printXMLBlock(ResXMLTree* block)
namespaces.pop();
} else if (code == ResXMLTree::TEXT) {
size_t len;
- printf("%sC: \"%s\"\n", prefix.string(), String8(block->getText(&len)).string());
+ printf("%sC: \"%s\"\n", prefix.string(),
+ ResTable::normalizeForOutput(String8(block->getText(&len)).string()).string());
}
}