diff options
author | Jiyong Park <jiyong@google.com> | 2019-11-06 17:07:43 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2019-11-08 23:50:21 +0900 |
commit | 53a930d29e668acaa60bbef2ed6f1eb5e1304a01 (patch) | |
tree | dc1cc3acb12936c785a1cd919fd7fe75f58f82c6 /dalvik | |
parent | 207a979716ccfcadc4507e95329b61689434f9b9 (diff) |
Don't change the behavior of findLibrary
8f712189dfc02285573337e2b4ab17678011db14 chaged the behavior of
BaseDexClassLoader.findLibrary (to be specific any classloader
that uses DexPathList). findLibrary no longer returns null
even when the requested library isn't found in the native search path of
the classloader (because it could be loadable via namespace links even
when it's not in the search paths). However, it looks like this is
breaking some apps. To minimize the app compat problem, findLibrary()
returns its original behavior of returning null when the library is not
found. Instead, the RuntimeClass is modified to have a special case for
handling the null return from PathClassLoader.
Bug: 143649498
Bug: 109720125
Test: run the app that was mentioned in 143649498
Change-Id: I445592b57c62782b62a1adceb4fb4f5a016d65ee
Diffstat (limited to 'dalvik')
-rw-r--r-- | dalvik/src/main/java/dalvik/system/DexPathList.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/dalvik/src/main/java/dalvik/system/DexPathList.java b/dalvik/src/main/java/dalvik/system/DexPathList.java index e430b5580f..c63bb13477 100644 --- a/dalvik/src/main/java/dalvik/system/DexPathList.java +++ b/dalvik/src/main/java/dalvik/system/DexPathList.java @@ -603,12 +603,8 @@ public final class DexPathList { return path; } } - // Don't give up even if we failed to find the library in the native lib paths. - // The underlying dynamic linker might be able to find the lib in one of the linker - // namespaces associated with the current linker namespace. In order to give the - // dynamic linker a chance, proceed to load the library with its soname, which - // is the fileName. - return fileName; + + return null; } /** |