Merge "Clarify why it's safe to add java.library.path to the classloader namespace." am: 27310f0340
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1507503 Change-Id: I98c9fdb5ef438b7b55f0bf5809928b35a80efe1c
This commit is contained in:
@@ -631,8 +631,11 @@ public class ZygoteInit {
|
||||
|
||||
/**
|
||||
* Creates a PathClassLoader for the given class path that is associated with a shared
|
||||
* namespace, i.e., this classloader can access platform-private native libraries. The
|
||||
* classloader will use java.library.path as the native library path.
|
||||
* namespace, i.e., this classloader can access platform-private native libraries.
|
||||
*
|
||||
* The classloader will add java.library.path to the native library path for the classloader
|
||||
* namespace. Since it includes platform locations like /system/lib, this is only appropriate
|
||||
* for platform code that don't need linker namespace isolation (as opposed to APEXes and apps).
|
||||
*/
|
||||
static ClassLoader createPathClassLoader(String classPath, int targetSdkVersion) {
|
||||
String libraryPath = System.getProperty("java.library.path");
|
||||
|
||||
Reference in New Issue
Block a user