Merge "Soong system image may update the $PRODUCT_OUT" into main
diff --git a/android/config.go b/android/config.go
index b682c2e..368e573 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1663,6 +1663,17 @@
return Bool(c.productVariables.TrimmedApex)
}
+func (c *config) UseSoongSystemImage() bool {
+ return Bool(c.productVariables.UseSoongSystemImage)
+}
+
+func (c *config) SoongDefinedSystemImage() string {
+ if c.UseSoongSystemImage() {
+ return String(c.productVariables.ProductSoongDefinedSystemImage)
+ }
+ return ""
+}
+
func (c *config) EnforceSystemCertificate() bool {
return Bool(c.productVariables.EnforceSystemCertificate)
}
diff --git a/android/variable.go b/android/variable.go
index b238c4a..e0d512d 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -423,6 +423,9 @@
TargetFSConfigGen []string `json:",omitempty"`
+ UseSoongSystemImage *bool `json:",omitempty"`
+ ProductSoongDefinedSystemImage *string `json:",omitempty"`
+
EnforceProductPartitionInterface *bool `json:",omitempty"`
EnforceInterPartitionJavaSdkLibrary *bool `json:",omitempty"`
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index a8f97e3..0b39062 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -136,9 +136,6 @@
// Install aconfig_flags.pb file for the modules installed in this partition.
Gen_aconfig_flags_pb *bool
- // Update the Base_dir of the $PRODUCT_OUT directory with the packaging files.
- Update_product_out *bool
-
Fsverity fsverityProperties
}
@@ -335,7 +332,7 @@
}
func (f *filesystem) copyFilesToProductOut(ctx android.ModuleContext, builder *android.RuleBuilder, rebasedDir android.OutputPath) {
- if !proptools.Bool(f.properties.Update_product_out) {
+ if f.Name() != ctx.Config().SoongDefinedSystemImage() {
return
}
installPath := android.PathForModuleInPartitionInstall(ctx, f.partitionName())