Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 859cdef8 authored by Spandan Das's avatar Spandan Das
Browse files

Add vendor to list of supported partitions in gen_build_prop.py

The kati built vendor.img will still use the kati built vendor
build.prop file, but the soong built vendor.img will use an
autogenerated `build_prop` module for vendor

This CL should be a noop for now

Bug: 374371755
Test: diff in contents for aosp_cf_x86_64_phone https://paste.googleplex.com/5766413037076480
Summary
- timestamp change (expected)
- ro.hwui.use_vulkan changes from "" to false, but I think this is
  functionally equivalent
Test: presubmits

Change-Id: I10bc5b6e8d48b86fa70d5ab0722fee658b1a224a
parent 0ba7034b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ func (p *buildPropModule) propFiles(ctx ModuleContext) Paths {
		return ctx.Config().ProductPropFiles(ctx)
	} else if partition == "odm" {
		return ctx.Config().OdmPropFiles(ctx)
	} else if partition == "vendor" {
		// TODO (b/375500423): Add android-info.txt to prop files
		return ctx.Config().VendorPropFiles(ctx)
	}
	return nil
}
@@ -104,6 +107,7 @@ var validPartitions = []string{
	"system_ext",
	"product",
	"odm",
	"vendor",
}

func (p *buildPropModule) GenerateAndroidBuildActions(ctx ModuleContext) {
+4 −0
Original line number Diff line number Diff line
@@ -2195,6 +2195,10 @@ func (c *config) OdmPropFiles(ctx PathContext) Paths {
	return PathsForSource(ctx, c.productVariables.OdmPropFiles)
}

func (c *config) VendorPropFiles(ctx PathContext) Paths {
	return PathsForSource(ctx, c.productVariables.VendorPropFiles)
}

func (c *config) ExtraAllowedDepsTxt() string {
	return String(c.productVariables.ExtraAllowedDepsTxt)
}
+1 −0
Original line number Diff line number Diff line
@@ -521,6 +521,7 @@ type ProductVariables struct {
	SystemExtPropFiles []string `json:",omitempty"`
	ProductPropFiles   []string `json:",omitempty"`
	OdmPropFiles       []string `json:",omitempty"`
	VendorPropFiles    []string `json:",omitempty"`

	EnableUffdGc *string `json:",omitempty"`

+2 −4
Original line number Diff line number Diff line
@@ -524,7 +524,6 @@ def build_system_ext_prop(args):

  build_prop(args, gen_build_info=False, gen_common_build_props=True, variables=variables)

'''
def build_vendor_prop(args):
  config = args.config

@@ -541,7 +540,6 @@ def build_vendor_prop(args):
    ]

  build_prop(args, gen_build_info=False, gen_common_build_props=True, variables=variables)
'''

def build_product_prop(args):
  config = args.config
@@ -608,8 +606,8 @@ def main():
        build_odm_prop(args)
      case "product":
        build_product_prop(args)
      # case "vendor":  # NOT IMPLEMENTED
      #  build_vendor_prop(args)
      case "vendor":
        build_vendor_prop(args)
      case _:
        sys.exit(f"not supported partition {args.partition}")