Implement directed recovery snapshot.

Bug: 177451657
Test: m -j nothing
Change-Id: I0b84c34fb2e9e9340d9f9e7405428cd2cc4d43b5
This commit is contained in:
Jose Galmes
2021-02-09 07:44:30 -08:00
parent 320e170675
commit 4c6895e5a3
4 changed files with 99 additions and 2 deletions

View File

@@ -195,8 +195,12 @@ func (recoverySnapshotImage) targetSnapshotVersion(cfg android.DeviceConfig) str
}
func (recoverySnapshotImage) excludeFromDirectedSnapshot(cfg android.DeviceConfig, name string) bool {
// directed recovery snapshot is not implemented yet
return false
// If we're using full snapshot, not directed snapshot, capture every module
if !cfg.DirectedRecoverySnapshot() {
return false
}
// Else, checks if name is in RECOVERY_SNAPSHOT_MODULES.
return !cfg.RecoverySnapshotModules()[name]
}
func (recoverySnapshotImage) imageVariantName(cfg android.DeviceConfig) string {