summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Pirama Arumuga Nainar <pirama@google.com> 2015-02-11 17:23:12 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2015-02-11 17:23:12 +0000
commit21761bc5de357aa5cf23f2f914b8e4e67a02432b (patch)
tree8f95b40ebff189f6ea1e8b958b5da69a6adbd026
parent5cfd3d8b51b0e21c37d80e3cf5570bae8efe1bc1 (diff)
parent0cc09449b6b1e418a7d04590e28d1336694230ba (diff)
am 0cc09449: Merge "Store compiled code in Context.getCodeCacheDir()" automerge: 3fbbe39 automerge: 1641e19
* commit '0cc09449b6b1e418a7d04590e28d1336694230ba': 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 e08fc5bb4715..d781863d8cc3 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4432,10 +4432,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");
}
}