diff options
author | Ryan Mitchell <rtmitchell@google.com> | 2018-03-28 18:22:57 -0700 |
---|---|---|
committer | Ryan Mitchell <rtmitchell@google.com> | 2018-03-29 09:05:40 -0700 |
commit | a04880771254f5169a1fe460ff40b565d9dceb0d (patch) | |
tree | 70718679737950ac98a9798a7b26ac2d5538ed9b /tools/aapt2/ResourceUtils.cpp | |
parent | f4c660e38d96d895e2897d2d8112086f9ba6ee69 (diff) |
Changed AAPT2 to abide by AAPT resource whitespace triming.
Bug: b/74331008
Test: Created tests in ResourceParser_test.cpp
Change-Id: Id7b387692b795774cd77452ca8cf06a8447bf3be
Diffstat (limited to 'tools/aapt2/ResourceUtils.cpp')
-rw-r--r-- | tools/aapt2/ResourceUtils.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp index 8fc3d6580165..560077cc322c 100644 --- a/tools/aapt2/ResourceUtils.cpp +++ b/tools/aapt2/ResourceUtils.cpp @@ -30,7 +30,6 @@ #include "util/Files.h" #include "util/Util.h" -using ::aapt::text::IsWhitespace; using ::aapt::text::Utf8Iterator; using ::android::StringPiece; using ::android::StringPiece16; @@ -807,7 +806,7 @@ StringBuilder& StringBuilder::AppendText(const std::string& text) { Utf8Iterator iter(text); while (iter.HasNext()) { char32_t codepoint = iter.Next(); - if (!quote_ && text::IsWhitespace(codepoint)) { + if (!quote_ && iswspace(codepoint)) { if (!last_codepoint_was_space_) { // Emit a space if it's the first. xml_string_.text += ' '; |