Rename ART release APEX to com.android.art.
Test: See https://r.android.com/1457217
Bug: 169639321
Change-Id: I6800c7a382486b4e50945cc8b789f4be16482fe6
Merged-In: I6800c7a382486b4e50945cc8b789f4be16482fe6
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 9f49786..629d34f 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -270,7 +270,7 @@
apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo)
fromUpdatableApex := isApexModule && apexInfo.Updatable
if image.name == artBootImageName {
- if isApexModule && len(apexInfo.InApexes) > 0 && allHavePrefix(apexInfo.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 && apexInfo.IsForPlatform() && isHostdex(module) {
// exception (skip and continue): special "hostdex" platform variant
@@ -301,7 +301,7 @@
func allHavePrefix(list []string, prefix string) bool {
for _, s := range list {
- if !strings.HasPrefix(s, prefix) {
+ if s != prefix && !strings.HasPrefix(s, prefix+".") {
return false
}
}