Don't preopt system server apps in system_other.
bug:36532541
bug:33799337
Test: m -j32 && find out/target -name \*.odex
(cherry picked from commit a2c6c0b11e49d94afbde3ab34c1521ad91befb8a)
Change-Id: Ic4396bb6c543af1c05f56030495caafb245ea304
diff --git a/core/dex_preopt.mk b/core/dex_preopt.mk
index b107ded..f940c72 100644
--- a/core/dex_preopt.mk
+++ b/core/dex_preopt.mk
@@ -23,6 +23,9 @@
# being used). To bundle everything one should set this to '%'
SYSTEM_OTHER_ODEX_FILTER ?= app/% priv-app/%
+# Method returning whether the install path $(1) should be for system_other.
+install-on-system-other = $(filter-out $(PRODUCT_SYSTEM_SERVER_APPS),$(basename $(notdir $(filter $(foreach f,$(SYSTEM_OTHER_ODEX_FILTER),$(TARGET_OUT)/$(f)),$(1)))))
+
# The default values for pre-opting: always preopt PIC.
# Conditional to building on linux, as dex2oat currently does not work on darwin.
ifeq ($(HOST_OS),linux)