Allow skipping android.car-module library in PRODUCT_APEX_BOOT_JARS

- The library is added to bootclass path only for car product
  through com.android.car.framework apex module
- Ignore it even if it is not in PRODUCT_APEX_BOOT_JARS for
  non-car builds

Bug: 202345178
Bug: 202896428
Test: test boot up for non-car build
Change-Id: I4ba86b4c7f4d4005add9bb5c415aed39f119af0c
This commit is contained in:
Keun young Park
2021-10-14 15:42:04 -07:00
committed by Keun-young Park
parent e4723cdbf9
commit 5979996e64

View File

@@ -619,6 +619,10 @@ func (b *BootclasspathFragmentModule) configuredJars(ctx android.ModuleContext)
} else if global.ApexBootJars.Len() != 0 && !android.IsModuleInVersionedSdk(ctx.Module()) {
unknown = android.RemoveListFromList(unknown, b.properties.Coverage.Contents)
_, unknown = android.RemoveFromList("core-icu4j", unknown)
// This module only exists in car products.
// So ignore it even if it is not in PRODUCT_APEX_BOOT_JARS.
// TODO(b/202896428): Add better way to handle this.
_, unknown = android.RemoveFromList("android.car-module", unknown)
if len(unknown) > 0 {
ctx.ModuleErrorf("%s in contents must also be declared in PRODUCT_APEX_BOOT_JARS", unknown)
}