summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceUtils.cpp
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2018-03-28 18:22:57 -0700
committerRyan Mitchell <rtmitchell@google.com>2018-04-04 15:54:05 +0000
commit9beaa9cfe3bd8c7c59eed053ff6ca18951c34a86 (patch)
tree0a14c76b75c770328fadb68b75d83751121637e7 /tools/aapt2/ResourceUtils.cpp
parenta926126a8bc89c1a6bd7fa8a76332476eba0d954 (diff)
Changed AAPT2 to abide by AAPT resource whitespace triming.
Bug: b/74331008 Test: Created tests in ResourceParser_test.cpp Change-Id: Id7b387692b795774cd77452ca8cf06a8447bf3be (cherry picked from commit a04880771254f5169a1fe460ff40b565d9dceb0d)
Diffstat (limited to 'tools/aapt2/ResourceUtils.cpp')
-rw-r--r--tools/aapt2/ResourceUtils.cpp3
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 += ' ';