From 12164ded200a8fea68629d8d5d3befdc997f687a Mon Sep 17 00:00:00 2001 From: Ulya Trafimovich Date: Wed, 27 Apr 2022 11:27:58 +0100 Subject: [PATCH] Deduplicate `classLoaderContexts` field between two structs. This field is provided by the `dexpreopter` struct, which is a part of `java.Module` and also had an identially named field. This created confusion when the latter field was not properly copied into the former, which resulted in not propagating class loader context, e.g. for static library "androidx.preference_preference". This didn't cause class loader context mismatch errors at boot previously, because the library didn't have any uses-library dependencies before a recent prebuilt update. Bug: 214255490 Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \ && adb wait-for-device && adb root \ && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch' # empty output, no errors at boot Change-Id: Ib818c5d2934d28817bb7a04b6114ae8b82a5c04d --- java/base.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/java/base.go b/java/base.go index b925350a0..b611b4d02 100644 --- a/java/base.go +++ b/java/base.go @@ -442,9 +442,6 @@ type Module struct { // manifest file to use instead of properties.Manifest overrideManifest android.OptionalPath - // map of SDK version to class loader context - classLoaderContexts dexpreopt.ClassLoaderContextMap - // list of plugins that this java module is exporting exportedPluginJars android.Paths