Add dalvik code for forEach.
Change-Id: I26533fc553315b99b8f177ab62d9735a177b26b0
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 754ebfb..4c505ec 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -420,6 +420,16 @@
validate();
rsnScriptInvoke(mContext, id, slot);
}
+ native void rsnScriptForEach(int con, int id, int slot, int ain, int aout, byte[] params);
+ native void rsnScriptForEach(int con, int id, int slot, int ain, int aout);
+ synchronized void nScriptForEach(int id, int slot, int ain, int aout, byte[] params) {
+ validate();
+ if (params == null) {
+ rsnScriptForEach(mContext, id, slot, ain, aout);
+ } else {
+ rsnScriptForEach(mContext, id, slot, ain, aout, params);
+ }
+ }
native void rsnScriptInvokeV(int con, int id, int slot, byte[] params);
synchronized void nScriptInvokeV(int id, int slot, byte[] params) {
validate();