diff options
author | Adam Lesinski <adamlesinski@google.com> | 2018-02-15 12:39:44 -0800 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2018-02-15 16:44:15 -0800 |
commit | a65bbdf43c2c29222e4067e97cc1ec1137fea516 (patch) | |
tree | 5d86bfd1dde9364897dd09c4d79006a4655849fc /tools/aapt2/ResourceValues.cpp | |
parent | bbf429795d0558797e7ac8d1024fa5c16552e96c (diff) |
AAPT2: Ensure output formats of files are correctly set
When compiling straight to proto from source, the file types
were not set correctly (binary XML or proto XML).
Bug: 73406447
Test: manual
Change-Id: I68c1881a00a2ec1ad58f7ec485af2543d262d076
Diffstat (limited to 'tools/aapt2/ResourceValues.cpp')
-rw-r--r-- | tools/aapt2/ResourceValues.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp index 77cee0683f3e..6f213e19e5f6 100644 --- a/tools/aapt2/ResourceValues.cpp +++ b/tools/aapt2/ResourceValues.cpp @@ -369,6 +369,19 @@ FileReference* FileReference::Clone(StringPool* new_pool) const { void FileReference::Print(std::ostream* out) const { *out << "(file) " << *path; + switch (type) { + case ResourceFile::Type::kBinaryXml: + *out << " type=XML"; + break; + case ResourceFile::Type::kProtoXml: + *out << " type=protoXML"; + break; + case ResourceFile::Type::kPng: + *out << " type=PNG"; + break; + default: + break; + } } BinaryPrimitive::BinaryPrimitive(const android::Res_value& val) : value(val) { |