Update OMS patches
[GitHub/Stricted/android_vendor_extra.git] / patches / frameworks / base / 0008-OMS7-N-Disable-Zygote-preloaded-drawables-8-11.patch
CommitLineData
d1b877b3 1From 43c18cb2d696aeabde78e902d6f97a194534846e Mon Sep 17 00:00:00 2001
6bcbafcd
L
2From: Josh Guilfoyle <Josh.Guilfoyle@T-Mobile.com>
3Date: Wed, 26 Jan 2011 23:28:43 -0800
d1b877b3 4Subject: [PATCH 08/43] OMS7-N: Disable Zygote preloaded drawables [8/11]
6bcbafcd
L
5
6With a theme applied, most of these preloaded drawables go unused. Any
7assets the theme has redirected will need to be loaded with each app
8process regardless. Worse, preloads make it impossible to do asset
9redirection for constituent parts of a preloaded drawable (for instance,
10individual states of a StateListDrawable cannot be redirected).
11
12Some day it might be nice to revisit this and see if there's a way to
13reintroduce the drawable cache in a way that can be altered at runtime
14without significant complexity or runtime penalty.
15
16Change-Id: I253b1a22482ac664c196533a4c2fcd88ae84b996
17---
18 core/java/com/android/internal/os/ZygoteInit.java | 4 +++-
19 1 file changed, 3 insertions(+), 1 deletion(-)
20
21diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
d1b877b3 22index 20f84b52d19..455849e0c19 100644
6bcbafcd
L
23--- a/core/java/com/android/internal/os/ZygoteInit.java
24+++ b/core/java/com/android/internal/os/ZygoteInit.java
25@@ -108,7 +108,7 @@ public class ZygoteInit {
26 private static final String PRELOADED_CLASSES = "/system/etc/preloaded-classes";
27
28 /** Controls whether we should preload resources during zygote init. */
29- public static final boolean PRELOAD_RESOURCES = true;
30+ public static final boolean PRELOAD_RESOURCES = false;
31
32 /**
33 * Registers a server socket for zygote command connections
34@@ -437,6 +437,8 @@ public class ZygoteInit {
35 Log.i(TAG, "...preloaded " + N + " resource in "
36 + (SystemClock.uptimeMillis() - startTime) + "ms.");
37 }
38+ } else {
39+ Log.i(TAG, "Preload resources disabled, skipped.");
40 }
41 mResources.finishPreloading();
42 } catch (RuntimeException e) {
43--
d1b877b3 442.11.1
6bcbafcd 45