From 39dd0a4b87a147c710c1eef107ab74dfb1f84335 Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Mon, 29 Mar 2021 14:57:34 +0100 Subject: [PATCH] Don't enforce checks if dexpreopt for apps is disabled. Otherwise the check fails, as it depend on non-existent dexpreopt.config files. This CL fixes broken build cf_x86_phone-userdebug_coverage. Bug: 183931403 Bug: 132357300 Test: forrest build for cf_x86_phone-userdebug_coverage. Change-Id: Id3ffeb742c1b82c677795fa701a7b5a867eabbbd --- java/app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/app.go b/java/app.go index 1b6e0e3ee..b849b98b1 100755 --- a/java/app.go +++ b/java/app.go @@ -1294,7 +1294,8 @@ func (u *usesLibrary) verifyUsesLibraries(ctx android.ModuleContext, inputFile a // check is not necessary, and although it is good to have, it is difficult to maintain on // non-linux build platforms where dexpreopt is generally disabled (the check may fail due to // various unrelated reasons, such as a failure to get manifest from an APK). - if dexpreopt.GetGlobalConfig(ctx).DisablePreopt { + global := dexpreopt.GetGlobalConfig(ctx) + if global.DisablePreopt || global.OnlyPreoptBootImageAndSystemServer { return inputFile }