summaryrefslogtreecommitdiff
path: root/java/dexpreopt_bootjars.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/dexpreopt_bootjars.go')
-rw-r--r--java/dexpreopt_bootjars.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 7877031f8..9f49786ba 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -266,12 +266,13 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
}
// Check that this module satisfies constraints for a particular boot image.
- apex, isApexModule := module.(android.ApexModule)
- fromUpdatableApex := isApexModule && apex.Updatable()
+ _, isApexModule := module.(android.ApexModule)
+ apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo)
+ fromUpdatableApex := isApexModule && apexInfo.Updatable
if image.name == artBootImageName {
- if isApexModule && len(apex.InApexes()) > 0 && allHavePrefix(apex.InApexes(), "com.android.art.") {
+ if isApexModule && len(apexInfo.InApexes) > 0 && allHavePrefix(apexInfo.InApexes, "com.android.art.") {
// ok: found the jar in the ART apex
- } else if isApexModule && apex.IsForPlatform() && isHostdex(module) {
+ } else if isApexModule && apexInfo.IsForPlatform() && isHostdex(module) {
// exception (skip and continue): special "hostdex" platform variant
return -1, nil
} else if name == "jacocoagent" && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT_FRAMEWORK") {
@@ -279,7 +280,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
return -1, nil
} else if fromUpdatableApex {
// error: this jar is part of an updatable apex other than ART
- ctx.Errorf("module %q from updatable apexes %q is not allowed in the ART boot image", name, apex.InApexes())
+ ctx.Errorf("module %q from updatable apexes %q is not allowed in the ART boot image", name, apexInfo.InApexes)
} else {
// error: this jar is part of the platform or a non-updatable apex
ctx.Errorf("module %q is not allowed in the ART boot image", name)
@@ -289,7 +290,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
// ok: this jar is part of the platform or a non-updatable apex
} else {
// error: this jar is part of an updatable apex
- ctx.Errorf("module %q from updatable apexes %q is not allowed in the framework boot image", name, apex.InApexes())
+ ctx.Errorf("module %q from updatable apexes %q is not allowed in the framework boot image", name, apexInfo.InApexes)
}
} else {
panic("unknown boot image: " + image.name)