Do RS caching the same way HardwareRenderer does.
Eliminates the need for an application context for caching.
Change-Id: I4374738083b5eb4ce983d2cb5409428e3668c423
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index bf632a9..5d1d461 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -78,6 +78,7 @@
import android.view.Window;
import android.view.WindowManager;
import android.view.WindowManagerImpl;
+import android.renderscript.RenderScript;
import com.android.internal.os.BinderInternal;
import com.android.internal.os.RuntimeInit;
@@ -3779,6 +3780,7 @@
appContext.init(info, null, this);
HardwareRenderer.setupDiskCache(appContext.getCacheDir());
+ RenderScript.setupDiskCache(appContext.getCacheDir());
}
} catch (RemoteException e) {
// Ignore