summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index 9111c309f..f973cf45a 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -97,10 +97,21 @@ func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo
func (s *SystemServerClasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
global := dexpreopt.GetGlobalConfig(ctx)
+ // Convert content names to their appropriate stems, in case a test library is overriding an actual boot jar
+ var stems []string
+ for _, name := range s.properties.Contents {
+ dep := ctx.GetDirectDepWithTag(name, systemServerClasspathFragmentContentDepTag)
+ if m, ok := dep.(ModuleWithStem); ok {
+ stems = append(stems, m.Stem())
+ } else {
+ ctx.PropertyErrorf("contents", "%v is not a ModuleWithStem", name)
+ }
+ }
+
// Only create configs for updatable boot jars. Non-updatable system server jars must be part of the
// platform_systemserverclasspath's classpath proto config to guarantee that they come before any
// updatable jars at runtime.
- return global.UpdatableSystemServerJars.Filter(s.properties.Contents)
+ return global.UpdatableSystemServerJars.Filter(stems)
}
type systemServerClasspathFragmentContentDependencyTag struct {