mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-09-16 14:32:51 +00:00
209481c53e
1114c3c1d4cd
ac1943345e
1abb805041
2e07ab8c24
0044836677
c561811fad
7a848373ef
89646bdeb1
2a70bbac4a
d414dcaa35
b4cd877e3a
98634286bb
114c2635390c
11add34a4bc6
11a2b51906de
10527787f3c8
ffde474ad7
aa87e487c4
c906fe9722
c69c3eecd4
b2303adccc
5bb05db6f7
536b497688
24802a832b
ce6dcc2368
3d3d5c4d38
2eda592b79
1029f28b53c0
1013a992c716
9750efbf6bc
ed563b6f26
aad3c7d750
da3180f9a8
68773a29b7
283b3fa09c
f133136b65
01a01ce5f6
17c309c098
8806ec3ef1
Signed-off-by: Tad <tad@spotco.us>
48 lines
2.4 KiB
Diff
48 lines
2.4 KiB
Diff
From 29f28b53c0cc85612e66485bc250fc57d82bc622 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Micay <danielmicay@gmail.com>
|
|
Date: Wed, 11 Sep 2019 06:46:38 -0400
|
|
Subject: [PATCH] add parameter for avoiding full preload with exec
|
|
|
|
---
|
|
dalvik/src/main/java/dalvik/system/ZygoteHooks.java | 4 ++--
|
|
mmodules/core_platform_api/api/platform/current-api.txt | 4 ++--
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
|
|
index 13769e137e..af3b9cfe8b 100644
|
|
--- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
|
|
+++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
|
|
@@ -47,7 +47,7 @@ private ZygoteHooks() {
|
|
* Called when the zygote begins preloading classes and data.
|
|
*/
|
|
@libcore.api.CorePlatformApi
|
|
- public static void onBeginPreload() {
|
|
+ public static void onBeginPreload(boolean fullPreload) {
|
|
// Pin ICU data in memory from this point that would normally be held by soft references.
|
|
// Without this, any references created immediately below or during class preloading
|
|
// would be collected when the Zygote GC runs in gcAndFinalize().
|
|
@@ -64,7 +64,7 @@ public static void onBeginPreload() {
|
|
* Called when the zygote has completed preloading classes and data.
|
|
*/
|
|
@libcore.api.CorePlatformApi
|
|
- public static void onEndPreload() {
|
|
+ public static void onEndPreload(boolean fullPreload) {
|
|
// All cache references created by ICU from this point will be soft.
|
|
CacheValue.setStrength(CacheValue.Strength.SOFT);
|
|
}
|
|
diff --git a/mmodules/core_platform_api/api/platform/current-api.txt b/mmodules/core_platform_api/api/platform/current-api.txt
|
|
index b2b81df415..cca6891580 100644
|
|
--- a/mmodules/core_platform_api/api/platform/current-api.txt
|
|
+++ b/mmodules/core_platform_api/api/platform/current-api.txt
|
|
@@ -854,8 +854,8 @@ package dalvik.system {
|
|
|
|
public final class ZygoteHooks {
|
|
method public static void gcAndFinalize();
|
|
- method public static void onBeginPreload();
|
|
- method public static void onEndPreload();
|
|
+ method public static void onBeginPreload(boolean);
|
|
+ method public static void onEndPreload(boolean);
|
|
method public static void postForkChild(int, boolean, boolean, String);
|
|
method public static void postForkCommon();
|
|
method public static void postForkSystemServer();
|