Add android_system_image_defaults
Bug: 330665150
Test: go test ./... under filesystem
Change-Id: Id32e6563491a3d129042de4a9517c545543a022d
diff --git a/filesystem/system_image.go b/filesystem/system_image.go
index 5028a49..92bb206 100644
--- a/filesystem/system_image.go
+++ b/filesystem/system_image.go
@@ -21,6 +21,7 @@
type systemImage struct {
filesystem
+ android.DefaultableModuleBase
properties systemImageProperties
}
@@ -39,6 +40,7 @@
module.filesystem.buildExtraFiles = module.buildExtraFiles
module.filesystem.filterPackagingSpec = module.filterPackagingSpec
initFilesystemModule(&module.filesystem)
+ android.InitDefaultableModule(module)
return module
}
@@ -100,3 +102,17 @@
func (s *systemImage) filterPackagingSpec(ps android.PackagingSpec) bool {
return ps.Partition() == "system"
}
+
+type systemImageDefaults struct {
+ android.ModuleBase
+ android.DefaultsModuleBase
+}
+
+// android_system_image_defaults is a default module for android_system_image module.
+func systemImageDefaultsFactory() android.Module {
+ module := &systemImageDefaults{}
+ module.AddProperties(&android.PackagingProperties{})
+ module.AddProperties(&systemImageProperties{})
+ android.InitDefaultsModule(module)
+ return module
+}