summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dennis Shen <dzshen@google.com> 2024-09-12 22:05:08 +0000
committer Dennis Shen <dzshen@google.com> 2024-09-12 23:31:49 +0000
commit01efb834208f02892bf6b3d316c02fd44ea91af3 (patch)
treebc295748aca1d78ec7fd09224e5a442431dcd8df
parentd4771aa26761f150a08886501eb5234288202ef7 (diff)
Treat system_ext as system container
Bug: b/365135457 Test: m Change-Id: Ic8fd60c0e1045f190b6608931ca1d65a784026f0
-rw-r--r--aconfig/aconfig_declarations.go7
-rw-r--r--aconfig/codegen/java_aconfig_library_test.go2
-rw-r--r--android/aconfig_providers.go3
3 files changed, 10 insertions, 2 deletions
diff --git a/aconfig/aconfig_declarations.go b/aconfig/aconfig_declarations.go
index 250fd56d1..d9a862c02 100644
--- a/aconfig/aconfig_declarations.go
+++ b/aconfig/aconfig_declarations.go
@@ -88,6 +88,13 @@ func (module *DeclarationsModule) DepsMutator(ctx android.BottomUpMutatorContext
ctx.PropertyErrorf("container", "missing container property")
}
+ // treating system_ext as system partition as we are combining them as one container
+ // TODO remove this logic once we start enforcing that system_ext cannot be specified as
+ // container in the container field.
+ if module.properties.Container == "system_ext" {
+ module.properties.Container = "system"
+ }
+
// Add a dependency on the aconfig_value_sets defined in
// RELEASE_ACONFIG_VALUE_SETS, and add any aconfig_values that
// match our package.
diff --git a/aconfig/codegen/java_aconfig_library_test.go b/aconfig/codegen/java_aconfig_library_test.go
index 87b54a47f..d8372f3c9 100644
--- a/aconfig/codegen/java_aconfig_library_test.go
+++ b/aconfig/codegen/java_aconfig_library_test.go
@@ -260,7 +260,7 @@ func TestMkEntriesMatchedContainer(t *testing.T) {
aconfig_declarations {
name: "my_aconfig_declarations_bar",
package: "com.example.package.bar",
- container: "system_ext",
+ container: "vendor",
srcs: ["bar.aconfig"],
}
diff --git a/android/aconfig_providers.go b/android/aconfig_providers.go
index cb88e011c..d2a9622e3 100644
--- a/android/aconfig_providers.go
+++ b/android/aconfig_providers.go
@@ -233,7 +233,8 @@ func getAconfigFilePaths(m *ModuleBase, aconfigFiles map[string]Paths) (paths Pa
} else if m.ProductSpecific() {
container = "product"
} else if m.SystemExtSpecific() {
- container = "system_ext"
+ // system_ext and system partitions should be treated as one container
+ container = "system"
}
paths = append(paths, aconfigFiles[container]...)