soong: Align update boot jar variable with system_server jar

Use apex:jar pair values for updatable boot jars to align with
updatable system_server values.

Test: Compiles & flashed device. Ensured that the bootclasspath & system_server class
paths remain the same.

Change-Id: I1d6dfe3325d9091b7c724458be4e6471f9086666
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index 4747c64..4dd7cfe 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -78,9 +78,8 @@
 				filepath.Join("/system/framework", m+".jar"))
 		}
 		for _, m := range global.UpdatableSystemServerJars {
-			apex, jar := dexpreopt.SplitApexJarPair(m)
 			systemServerClasspathLocations = append(systemServerClasspathLocations,
-				filepath.Join("/apex", apex, "javalib", jar+".jar"))
+				dexpreopt.GetJarLocationFromApexJarPair(m))
 		}
 		return systemServerClasspathLocations
 	})
@@ -111,6 +110,15 @@
 	return moduleName
 }
 
+func getJarsFromApexJarPairs(apexJarPairs []string) []string {
+	modules := make([]string, len(apexJarPairs))
+	for i, p := range apexJarPairs {
+		_, jar := dexpreopt.SplitApexJarPair(p)
+		modules[i] = jar
+	}
+	return modules
+}
+
 // Construct a variant of the global config for dexpreopted bootclasspath jars. The variants differ
 // in the list of input jars (libcore, framework, or both), in the naming scheme for the dexpreopt
 // files (ART recognizes "apex" names as special), and whether to include a zip archive.
@@ -134,7 +142,7 @@
 		}
 
 		if !artApexJarsOnly {
-			nonFrameworkModules := concat(artModules, global.ProductUpdatableBootModules)
+			nonFrameworkModules := concat(artModules, getJarsFromApexJarPairs(global.UpdatableBootJars))
 			frameworkModules := android.RemoveListFromList(global.BootJars, nonFrameworkModules)
 			imageModules = concat(imageModules, frameworkModules)
 
@@ -218,7 +226,11 @@
 	return ctx.Config().OnceStringSlice(defaultBootclasspathKey, func() []string {
 		global := dexpreoptGlobalConfig(ctx)
 		image := defaultBootImageConfig(ctx)
-		bootclasspath := append(copyOf(image.dexLocations), global.ProductUpdatableBootLocations...)
+		updatableBootclasspath := make([]string, len(global.UpdatableBootJars))
+		for i, p := range global.UpdatableBootJars {
+			updatableBootclasspath[i] = dexpreopt.GetJarLocationFromApexJarPair(p)
+		}
+		bootclasspath := append(copyOf(image.dexLocations), updatableBootclasspath...)
 		return bootclasspath
 	})
 }