diff options
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/base.go b/java/base.go index ff7e06837..86ed0e745 100644 --- a/java/base.go +++ b/java/base.go @@ -1790,14 +1790,14 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath classesJar: outputFile, jarName: jarName, } - if j.GetProfileGuided() && j.optimizeOrObfuscateEnabled() && !j.EnableProfileRewriting() { + if j.GetProfileGuided(ctx) && j.optimizeOrObfuscateEnabled() && !j.EnableProfileRewriting(ctx) { ctx.PropertyErrorf("enable_profile_rewriting", "Enable_profile_rewriting must be true when profile_guided dexpreopt and R8 optimization/obfuscation is turned on. The attached profile should be sourced from an unoptimized/unobfuscated APK.", ) } - if j.EnableProfileRewriting() { - profile := j.GetProfile() - if profile == "" || !j.GetProfileGuided() { + if j.EnableProfileRewriting(ctx) { + profile := j.GetProfile(ctx) + if profile == "" || !j.GetProfileGuided(ctx) { ctx.PropertyErrorf("enable_profile_rewriting", "Profile and Profile_guided must be set when enable_profile_rewriting is true") } params.artProfileInput = &profile |