summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2015-02-11 17:11:06 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-02-11 17:11:06 +0000
commit1641e192a82e266159e0b82078a8f98ebcd3d8ff (patch)
treedb0632c01c35a2f92e4dc574f8dc547044d3feea /core/java/android
parent6da3cc59a0e77e723a8413d2443b0f1bc5821b03 (diff)
parent3fbbe396faffeec6b46796087ad1e075e9a21f0d (diff)
Merge "Store compiled code in Context.getCodeCacheDir()"
automerge: 3fbbe39 * commit '3fbbe396faffeec6b46796087ad1e075e9a21f0d': Store compiled code in Context.getCodeCacheDir()
Diffstat (limited to 'core/java/android')
-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 9d821e1590a3..bffe395c31dd 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");
}
}