AAPT2: always compile 9patch files
Test: existing tests
Bug: 70578281
Change-Id: I7ffcbdd664108348182e71d01b1680e2399ec37c
diff --git a/tools/aapt2/cmd/Compile.cpp b/tools/aapt2/cmd/Compile.cpp
index 3bec082..101f74e 100644
--- a/tools/aapt2/cmd/Compile.cpp
+++ b/tools/aapt2/cmd/Compile.cpp
@@ -772,8 +772,8 @@
if (*type != ResourceType::kRaw) {
if (path_data.extension == "xml") {
compile_func = &CompileXml;
- } else if (!options.no_png_crunch &&
- (path_data.extension == "png" || path_data.extension == "9.png")) {
+ } else if ((!options.no_png_crunch && path_data.extension == "png") ||
+ path_data.extension == "9.png") {
compile_func = &CompilePng;
}
}