From da286f4615f7e609aa3994fcb5b573b1a2435807 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 29 Jun 2021 11:59:23 +0100 Subject: Make bootclasspath_fragments always perform hidden API processing Previously, bootclasspath_fragment modules would only perform hidden API processing if they provided some stub libraries and fragments. That was needed because the bootclasspath_fragment modules were added before Soong supported hidden API processing on all the different modules and before they all provided the necessary information that hidden API processing required. This change stops hidden API being conditional as it is no longer required as it has been enabled on all existing bootclasspath_fragment modules. Bug: 179354495 Test: m nothing Change-Id: I0cbf11986adff1f2f967b96f86e6bfe0e9b8b1ef --- java/bootclasspath_fragment.go | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'java/bootclasspath_fragment.go') diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index bdf0daeaf..503c31fd7 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -579,25 +579,9 @@ func (b *BootclasspathFragmentModule) generateHiddenAPIBuildActions(ctx android. // Create hidden API input structure. input := b.createHiddenAPIFlagInput(ctx, contents, fragments) - var output *HiddenAPIOutput - - // Hidden API processing is conditional as a temporary workaround as not all - // bootclasspath_fragments provide the appropriate information needed for hidden API processing - // which leads to breakages of the build. - // TODO(b/179354495): Stop hidden API processing being conditional once all bootclasspath_fragment - // modules have been updated to support it. - if input.canPerformHiddenAPIProcessing(ctx, b.properties) { - // Delegate the production of the hidden API all-flags.csv file to a module type specific method. - common := ctx.Module().(commonBootclasspathFragment) - output = common.produceHiddenAPIOutput(ctx, contents, input) - } else { - // As hidden API processing cannot be performed fall back to trying to retrieve the legacy - // encoded boot dex files, i.e. those files encoded by the individual libraries and returned - // from the DexJarBuildPath() method. - output = &HiddenAPIOutput{ - EncodedBootDexFilesByModule: retrieveLegacyEncodedBootDexFiles(ctx, contents), - } - } + // Delegate the production of the hidden API all-flags.csv file to a module type specific method. + common := ctx.Module().(commonBootclasspathFragment) + output := common.produceHiddenAPIOutput(ctx, contents, input) // Initialize a HiddenAPIInfo structure. hiddenAPIInfo := HiddenAPIInfo{ -- cgit v1.2.3-59-g8ed1b