diff options
author | Stephen Hines <srhines@google.com> | 2013-02-08 21:03:51 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2013-02-08 21:03:51 -0800 |
commit | 5f528becb09b0956bcad15b32639f87b87f40f13 (patch) | |
tree | fcb2a9f5bdb27b4ad30005b8eb39fe587623a293 /graphics | |
parent | a9a7b3740598c79792cbcebca6a00d1595324ae9 (diff) | |
download | frameworks_base-5f528becb09b0956bcad15b32639f87b87f40f13.zip frameworks_base-5f528becb09b0956bcad15b32639f87b87f40f13.tar.gz frameworks_base-5f528becb09b0956bcad15b32639f87b87f40f13.tar.bz2 |
Check Element in all API levels for copy2DRangeFrom().
Change-Id: I561317671a16888fc9f35908ab1ae1489a14fc6c
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/renderscript/Allocation.java | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/graphics/java/android/renderscript/Allocation.java b/graphics/java/android/renderscript/Allocation.java index 7e43a9a..1c83c51 100644 --- a/graphics/java/android/renderscript/Allocation.java +++ b/graphics/java/android/renderscript/Allocation.java @@ -899,38 +899,22 @@ public class Allocation extends BaseObj { * @param data to be placed into the allocation */ public void copy2DRangeFrom(int xoff, int yoff, int w, int h, byte[] data) { - // We can only validate the type on API 18+, since this check was not present in - // earlier releases. - if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) { - validateIsInt8(); - } + validateIsInt8(); copy2DRangeFromUnchecked(xoff, yoff, w, h, data); } public void copy2DRangeFrom(int xoff, int yoff, int w, int h, short[] data) { - // We can only validate the type on API 18+, since this check was not present in - // earlier releases. - if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) { - validateIsInt16(); - } + validateIsInt16(); copy2DRangeFromUnchecked(xoff, yoff, w, h, data); } public void copy2DRangeFrom(int xoff, int yoff, int w, int h, int[] data) { - // We can only validate the type on API 18+, since this check was not present in - // earlier releases. - if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) { - validateIsInt32(); - } + validateIsInt32(); copy2DRangeFromUnchecked(xoff, yoff, w, h, data); } public void copy2DRangeFrom(int xoff, int yoff, int w, int h, float[] data) { - // We can only validate the type on API 18+, since this check was not present in - // earlier releases. - if (mRS.getApplicationContext().getApplicationInfo().targetSdkVersion >= 18) { - validateIsFloat32(); - } + validateIsFloat32(); copy2DRangeFromUnchecked(xoff, yoff, w, h, data); } |