Merge changes I11693286,I8d79a434

* changes:
  VNDK libs use "unique" APEX variants
  use_vndk_as_stable APEX shouldn't include VNDK lib
This commit is contained in:
Jooyung Han
2022-02-08 01:03:41 +00:00
committed by Gerrit Code Review
3 changed files with 130 additions and 20 deletions

View File

@@ -3465,6 +3465,14 @@ func (c *Module) AlwaysRequiresPlatformApexVariant() bool {
return c.IsStubs() || c.Target().NativeBridge == android.NativeBridgeEnabled
}
// Overrides android.ApexModuleBase.UniqueApexVariations
func (c *Module) UniqueApexVariations() bool {
// When a vendor APEX needs a VNDK lib in it (use_vndk_as_stable: false), it should be a unique
// APEX variation. Otherwise, another vendor APEX with use_vndk_as_stable:true may use a wrong
// variation of the VNDK lib because APEX variations are merged/grouped.
return c.UseVndk() && c.IsVndk()
}
var _ snapshot.RelativeInstallPath = (*Module)(nil)
type moduleType int