summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-03-07 12:34:47 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-03-07 12:34:47 -0800
commit4a053d74d73a4826530d1b06be8aa5ad55212ff2 (patch)
tree05fbc6268744c0ff339d4ccced3d9a3677857be6 /java
parent2a90ef4d0cffa0172d9100a461296d40470781cd (diff)
parent0e1a748d4b96519ed46f9f193be047fd12cfe027 (diff)
Merge "Use system server jar module stem instead of its name" into main
Diffstat (limited to 'java')
-rw-r--r--java/dexpreopt_check.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/dexpreopt_check.go b/java/dexpreopt_check.go
index c97156541..9d0f539ba 100644
--- a/java/dexpreopt_check.go
+++ b/java/dexpreopt_check.go
@@ -100,7 +100,12 @@ func (m *dexpreoptSystemserverCheck) GenerateAndroidBuildActions(ctx android.Mod
if systemServerJar.InstallInSystemExt() && ctx.Config().InstallApexSystemServerDexpreoptSamePartition() {
partition = ctx.DeviceConfig().SystemExtPath() // system_ext
}
- dexLocation := dexpreopt.GetSystemServerDexLocation(ctx, global, systemServerJar.Name())
+ var dexLocation string
+ if m, ok := systemServerJar.(ModuleWithStem); ok {
+ dexLocation = dexpreopt.GetSystemServerDexLocation(ctx, global, m.Stem())
+ } else {
+ ctx.PropertyErrorf("dexpreopt_systemserver_check", "%v is not a ModuleWithStem", systemServerJar.Name())
+ }
odexLocation := dexpreopt.ToOdexPath(dexLocation, targets[0].Arch.ArchType, partition)
odexPath := getInstallPath(ctx, odexLocation)
vdexPath := getInstallPath(ctx, pathtools.ReplaceExtension(odexLocation, "vdex"))