From 0e0d7490625c713bb71c254bd55129b0a30898a3 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Thu, 11 Apr 2024 17:43:00 -0700 Subject: Make the enabled property configurable This allows using select statements with it. Ignore-AOSP-First: This needs to be in a topic with changes in interal-only repositories, I'll cherrypick to aosp after. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191 --- java/fuzz.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'java/fuzz.go') diff --git a/java/fuzz.go b/java/fuzz.go index fb31ce794..78ab10891 100644 --- a/java/fuzz.go +++ b/java/fuzz.go @@ -69,13 +69,13 @@ func JavaFuzzFactory() android.Module { android.AddLoadHook(module, func(ctx android.LoadHookContext) { disableLinuxBionic := struct { - Target struct { - Linux_bionic struct { - Enabled *bool - } - } - }{} - disableLinuxBionic.Target.Linux_bionic.Enabled = proptools.BoolPtr(false) + Enabled proptools.Configurable[bool] + }{ + Enabled: android.CreateSelectOsToBool(map[string]*bool{ + "": nil, + "linux_bionic": proptools.BoolPtr(false), + }), + } ctx.AppendProperties(&disableLinuxBionic) }) @@ -179,7 +179,7 @@ func (s *javaFuzzPackager) GenerateBuildActions(ctx android.SingletonContext) { javaFuzzModule.ApexModuleBase, } - if ok := fuzz.IsValid(fuzzModuleValidator); !ok { + if ok := fuzz.IsValid(ctx, fuzzModuleValidator); !ok { return } -- cgit v1.2.3-59-g8ed1b