summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pirama Arumuga Nainar <pirama@google.com> 2015-02-11 17:15:47 +0000
committer android-build-merger <android-build-merger@google.com> 2015-02-11 17:15:47 +0000
commit0cc09449b6b1e418a7d04590e28d1336694230ba (patch)
tree826d824c1eacea948c447d0cc193d453b9a11f95
parent1d053b868f9ab3d934956c59c33c7b4bb82ba589 (diff)
parent1641e192a82e266159e0b82078a8f98ebcd3d8ff (diff)
Merge "Store compiled code in Context.getCodeCacheDir()" automerge: 3fbbe39
automerge: 1641e19 * commit '1641e192a82e266159e0b82078a8f98ebcd3d8ff': Store compiled code in Context.getCodeCacheDir()
-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 fb2bcd04a7aa..ccbed92268bc 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4396,10 +4396,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");
}
}