Treat "apex" system_ext the same as platform
Change https://r.android.com/1672245 added support to treat
system_ext:foo in the boot jars configuration the same as platform:foo,
at least for dexpreopt_bootjars.go's getBootJar.
This change replicates that mechanism in platform_bootclasspath and as
that now handles hidden API processing also made a similar change in
the isModuleInConfiguredList function.
Bug: 177892522
Bug: 154976937
Test: m nothing
Change-Id: I105f4fbaa3b0355b013b7c5618d218d888faefb6
diff --git a/java/bootclasspath.go b/java/bootclasspath.go
index f03a673..f1a0bb5 100644
--- a/java/bootclasspath.go
+++ b/java/bootclasspath.go
@@ -69,13 +69,13 @@
// addDependencyOntoApexModulePair adds a dependency onto the specified APEX specific variant or the
// specified module.
//
-// If apex="platform" then this adds a dependency onto the platform variant of the module. This adds
-// dependencies onto the prebuilt and source modules with the specified name, depending on which
-// ones are available. Visiting must use isActiveModule to select the preferred module when both
-// source and prebuilt modules are available.
+// If apex="platform" or "system_ext" then this adds a dependency onto the platform variant of the
+// module. This adds dependencies onto the prebuilt and source modules with the specified name,
+// depending on which ones are available. Visiting must use isActiveModule to select the preferred
+// module when both source and prebuilt modules are available.
func addDependencyOntoApexModulePair(ctx android.BottomUpMutatorContext, apex string, name string, tag blueprint.DependencyTag) {
var variations []blueprint.Variation
- if apex != "platform" {
+ if apex != "platform" && apex != "system_ext" {
// Pick the correct apex variant.
variations = []blueprint.Variation{
{Mutator: "apex", Variation: apex},
@@ -124,6 +124,9 @@
//
// If this is not specified then it defaults to "platform" which will cause a dependency to be
// added to the module's platform variant.
+ //
+ // A value of system_ext should be used for any module that will be part of the system_ext
+ // partition.
Apex *string
// The name of the module.