Enable app image startup cache for preopted apps
To get performance benefits here for apps that aren't installed
through the play store.
Bug: 130217075
Bug: 131310042
Test: make
Change-Id: I46dc3e4a588be52f359577ca1f0fd2dcd440c4bf
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go
index 01ee15e..5b658d9 100644
--- a/dexpreopt/dexpreopt.go
+++ b/dexpreopt/dexpreopt.go
@@ -461,6 +461,9 @@
appImageInstallPath := pathtools.ReplaceExtension(odexInstallPath, "art")
cmd.FlagWithOutput("--app-image-file=", appImagePath).
FlagWithArg("--image-format=", "lz4")
+ if !global.DontResolveStartupStrings {
+ cmd.FlagWithArg("--resolve-startup-const-strings=", "true")
+ }
rule.Install(appImagePath, appImageInstallPath)
}