Merge "Add debug ramdisk variant."
This commit is contained in:
@@ -85,6 +85,9 @@ type prebuiltEtcProperties struct {
|
||||
// the recovery variant instead.
|
||||
Vendor_ramdisk_available *bool
|
||||
|
||||
// Make this module available when building for debug ramdisk.
|
||||
Debug_ramdisk_available *bool
|
||||
|
||||
// Make this module available when building for recovery.
|
||||
Recovery_available *bool
|
||||
|
||||
@@ -160,6 +163,18 @@ func (p *PrebuiltEtc) InstallInVendorRamdisk() bool {
|
||||
return p.inVendorRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) inDebugRamdisk() bool {
|
||||
return p.ModuleBase.InDebugRamdisk() || p.ModuleBase.InstallInDebugRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) onlyInDebugRamdisk() bool {
|
||||
return p.ModuleBase.InstallInDebugRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) InstallInDebugRamdisk() bool {
|
||||
return p.inDebugRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) inRecovery() bool {
|
||||
return p.ModuleBase.InRecovery() || p.ModuleBase.InstallInRecovery()
|
||||
}
|
||||
@@ -178,7 +193,7 @@ func (p *PrebuiltEtc) ImageMutatorBegin(ctx android.BaseModuleContext) {}
|
||||
|
||||
func (p *PrebuiltEtc) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
|
||||
return !p.ModuleBase.InstallInRecovery() && !p.ModuleBase.InstallInRamdisk() &&
|
||||
!p.ModuleBase.InstallInVendorRamdisk()
|
||||
!p.ModuleBase.InstallInVendorRamdisk() && !p.ModuleBase.InstallInDebugRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
|
||||
@@ -189,6 +204,10 @@ func (p *PrebuiltEtc) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext)
|
||||
return proptools.Bool(p.properties.Vendor_ramdisk_available) || p.ModuleBase.InstallInVendorRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) DebugRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
|
||||
return proptools.Bool(p.properties.Debug_ramdisk_available) || p.ModuleBase.InstallInDebugRamdisk()
|
||||
}
|
||||
|
||||
func (p *PrebuiltEtc) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
|
||||
return proptools.Bool(p.properties.Recovery_available) || p.ModuleBase.InstallInRecovery()
|
||||
}
|
||||
@@ -314,6 +333,9 @@ func (p *PrebuiltEtc) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
if p.inVendorRamdisk() && !p.onlyInVendorRamdisk() {
|
||||
nameSuffix = ".vendor_ramdisk"
|
||||
}
|
||||
if p.inDebugRamdisk() && !p.onlyInDebugRamdisk() {
|
||||
nameSuffix = ".debug_ramdisk"
|
||||
}
|
||||
if p.inRecovery() && !p.onlyInRecovery() {
|
||||
nameSuffix = ".recovery"
|
||||
}
|
||||
|
Reference in New Issue
Block a user