mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-08-30 22:21:55 +00:00
48 lines
2.0 KiB
Diff
48 lines
2.0 KiB
Diff
![]() |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Daniel Micay <danielmicay@gmail.com>
|
||
|
Date: Tue, 14 May 2019 14:24:21 -0400
|
||
|
Subject: [PATCH] add parameter for avoiding full preload with exec
|
||
|
|
||
|
---
|
||
|
core/java/com/android/internal/os/ExecInit.java | 2 +-
|
||
|
core/java/com/android/internal/os/ZygoteInit.java | 6 +++++-
|
||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/core/java/com/android/internal/os/ExecInit.java b/core/java/com/android/internal/os/ExecInit.java
|
||
|
index 2adcab7fdbe6..830e5b562a91 100644
|
||
|
--- a/core/java/com/android/internal/os/ExecInit.java
|
||
|
+++ b/core/java/com/android/internal/os/ExecInit.java
|
||
|
@@ -33,7 +33,7 @@ public class ExecInit {
|
||
|
|
||
|
// Mimic system Zygote preloading.
|
||
|
ZygoteInit.preload(new TimingsTraceLog("ExecInitTiming",
|
||
|
- Trace.TRACE_TAG_DALVIK));
|
||
|
+ Trace.TRACE_TAG_DALVIK), false);
|
||
|
|
||
|
// Launch the application.
|
||
|
String[] runtimeArgs = new String[args.length - 1];
|
||
|
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
|
||
|
index ca1ae194cb12..b244492bb76f 100644
|
||
|
--- a/core/java/com/android/internal/os/ZygoteInit.java
|
||
|
+++ b/core/java/com/android/internal/os/ZygoteInit.java
|
||
|
@@ -131,7 +131,7 @@ public class ZygoteInit {
|
||
|
*/
|
||
|
private static ClassLoader sCachedSystemServerClassLoader = null;
|
||
|
|
||
|
- static void preload(TimingsTraceLog bootTimingsTraceLog) {
|
||
|
+ static void preload(TimingsTraceLog bootTimingsTraceLog, boolean fullPreload) {
|
||
|
Log.d(TAG, "begin preload");
|
||
|
bootTimingsTraceLog.traceBegin("BeginPreload");
|
||
|
beginPreload();
|
||
|
@@ -163,6 +163,10 @@ public class ZygoteInit {
|
||
|
sPreloadComplete = true;
|
||
|
}
|
||
|
|
||
|
+ static void preload(TimingsTraceLog bootTimingsTraceLog) {
|
||
|
+ preload(bootTimingsTraceLog, true);
|
||
|
+ }
|
||
|
+
|
||
|
static void lazyPreload() {
|
||
|
Preconditions.checkState(!sPreloadComplete);
|
||
|
Log.i(TAG, "Lazily preloading resources.");
|