dexpreopt.config should be created even though unbundled image is built

Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I36a6e8b10b9922cc5522accaf90af1aa05049a86
This commit is contained in:
Jeongik Cha
2021-06-08 11:35:00 +09:00
parent 257608f993
commit 4b073cd083
4 changed files with 15 additions and 8 deletions

View File

@@ -141,10 +141,9 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
}
}
// If it is neither app nor test, make config files regardless of its dexpreopt setting.
// If it is test, make config files regardless of its dexpreopt setting.
// The config files are required for apps defined in make which depend on the lib.
// TODO(b/158843648): The config for apps should be generated as well regardless of setting.
if (d.isApp || d.isTest) && d.dexpreoptDisabled(ctx) {
if d.isTest && d.dexpreoptDisabled(ctx) {
return
}