summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-11-13 15:19:12 -0800
committerYing Wang <wangying@google.com>2014-11-14 15:38:54 -0800
commit9a9d180ff1cafc547bd9d3b31a10db749d8ab359 (patch)
tree8210061269e2a6bc381b5cf13c95570bc2b9f638
parent100a9f072073f3c799deb72a62ffb500c1562c4c (diff)
downloadbuild-9a9d180ff1cafc547bd9d3b31a10db749d8ab359.zip
build-9a9d180ff1cafc547bd9d3b31a10db749d8ab359.tar.gz
build-9a9d180ff1cafc547bd9d3b31a10db749d8ab359.tar.bz2
Install preloaded-classes as a standalone configuration file
Install preloaded-classes as a standalone configuration file /system/etc/preloaded-classes, so we can configure different file per product. To override the default frameworks/base/preloaded-classes, just override in your product configuration makefile with PRODUCT_COPY_FILES before it inherits from build/target/product/base.mk: if there are multiple items in PRODUCT_COPY_FILES with the same destination, the first one takes precedence. Bug: 18305157 Change-Id: I937632b4a1aa73310ec90e73fd708fbd0c704a21
-rw-r--r--core/dex_preopt_libart.mk4
-rw-r--r--target/product/base.mk4
2 files changed, 7 insertions, 1 deletions
diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk
index 4e43a86..811062a 100644
--- a/core/dex_preopt_libart.mk
+++ b/core/dex_preopt_libart.mk
@@ -16,7 +16,9 @@ DEX2OAT_DEPENDENCY += $(DEX2OAT)
DEX2OATD_DEPENDENCY := $(DEX2OAT_DEPENDENCY)
DEX2OATD_DEPENDENCY += $(DEX2OATD)
-PRELOADED_CLASSES := frameworks/base/preloaded-classes
+# Use the first preloaded-classes file in PRODUCT_COPY_FILES.
+PRELOADED_CLASSES := $(call word-colon,1,$(firstword \
+ $(filter %system/etc/preloaded-classes,$(PRODUCT_COPY_FILES))))
# start of image reserved address space
LIBART_IMG_HOST_BASE_ADDRESS := 0x60000000
diff --git a/target/product/base.mk b/target/product/base.mk
index 9713330..d6fb66a 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -115,4 +115,8 @@ PRODUCT_PACKAGES += \
wm
+PRODUCT_COPY_FILES := \
+ frameworks/base/preloaded-classes:system/etc/preloaded-classes
+
+
$(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk)