From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Micay <danielmicay@gmail.com>
Date: Tue, 14 May 2019 14:29:36 -0400
Subject: [PATCH] disable ICU cache pinning for exec spawning

---
 core/java/com/android/internal/os/ZygoteInit.java | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 17bdfaa79d0b..1dfe23e32937 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -122,9 +122,11 @@ public class ZygoteInit {
 
     static void preload(TimingsTraceLog bootTimingsTraceLog, boolean fullPreload) {
         Log.d(TAG, "begin preload");
-        bootTimingsTraceLog.traceBegin("BeginIcuCachePinning");
-        beginIcuCachePinning();
-        bootTimingsTraceLog.traceEnd(); // BeginIcuCachePinning
+        if (fullPreload) {
+            bootTimingsTraceLog.traceBegin("BeginIcuCachePinning");
+            beginIcuCachePinning();
+            bootTimingsTraceLog.traceEnd(); // BeginIcuCachePinning
+        }
         bootTimingsTraceLog.traceBegin("PreloadClasses");
         preloadClasses();
         bootTimingsTraceLog.traceEnd(); // PreloadClasses
@@ -146,7 +148,9 @@ public class ZygoteInit {
         // Ask the WebViewFactory to do any initialization that must run in the zygote process,
         // for memory sharing purposes.
         WebViewFactory.prepareWebViewInZygote();
-        endIcuCachePinning();
+        if (fullPreload) {
+            endIcuCachePinning();
+        }
         warmUpJcaProviders();
         Log.d(TAG, "end preload");
 
