Remove some global state from vendor and recovery snapshots

Snapshots storead global sets of modules that should be replaced with
vendor snapshot modules.  Move the data instead to a vendor_snapshot
or recovery_snapshot module type that depends on all the modules in
the snapshot, and then have modules that should use the snaphsot
depend on it to query for the set of modules that should be replaced.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: I2826adacfb473e9139b5ea93ba83b8a54cc1a56b
This commit is contained in:
Colin Cross
2021-01-11 17:31:17 -08:00
committed by Inseob Kim
parent 9da4aa8166
commit e0edaf9d49
6 changed files with 325 additions and 377 deletions

View File

@@ -75,5 +75,7 @@ func sdkMutator(ctx android.BottomUpMutatorContext) {
}
ctx.AliasVariation("")
}
case *snapshot:
ctx.CreateVariations("")
}
}