Merge changes I4ffe5630,I2e77e21c into main
* changes:
Disable checkSystemServerOrder
Fix missing variation error in addDependenciesOntoSelectedBootImageApexes
diff --git a/dexpreopt/dexpreopt.go b/dexpreopt/dexpreopt.go
index e882470..1452b41 100644
--- a/dexpreopt/dexpreopt.go
+++ b/dexpreopt/dexpreopt.go
@@ -284,7 +284,8 @@
clcTargetString := "PCL[" + strings.Join(clcTarget, ":") + "]"
if systemServerClasspathJars.ContainsJar(module.Name) {
- checkSystemServerOrder(ctx, jarIndex)
+ // TODO(b/397461231): renable this check
+ //checkSystemServerOrder(ctx, jarIndex)
} else {
// Standalone jars are loaded by separate class loaders with SYSTEMSERVERCLASSPATH as the
// parent.
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 27027f0..313d8c7 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -554,7 +554,10 @@
typ: dexpreoptBootJar,
}
- ctx.AddFarVariationDependencies(ctx.Target().Variations(), tag, android.RemoveOptionalPrebuiltPrefix(selected))
+ dep := android.RemoveOptionalPrebuiltPrefix(selected)
+ if ctx.OtherModuleDependencyVariantExists(ctx.Target().Variations(), dep) {
+ ctx.AddFarVariationDependencies(ctx.Target().Variations(), tag, dep)
+ }
}
}
}