From 81fe4d1d74185a5c1f6859bd07ad4cc02ca501f4 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Wed, 15 May 2024 18:43:47 +0000 Subject: Disable monolithic hiddenapi flags generation for non java devices. platform-bootclasspath constructs the monotlithic hiddenapi flags by looking at PRODUCT_BOOT_JARS which are not included in another bootclasspath fragment. PRODUCT_BOOT_JARS is a product specific property, and non java devices like minidroid have an empty value for this. For such devices, the monolithic flag generation runs into an error because there are no jars to run this on. This CL disables the generation of monolithic specific hiddenapi flags when there are no monolithic boot jars in the build. Bug: 338363444 Test: lunch aosp_cf_x86_64_minidroid-trunk_staging-userdebug && mmma frameworks/base Change-Id: I093690786bcf85b2aa6f01d0c689fc2a35861b5c --- java/platform_bootclasspath.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java/platform_bootclasspath.go') diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index b3c9ce50f..0f87b2745 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -325,6 +325,11 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android. // the fragments will have already provided the flags that are needed. classesJars := monolithicInfo.ClassesJars + if len(classesJars) == 0 { + // This product does not include any monolithic jars. Monolithic hiddenapi flag generation is not required. + return bootDexJarByModule + } + // Create the input to pass to buildRuleToGenerateHiddenAPIStubFlagsFile input := newHiddenAPIFlagInput() -- cgit v1.2.3-59-g8ed1b