Add android_system_image_defaults

Bug: 330665150
Test: go test ./... under filesystem
Change-Id: Id32e6563491a3d129042de4a9517c545543a022d
This commit is contained in:
Jiyong Park
2024-03-31 21:27:45 +09:00
parent 4d4eb59a2b
commit eaac823f19
3 changed files with 86 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ import (
type systemImage struct {
filesystem
android.DefaultableModuleBase
properties systemImageProperties
}
@@ -39,6 +40,7 @@ func systemImageFactory() android.Module {
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) buildLinkerConfigFile(ctx android.ModuleContext, root andr
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
}