Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e258a9c authored by Martin Stjernholm's avatar Martin Stjernholm
Browse files

Clarify why it's safe to add java.library.path to the classloader

namespace.

Test: N/A - comment change only
Change-Id: I9ae485afc4b6b827c09bb7d65c3987eefd433492
parent 0b2d583b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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");