Autogenerate a vendor/ partition

Test: presubmits
Bug: 374371755
Change-Id: Ie2825021fa17cb4e62aaa72246819a670981ecb8
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index f81589f..ffc3802 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -101,6 +101,9 @@
 		if ctx.DeviceConfig().SystemExtPath() == "system_ext" {
 			generatedPartitions = append(generatedPartitions, "system_ext")
 		}
+		if ctx.DeviceConfig().VendorPath() == "vendor" {
+			generatedPartitions = append(generatedPartitions, "vendor")
+		}
 
 		return &FsGenState{
 			depCandidates: candidates,
@@ -328,7 +331,7 @@
 		Name: proptools.StringPtr(generatedModuleName(ctx.Config(), "device")),
 	}
 
-	// Currently, only the system and system_ext partition module is created.
+	// Currently, only a select set of partitions like system, system_ext is created.
 	partitionProps := &filesystem.PartitionNameProperties{}
 	if android.InList("system", f.properties.Generated_partition_types) {
 		partitionProps.System_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system"))
@@ -336,6 +339,9 @@
 	if android.InList("system_ext", f.properties.Generated_partition_types) {
 		partitionProps.System_ext_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system_ext"))
 	}
+	if android.InList("vendor", f.properties.Generated_partition_types) {
+		partitionProps.Vendor_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "vendor"))
+	}
 
 	ctx.CreateModule(filesystem.AndroidDeviceFactory, baseProps, partitionProps)
 }