From a65bbdf43c2c29222e4067e97cc1ec1137fea516 Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Thu, 15 Feb 2018 12:39:44 -0800 Subject: 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 --- tools/aapt2/ResourceValues.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tools/aapt2/ResourceValues.cpp') 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) { -- cgit v1.2.3-59-g8ed1b