Move cache dir to its own class.
This prevents us from loading the RS static initializer all the time. Change-Id: I8cea7540e50251aba8c2f199f06f344f991e7d7f
This commit is contained in:
@@ -124,7 +124,7 @@ public class ScriptC extends Script {
|
||||
|
||||
// Create the RS cache path if we haven't done so already.
|
||||
if (mCachePath == null) {
|
||||
File f = new File(rs.mCacheDir, CACHE_PATH);
|
||||
File f = new File(RenderScriptCacheDir.mCacheDir, CACHE_PATH);
|
||||
mCachePath = f.getAbsolutePath();
|
||||
f.mkdirs();
|
||||
}
|
||||
@@ -135,7 +135,7 @@ public class ScriptC extends Script {
|
||||
private static synchronized long internalStringCreate(RenderScript rs, String resName, byte[] bitcode) {
|
||||
// Create the RS cache path if we haven't done so already.
|
||||
if (mCachePath == null) {
|
||||
File f = new File(rs.mCacheDir, CACHE_PATH);
|
||||
File f = new File(RenderScriptCacheDir.mCacheDir, CACHE_PATH);
|
||||
mCachePath = f.getAbsolutePath();
|
||||
f.mkdirs();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user