diff options
author | Shuo Gao <shuo.gao@intel.com> | 2016-03-01 13:32:03 +0800 |
---|---|---|
committer | Zhiquan Liu <zhiquan.liu@intel.com> | 2016-03-21 11:32:06 +0800 |
commit | 1c7083cf85c46a40b4ee1fea9c2f9e74eb23e765 (patch) | |
tree | 839abf7197ef8050dc243b125038c11b14491311 | |
parent | ca430a881f29ee88ade7a541fa34799c9f47d345 (diff) |
Enable shader cache for applications that shared UID with multiple packages too
Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.
Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
-rw-r--r-- | core/java/android/app/ActivityThread.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 506766551ee2..5fb3635d73f1 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -4390,9 +4390,7 @@ public final class ActivityThread { int uid = Process.myUid(); String[] packages = getPackageManager().getPackagesForUid(uid); - // If there are several packages in this application we won't - // initialize the graphics disk caches - if (packages != null && packages.length == 1) { + if (packages != null) { HardwareRenderer.setupDiskCache(cacheDir); RenderScriptCacheDir.setupDiskCache(cacheDir); } |