Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51772b76 authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar
Browse files

Store compiled code in Context.getCodeCacheDir()

bug 16345623

Use Context.getCodeCacheDir for EGL shader cache and RenderScript
compiled code.

Change-Id: I54c4e43674bd1f9342ae13059cb8899f4a3f4734
parent fd523efc
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -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());
            } else {
                Log.v(TAG, "Unable to initialize \"java.io.tmpdir\" property due to missing cache directory");
            }

                setupGraphicsSupport(data.info, cacheDir);
            // 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 cache directory");
                Log.e(TAG, "Unable to setupGraphicsSupport due to missing code-cache directory");
            }
        }