diff options
| -rw-r--r-- | core/definitions.mk | 8 | ||||
| -rw-r--r-- | core/dex_preopt_odex_install.mk | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/core/definitions.mk b/core/definitions.mk index 5c3a074b73..6a5908a3da 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -539,6 +539,14 @@ $(strip \ endef ########################################################### +## Convert install path to on-device path. +########################################################### +# $(1): install path +define install-path-to-on-device-path +$(patsubst $(PRODUCT_OUT)%,%,$(1)) +endef + +########################################################### ## The intermediates directory. Where object files go for ## a given target. We could technically get away without ## the "_intermediates" suffix on the directory, but it's diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index 6300e780d9..440ffd99a3 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -235,8 +235,9 @@ ifdef LOCAL_DEX_PREOPT $(call add_json_map, LibraryPaths) $(foreach lib,$(my_dexpreopt_libs),\ $(call add_json_map, $(lib)) \ - $(call add_json_str, Host, $(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar) \ - $(call add_json_str, Device, /system/framework/$(lib).jar) \ + $(eval file := $(filter %/$(lib).jar, $(call module-installed-files,$(lib)))) \ + $(call add_json_str, Host, $(call intermediates-dir-for,JAVA_LIBRARIES,$(lib),,COMMON)/javalib.jar) \ + $(call add_json_str, Device, $(call install-path-to-on-device-path,$(file))) \ $(call end_json_map)) $(call end_json_map) $(call add_json_list, Archs, $(my_dexpreopt_archs)) |