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

Commit ba23a667 authored by Kenny Root's avatar Kenny Root
Browse files

Exclude magic inner-class name from preload

Add a magic subclass name that will exclude inner classes that are meant
to prevent object instatiation but allow class preloading. This will
allow classes that have undesired side-effects to delay initialization
until the side-effects are no longer disruptive.

Bug: 9984058
Change-Id: I46b0784760d84a2a2da1f9f41d87ee7f70a3fc16
parent 3de52c67
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ public class Policy {

    /** Reports if the given class should be preloaded. */
    public static boolean isPreloadable(LoadedClass clazz) {
        return clazz.systemClass && !EXCLUDED_CLASSES.contains(clazz.name);
        return clazz.systemClass && !EXCLUDED_CLASSES.contains(clazz.name)
                && !clazz.name.endsWith("$NoPreloadHolder");
    }
}