summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-02-10 12:41:42 -0800
committerPirama Arumuga Nainar <pirama@google.com>2015-02-10 13:17:30 -0800
commit51772b7601b7540be6ff4069dda2b83f057c7ce4 (patch)
tree5b253505a4b57a075fbbfc4868f9fdc03113e408
parentfd523efcde98e97cd8c088f95198e6e13f4f8b64 (diff)
downloadframeworks_base-51772b7601b7540be6ff4069dda2b83f057c7ce4.zip
frameworks_base-51772b7601b7540be6ff4069dda2b83f057c7ce4.tar.gz
frameworks_base-51772b7601b7540be6ff4069dda2b83f057c7ce4.tar.bz2
Store compiled code in Context.getCodeCacheDir()
bug 16345623 Use Context.getCodeCacheDir for EGL shader cache and RenderScript compiled code. Change-Id: I54c4e43674bd1f9342ae13059cb8899f4a3f4734
-rw-r--r--core/java/android/app/ActivityThread.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 9d821e1..bffe395 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4358,10 +4358,16 @@ public final class ActivityThread {
if (cacheDir != null) {
// Provide a usable directory for temporary files
System.setProperty("java.io.tmpdir", cacheDir.getAbsolutePath());
-
- setupGraphicsSupport(data.info, cacheDir);
} else {
- Log.e(TAG, "Unable to setupGraphicsSupport due to missing cache directory");
+ Log.v(TAG, "Unable to initialize \"java.io.tmpdir\" property due to missing cache directory");
+ }
+
+ // Use codeCacheDir to store generated/compiled graphics code
+ final File codeCacheDir = appContext.getCodeCacheDir();
+ if (codeCacheDir != null) {
+ setupGraphicsSupport(data.info, codeCacheDir);
+ } else {
+ Log.e(TAG, "Unable to setupGraphicsSupport due to missing code-cache directory");
}
}