diff options
author | Kenny Root <kroot@google.com> | 2013-07-23 22:33:50 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2013-07-23 22:37:37 -0700 |
commit | ba23a6677e7a335078fb6fced9a75524e10b2de6 (patch) | |
tree | fa53f1d17470b3a23788c0393ae60e107231ef10 /tools/preload | |
parent | 3de52c67e5fa0f2cc8ddfb4d0ab4f206274e0054 (diff) | |
download | frameworks_base-ba23a6677e7a335078fb6fced9a75524e10b2de6.zip frameworks_base-ba23a6677e7a335078fb6fced9a75524e10b2de6.tar.gz frameworks_base-ba23a6677e7a335078fb6fced9a75524e10b2de6.tar.bz2 |
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
Diffstat (limited to 'tools/preload')
-rw-r--r-- | tools/preload/Policy.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/preload/Policy.java b/tools/preload/Policy.java index ca0291b..af46820 100644 --- a/tools/preload/Policy.java +++ b/tools/preload/Policy.java @@ -81,8 +81,9 @@ public class Policy { return SERVICES.contains(processName); } - /**Reports if the given class should be preloaded. */ + /** 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"); } } |