Enforce updatable=true on apps of updatable apexes

- Update apex_info (a topdown mutator) so that it sets updatable=true on
  apps of updatable apexes
- Write a unit test that tests different combinations of
  updatable/non-updatable apks-in-apexes
- Update an existing unit test that asserts a different error

Test: go test ./java
Test: m nothing (in internal)
Bug: 209409604

Change-Id: Ie8881b857afcec44addf27fc360c5b8abf726bd2
This commit is contained in:
Spandan Das
2022-05-06 22:12:55 +00:00
parent 2e8c044b2c
commit 42e89508ee
3 changed files with 86 additions and 1 deletions

View File

@@ -838,6 +838,10 @@ func (a *AndroidApp) Updatable() bool {
return Bool(a.appProperties.Updatable)
}
func (a *AndroidApp) SetUpdatable(val bool) {
a.appProperties.Updatable = &val
}
func (a *AndroidApp) getCertString(ctx android.BaseModuleContext) string {
certificate, overridden := ctx.DeviceConfig().OverrideCertificateFor(ctx.ModuleName())
if overridden {