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
diff --git a/tools/aapt2/ResourceValues.cpp b/tools/aapt2/ResourceValues.cpp
index 77cee06..6f213e1 100644
--- a/tools/aapt2/ResourceValues.cpp
+++ b/tools/aapt2/ResourceValues.cpp
@@ -369,6 +369,19 @@
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) {