From 0a37d429bcbfdf5110bbfcf14f43764dc01585a4 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Thu, 13 Feb 2025 02:05:00 +0000 Subject: Change depVisitor to use providers instead of type-asserting to interfaces directly, the next step is to change it to use ModuleProxy once IsDepInSameApex is ready. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I13a4e256a26dbf7f9b3b746d628ac8f68b4e598e --- java/rro.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'java/rro.go') diff --git a/java/rro.go b/java/rro.go index d9f4ff7c8..f7f85f001 100644 --- a/java/rro.go +++ b/java/rro.go @@ -34,6 +34,15 @@ func RegisterRuntimeResourceOverlayBuildComponents(ctx android.RegistrationConte ctx.RegisterModuleType("override_runtime_resource_overlay", OverrideRuntimeResourceOverlayModuleFactory) } +type RuntimeResourceOverlayInfo struct { + OutputFile android.Path + Certificate Certificate + Theme string + OverriddenManifestPackageName string +} + +var RuntimeResourceOverlayInfoProvider = blueprint.NewProvider[RuntimeResourceOverlayInfo]() + type RuntimeResourceOverlay struct { android.ModuleBase android.DefaultableModuleBase @@ -207,6 +216,12 @@ func (r *RuntimeResourceOverlay) GenerateAndroidBuildActions(ctx android.ModuleC AconfigTextFiles: aconfigTextFilePaths, }) + android.SetProvider(ctx, RuntimeResourceOverlayInfoProvider, RuntimeResourceOverlayInfo{ + OutputFile: r.OutputFile(), + Certificate: r.Certificate(), + Theme: r.Theme(), + }) + buildComplianceMetadata(ctx) } -- cgit v1.2.3-59-g8ed1b