Merge "Make SystemServerJars ConfiguredJarList."

This commit is contained in:
satayev
2021-05-06 11:32:39 +00:00
committed by Gerrit Code Review
4 changed files with 10 additions and 11 deletions

View File

@@ -150,7 +150,7 @@ func (d *dexpreopter) dexpreopt(ctx android.ModuleContext, dexJarFile android.Wr
global := dexpreopt.GetGlobalConfig(ctx)
isSystemServerJar := inList(ctx.ModuleName(), global.SystemServerJars)
isSystemServerJar := global.SystemServerJars.ContainsJar(ctx.ModuleName())
bootImage := defaultBootImageConfig(ctx)
if global.UseArtImage {

View File

@@ -39,10 +39,9 @@ func systemServerClasspath(ctx android.PathContext) []string {
// 2) The jars that are from an updatable apex.
systemServerClasspathLocations = append(systemServerClasspathLocations,
global.UpdatableSystemServerJars.DevicePaths(ctx.Config(), android.Android)...)
if len(systemServerClasspathLocations) != len(global.SystemServerJars)+global.UpdatableSystemServerJars.Len() {
panic(fmt.Errorf("Wrong number of system server jars, got %d, expected %d",
len(systemServerClasspathLocations),
len(global.SystemServerJars)+global.UpdatableSystemServerJars.Len()))
if expectedLen := global.SystemServerJars.Len() + global.UpdatableSystemServerJars.Len(); expectedLen != len(systemServerClasspathLocations) {
panic(fmt.Errorf("wrong number of system server jars, got %d, expected %d", len(systemServerClasspathLocations), expectedLen))
}
return systemServerClasspathLocations
})