Loading core/java/com/android/internal/os/WrapperInit.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,8 @@ public class WrapperInit { */ */ public static void main(String[] args) { public static void main(String[] args) { try { try { // Tell the Zygote what our actual PID is (since it only knows about the // wrapper that it directly forked). int fdNum = Integer.parseInt(args[0], 10); int fdNum = Integer.parseInt(args[0], 10); if (fdNum != 0) { if (fdNum != 0) { try { try { Loading @@ -67,6 +69,10 @@ public class WrapperInit { } } } } // Mimic Zygote preloading. ZygoteInit.preload(); // Launch the application. String[] runtimeArgs = new String[args.length - 1]; String[] runtimeArgs = new String[args.length - 1]; System.arraycopy(args, 1, runtimeArgs, 0, runtimeArgs.length); System.arraycopy(args, 1, runtimeArgs, 0, runtimeArgs.length); RuntimeInit.wrapperInit(runtimeArgs); RuntimeInit.wrapperInit(runtimeArgs); Loading core/java/com/android/internal/os/ZygoteInit.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -228,6 +228,11 @@ public class ZygoteInit { } } } } static void preload() { preloadClasses(); preloadResources(); } /** /** * Performs Zygote process initialization. Loads and initializes * Performs Zygote process initialization. Loads and initializes * commonly used classes. * commonly used classes. Loading Loading @@ -509,8 +514,7 @@ public class ZygoteInit { registerZygoteSocket(); registerZygoteSocket(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, SystemClock.uptimeMillis()); SystemClock.uptimeMillis()); preloadClasses(); preload(); preloadResources(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, SystemClock.uptimeMillis()); SystemClock.uptimeMillis()); Loading Loading
core/java/com/android/internal/os/WrapperInit.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,8 @@ public class WrapperInit { */ */ public static void main(String[] args) { public static void main(String[] args) { try { try { // Tell the Zygote what our actual PID is (since it only knows about the // wrapper that it directly forked). int fdNum = Integer.parseInt(args[0], 10); int fdNum = Integer.parseInt(args[0], 10); if (fdNum != 0) { if (fdNum != 0) { try { try { Loading @@ -67,6 +69,10 @@ public class WrapperInit { } } } } // Mimic Zygote preloading. ZygoteInit.preload(); // Launch the application. String[] runtimeArgs = new String[args.length - 1]; String[] runtimeArgs = new String[args.length - 1]; System.arraycopy(args, 1, runtimeArgs, 0, runtimeArgs.length); System.arraycopy(args, 1, runtimeArgs, 0, runtimeArgs.length); RuntimeInit.wrapperInit(runtimeArgs); RuntimeInit.wrapperInit(runtimeArgs); Loading
core/java/com/android/internal/os/ZygoteInit.java +6 −2 Original line number Original line Diff line number Diff line Loading @@ -228,6 +228,11 @@ public class ZygoteInit { } } } } static void preload() { preloadClasses(); preloadResources(); } /** /** * Performs Zygote process initialization. Loads and initializes * Performs Zygote process initialization. Loads and initializes * commonly used classes. * commonly used classes. Loading Loading @@ -509,8 +514,7 @@ public class ZygoteInit { registerZygoteSocket(); registerZygoteSocket(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_START, SystemClock.uptimeMillis()); SystemClock.uptimeMillis()); preloadClasses(); preload(); preloadResources(); EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, EventLog.writeEvent(LOG_BOOT_PROGRESS_PRELOAD_END, SystemClock.uptimeMillis()); SystemClock.uptimeMillis()); Loading