Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 429dad68 authored by Shachar Shemesh's avatar Shachar Shemesh
Browse files

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
parent dc99555d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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());
        }
    }