Merge "A test cc module is installable even if it's not available for platform" am: eecf99ce66 am: 931f464856 am: 918864fa22

Change-Id: I3faf4756c989e38a975b36e168e9bd1dbd7af98a
This commit is contained in:
Automerger Merge Worker 2020-01-13 01:01:51 +00:00
commit 5f70666484

View file

@ -2460,7 +2460,25 @@ func (c *Module) AvailableFor(what string) bool {
}
func (c *Module) installable() bool {
return c.installer != nil && !c.Properties.PreventInstall && c.IsForPlatform() && c.outputFile.Valid()
ret := c.installer != nil && !c.Properties.PreventInstall && c.outputFile.Valid()
// The platform variant doesn't need further condition. Apex variants however might not
// be installable because it will likely to be included in the APEX and won't appear
// in the system partition.
if c.IsForPlatform() {
return ret
}
// Special case for modules that are configured to be installed to /data, which includes
// test modules. For these modules, both APEX and non-APEX variants are considered as
// installable. This is because even the APEX variants won't be included in the APEX, but
// will anyway be installed to /data/*.
// See b/146995717
if c.InstallInData() {
return ret
}
return false
}
func (c *Module) AndroidMkWriteAdditionalDependenciesForSourceAbiDiff(w io.Writer) {