diff options
author | Steve Kondik <steve@cyngn.com> | 2014-11-27 02:12:32 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-01-19 11:33:01 -0800 |
commit | 4d84b82a5e41b3745ba75fc85c92877e5a702300 (patch) | |
tree | 29951a845e0a9cb76c410bdeeeae21919d731745 | |
parent | 79923fb33d4109329c06a2a73f56a8b41e50356c (diff) | |
download | frameworks_base-4d84b82a5e41b3745ba75fc85c92877e5a702300.zip frameworks_base-4d84b82a5e41b3745ba75fc85c92877e5a702300.tar.gz frameworks_base-4d84b82a5e41b3745ba75fc85c92877e5a702300.tar.bz2 |
pm: Add persist property to enable lazy dexopt
* Add "persist.sys.lazy.dexopt" property to enable lazy dexopt
on userdebug builds. As much as I enjoy these 20 minute
dexopt sessions, I prefer instant gratification.
Change-Id: I568692f04d67c3c0a1a138fb724eda41e24b1235
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index b877b9d..07a627b 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -1895,7 +1895,9 @@ public class PackageManagerService extends IPackageManager.Stub { mContext = context; mFactoryTest = factoryTest; mOnlyCore = onlyCore; - mLazyDexOpt = "eng".equals(SystemProperties.get("ro.build.type")); + mLazyDexOpt = "eng".equals(SystemProperties.get("ro.build.type")) || + ("userdebug".equals(SystemProperties.get("ro.build.type")) && + SystemProperties.getBoolean("persist.sys.lazy.dexopt", false)); mMetrics = new DisplayMetrics(); mSettings = new Settings(mPackages); mSettings.addSharedUserLPw("android.uid.system", Process.SYSTEM_UID, |