From e1a8555581d4939882f94f4270d03a0d24ee93f3 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 14 Jun 2024 12:17:37 -0700 Subject: Add IsAddingDependency to IncomingTransitionContext Add an IsAddingDependency method to IncomingTransitionContext that returns true if IncomingTransition is called after the transition has already won while adding a new dependency. This will be used as part of the transition mutators to support an apex use case where incoming dependencies during the initial apex mutator need to be rewritten onto the platform variant for modules that don't support the apex, but a later call to OtherModuleDependencyVariantExists must not rewrite the requested apex variation onto the platform variant. This should be used sparingly, all uses will have to be removed in order to support creating variants on demand. Bug: 319288033 Test: TestIsAddingDependency Flag: EXEMPT refactor Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b --- filesystem/filesystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filesystem/filesystem.go') diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index ffa30a013..5add95441 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -632,7 +632,7 @@ func sha1sum(values []string) string { var _ cc.UseCoverage = (*filesystem)(nil) -func (*filesystem) IsNativeCoverageNeeded(ctx android.IncomingTransitionContext) bool { +func (*filesystem) IsNativeCoverageNeeded(ctx cc.IsNativeCoverageNeededContext) bool { return ctx.Device() && ctx.DeviceConfig().NativeCoverageEnabled() } -- cgit v1.2.3-59-g8ed1b