Pass --dex-location when processing prebuilt profiles
The apk name does not match the install location at the stage we are
processing profiles. This causes the wrong profile key to be used in the
final profile which may generate an empty app image.
Test: m; flash, dumpsys dexopt and check for speed-profile
check that the app image is not empty
Bug: 78515726
Change-Id: Ic5d71296583be71d96f0e7a2dd59753f1d23c350
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index faaa5ad..5528eda 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -159,6 +159,7 @@
--copy-and-update-profile-key \
--profile-file=$(PRIVATE_SOURCE_CLASSES) \
--apk=$(PRIVATE_BUILT_MODULE) \
+ --dex-location=$(PRIVATE_DEX_LOCATION) \
--reference-profile-file=$@ \
|| echo "Profile out of date for $(PRIVATE_BUILT_MODULE)"
endif