Support for recovery snapshot.

Bug: 171231437

Test: source build/envsetup.sh
Test: ALLOW_MISSING_DEPENDENCIES=true m -j nothing

Change-Id: I74636cf7f97e027a229a5ef7c776f2b7a42ead95
This commit is contained in:
Jose Galmes
2020-12-11 13:36:29 -08:00
parent e794b1e302
commit 6f843bc4ba
12 changed files with 520 additions and 119 deletions

View File

@@ -75,7 +75,15 @@ func (g *GenruleExtraProperties) VendorRamdiskVariantNeeded(ctx android.BaseModu
}
func (g *GenruleExtraProperties) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return Bool(g.Recovery_available)
// If the build is using a snapshot, the recovery variant under AOSP directories
// is not needed.
recoverySnapshotVersion := ctx.DeviceConfig().RecoverySnapshotVersion()
if recoverySnapshotVersion != "current" && recoverySnapshotVersion != "" &&
!isRecoveryProprietaryModule(ctx) {
return false
} else {
return Bool(g.Recovery_available)
}
}
func (g *GenruleExtraProperties) ExtraImageVariations(ctx android.BaseModuleContext) []string {