]> git.saurik.com Git - android/aapt.git/commitdiff
Normalize output from aapt d
authorShachar Shemesh <lingnu@gmail.com>
Mon, 20 Dec 2010 15:38:33 +0000 (17:38 +0200)
committerShachar Shemesh <lingnu@gmail.com>
Tue, 4 Jan 2011 18:52:08 +0000 (20:52 +0200)
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

XMLNode.cpp

index 8551b0f9c9030c57d00d8dbba6085a0fc9952ac5..c0d74275a8a6a6883fedeed008ab6e993e4658cc 100644 (file)
@@ -451,13 +451,15 @@ void printXMLBlock(ResXMLTree* block)
                     printf("=?0x%x", (int)value.data);
                 } else if (value.dataType == Res_value::TYPE_STRING) {
                     printf("=\"%s\"",
                     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) {
                 } 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");
             }
                 }
                 printf("\n");
             }