From d1516dffa8d676fcad092d9736163829e6d0fdce Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 5 May 2015 18:00:34 -0700 Subject: Fix Allocation-less launches Cherry-pick fix from AOSP. Error check for kernel launch was generating a false positive. bug 20690242 Change-Id: Ic4c6644072a11aab9a273070be5734519136f685 --- rs/java/android/renderscript/Script.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rs/java/android') diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java index 6a1efee..7cd6d09 100644 --- a/rs/java/android/renderscript/Script.java +++ b/rs/java/android/renderscript/Script.java @@ -182,9 +182,9 @@ public class Script extends BaseObj { mRS.validateObject(ain); mRS.validateObject(aout); - if (ain == null && aout == null) { + if (ain == null && aout == null && sc == null) { throw new RSIllegalArgumentException( - "At least one of ain or aout is required to be non-null."); + "At least one of input allocation, output allocation, or LaunchOptions is required to be non-null."); } long[] in_ids = null; -- cgit v1.1