Fix passing dex_preopt value to make
dex_preopt defaults to true, only pass LOCAL_DEX_PREOPT := false
if dex_preopt is explcitly set to false.
Test: m, examine framework.jar
Change-Id: Ica6ce06d14bbc720da9c5b26559b9768a8a7f5a8
diff --git a/java/androidmk.go b/java/androidmk.go
index 1c0526a..1a4b27d 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -36,7 +36,7 @@
}
if library.dexJarFile != nil {
fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
- if library.deviceProperties.Dex_preopt == nil || *library.deviceProperties.Dex_preopt == false {
+ if library.deviceProperties.Dex_preopt != nil && *library.deviceProperties.Dex_preopt == false {
fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
}
}