diff options
author | 2024-12-17 15:27:16 -0800 | |
---|---|---|
committer | 2025-02-03 22:19:24 -0800 | |
commit | 697f25de1354350472ac0d9ae7392faffb74358c (patch) | |
tree | 85113e94c0bc2a9d7c3a34f8c390be109f7dae4e | |
parent | dcc6156dec64c41b872ebf48d28642e21372e747 (diff) |
Remove extraneous variation name from OverrideApex
Apexes use an empty variation name for themselves, and only set an
extra variation string for dependencies. OverrideApex is setting
the variation name for itself, which doesn't match apexes and is
unnecessary.
Test: go test ./apex
Change-Id: I6e726c497ccf10f145cda149bd19849fd22dd20b
-rw-r--r-- | apex/apex.go | 4 | ||||
-rw-r--r-- | apex/apex_test.go | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/apex/apex.go b/apex/apex.go index a3106717a..d35b40469 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1202,8 +1202,6 @@ func (a *apexTransitionMutator) Split(ctx android.BaseModuleContext) []string { return []string{overridable.GetOverriddenBy()} } return []string{ai.ApexVariationName()} - } else if _, ok := ctx.Module().(*OverrideApex); ok { - return []string{ctx.ModuleName()} } return []string{""} } @@ -1220,8 +1218,6 @@ func (a *apexTransitionMutator) IncomingTransition(ctx android.IncomingTransitio return overridable.GetOverriddenBy() } return ai.ApexVariationName() - } else if _, ok := ctx.Module().(*OverrideApex); ok { - return ctx.Module().Name() } return "" diff --git a/apex/apex_test.go b/apex/apex_test.go index 1382f6903..ef863f41e 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -11368,7 +11368,7 @@ func TestInstallationRulesForMultipleApexPrebuilts(t *testing.T) { variation := func(moduleName string) string { ret := "android_common_com.android.foo" if moduleName == "com.google.android.foo" { - ret = "android_common_com.google.android.foo_com.google.android.foo" + ret = "android_common_com.google.android.foo" } return ret } @@ -11883,7 +11883,7 @@ func TestOverrideApexWithPrebuiltApexPreferred(t *testing.T) { } `) - java.CheckModuleHasDependency(t, res.TestContext, "myoverrideapex", "android_common_myoverrideapex_myoverrideapex", "foo") + java.CheckModuleHasDependency(t, res.TestContext, "myoverrideapex", "android_common_myoverrideapex", "foo") } func TestUpdatableApexMinSdkVersionCurrent(t *testing.T) { |