From 62b68341e8c9cb7a57da99413f5d3d52373e85e0 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Mon, 11 Mar 2019 13:28:02 -0700 Subject: [PATCH] Compile all files in res/xml as xml AAPT(1) compiled all files in res/xml as xml. Continue to do the same to prevent regressions. Bug: 122321161 Test: manual Change-Id: I99c80da6d304c13ce911cd5258fd561f3c9e91b4 --- tools/aapt2/cmd/Compile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp index 42dc74c6db55b..2ec1ab31a58cb 100644 --- a/tools/aapt2/cmd/Compile.cpp +++ b/tools/aapt2/cmd/Compile.cpp @@ -678,7 +678,7 @@ int Compile(IAaptContext* context, io::IFileCollection* inputs, IArchiveWriter* } else if (const ResourceType* type = ParseResourceType(path_data.resource_dir)) { if (*type != ResourceType::kRaw) { - if (path_data.extension == "xml") { + if (*type == ResourceType::kXml || path_data.extension == "xml") { compile_func = &CompileXml; } else if ((!options.no_png_crunch && path_data.extension == "png") || path_data.extension == "9.png") {