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

Commit dc7bf5d8 authored by Andy McFadden's avatar Andy McFadden
Browse files

Don't use bootstrap loader directly

The VM is allowed to use null to represent the bootstrap class
loader, so attempting to call methods on it is a bad idea.  Use
the system class loader instead.

Change-Id: I9190848945f679d546d5fb30aba10fd27c7e5404
parent 30f1312b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ public class ZygoteInit {
    private static void preloadClasses() {
        final VMRuntime runtime = VMRuntime.getRuntime();

        InputStream is = ZygoteInit.class.getClassLoader().getResourceAsStream(
        InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(
                PRELOADED_CLASSES);
        if (is == null) {
            Log.e(TAG, "Couldn't find " + PRELOADED_CLASSES + ".");