From 1997524011620ae63fabdb3aec8f65440c26ab5f Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 12 Aug 2020 23:35:13 +0000 Subject: [PATCH] ApplicationLoaders: improve classloader cache errs When zygote preloads a classloader, but at runtime, a different one is used, we get an error and fallback. This error is improved in the following ways: - print the zip name with the shared libraries, so we know which library the error is for - distinguish cached from runtime dependencies in the error message itself Bug: 163886868 Test: N/A Change-Id: I3f4c4078e9eb05b83058982afc7b7ea0822d1257 --- core/java/android/app/ApplicationLoaders.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/ApplicationLoaders.java b/core/java/android/app/ApplicationLoaders.java index bac432e423185..0796dbf081661 100644 --- a/core/java/android/app/ApplicationLoaders.java +++ b/core/java/android/app/ApplicationLoaders.java @@ -232,8 +232,8 @@ public class ApplicationLoaders { // cached must be built and loaded in the same environment if (!sharedLibrariesEquals(sharedLibraries, cached.sharedLibraries)) { - Log.w(TAG, "Unexpected environment for cached library: (" + sharedLibraries + "|" - + cached.sharedLibraries + ")"); + Log.w(TAG, "Unexpected environment loading cached library " + zip + " (real|cached): (" + + sharedLibraries + "|" + cached.sharedLibraries + ")"); return null; }