Make car apex's library optional in PRODUCT_APEX_SYSTEM_SERVER_JARS

- car-frameworks-service-module is added from com.android.car.framework
  apex which only exisits in car products.

Bug: 203233647
Bug: 203201931
Test: build, bootup
Change-Id: I5f13b0505c1ac4fd2fd7b6559e080c8a6fb526e0
Merged-In: I5f13b0505c1ac4fd2fd7b6559e080c8a6fb526e0
(cherry picked from commit 6e3ba9ac3b)
This commit is contained in:
Keun young Park
2021-10-18 08:42:23 -07:00
committed by Samiul Islam
parent df27b7a1e0
commit d64ab233e4

View File

@@ -120,7 +120,10 @@ func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext)
jars, unknown := global.ApexSystemServerJars.Filter(possibleUpdatableModules)
// TODO(satayev): remove geotz ssc_fragment, since geotz is not part of SSCP anymore.
_, unknown = android.RemoveFromList("geotz", unknown)
// This module only exists in car products.
// So ignore it even if it is not in PRODUCT_APEX_SYSTEM_SERVER_JARS.
// TODO(b/203233647): Add better mechanism to make it optional.
_, unknown = android.RemoveFromList("car-frameworks-service-module", unknown)
// For non test apexes, make sure that all contents are actually declared in make.
if global.ApexSystemServerJars.Len() > 0 && len(unknown) > 0 && !android.IsModuleInVersionedSdk(ctx.Module()) {
ctx.ModuleErrorf("%s in contents must also be declared in PRODUCT_APEX_SYSTEM_SERVER_JARS", unknown)