From ee25072e350be8d8c651d52e19ee486f675abb84 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Thu, 6 Dec 2018 14:00:02 -0800 Subject: [PATCH] Make apex.ApexBundleFactory public Art needs to be able to create an ApexBundle with a LoadHook to support art testing using the HOST_PREFER_32_BIT=true hack. Bug: 120617876 Test: HOST_PREFER_32_BIT=true m nothing Change-Id: Ia11e61a92094dfbc013c6c53a6edff33371ed8e1 --- apex/apex.go | 4 ++-- apex/apex_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index 0445c205e..fdfcf8628 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -136,7 +136,7 @@ func init() { pctx.HostBinToolVariable("zip2zip", "zip2zip") pctx.HostBinToolVariable("zipalign", "zipalign") - android.RegisterModuleType("apex", apexBundleFactory) + android.RegisterModuleType("apex", ApexBundleFactory) android.PostDepsMutators(func(ctx android.RegisterMutatorsContext) { ctx.TopDown("apex_deps", apexDepsMutator) @@ -871,7 +871,7 @@ func (a *apexBundle) androidMkForType(apexType apexPackaging) android.AndroidMkD } } -func apexBundleFactory() android.Module { +func ApexBundleFactory() android.Module { module := &apexBundle{ outputFiles: map[apexPackaging]android.WritablePath{}, } diff --git a/apex/apex_test.go b/apex/apex_test.go index d1794ee5c..b1788297e 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -28,7 +28,7 @@ func testApex(t *testing.T, bp string) *android.TestContext { defer teardown(buildDir) ctx := android.NewTestArchContext() - ctx.RegisterModuleType("apex", android.ModuleFactoryAdaptor(apexBundleFactory)) + ctx.RegisterModuleType("apex", android.ModuleFactoryAdaptor(ApexBundleFactory)) ctx.RegisterModuleType("apex_key", android.ModuleFactoryAdaptor(apexKeyFactory)) ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {