diff options
author | 2024-06-13 21:25:45 +0000 | |
---|---|---|
committer | 2024-06-13 21:56:23 +0000 | |
commit | 7583e835f79e74119ef9c96a4c7c4815b4547b0c (patch) | |
tree | 7a4266c6ae07010102d6e96f79a540fa31e9e485 /rust/image.go | |
parent | 71825167e0b4a9f078daf5872ea148b43b86b298 (diff) |
Cleanup ImageInterface.SetImageVariation
This change modifies the interface method of
ImageInterface.SetImageVariation so that the image variation is set
directly at the caller image variation module, instead of passing the
pointer to set the image variation.
Test: m nothing
Change-Id: I8eadb5149365530243e19a8cd37eb49d335fbeef
Diffstat (limited to 'rust/image.go')
-rw-r--r-- | rust/image.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/rust/image.go b/rust/image.go index e0d267d61..fec6d92d8 100644 --- a/rust/image.go +++ b/rust/image.go @@ -197,21 +197,20 @@ func (mod *Module) InVendorOrProduct() bool { return mod.InVendor() || mod.InProduct() } -func (mod *Module) SetImageVariation(ctx android.BaseModuleContext, variant string, module android.Module) { - m := module.(*Module) +func (mod *Module) SetImageVariation(ctx android.BaseModuleContext, variant string) { if variant == android.VendorRamdiskVariation { - m.MakeAsPlatform() + mod.MakeAsPlatform() } else if variant == android.RecoveryVariation { - m.MakeAsPlatform() + mod.MakeAsPlatform() } else if strings.HasPrefix(variant, cc.VendorVariation) { - m.Properties.ImageVariation = cc.VendorVariation + mod.Properties.ImageVariation = cc.VendorVariation if strings.HasPrefix(variant, cc.VendorVariationPrefix) { - m.Properties.VndkVersion = strings.TrimPrefix(variant, cc.VendorVariationPrefix) + mod.Properties.VndkVersion = strings.TrimPrefix(variant, cc.VendorVariationPrefix) } } else if strings.HasPrefix(variant, cc.ProductVariation) { - m.Properties.ImageVariation = cc.ProductVariation + mod.Properties.ImageVariation = cc.ProductVariation if strings.HasPrefix(variant, cc.ProductVariationPrefix) { - m.Properties.VndkVersion = strings.TrimPrefix(variant, cc.ProductVariationPrefix) + mod.Properties.VndkVersion = strings.TrimPrefix(variant, cc.ProductVariationPrefix) } } } |