Add error checks to the copyFrom functions.

Change-Id: Iac064c52eb58b05a94fa1c432304c6216256555b
diff --git a/graphics/java/android/renderscript/Mesh.java b/graphics/java/android/renderscript/Mesh.java
index fcf8178..c20151e 100644
--- a/graphics/java/android/renderscript/Mesh.java
+++ b/graphics/java/android/renderscript/Mesh.java
@@ -733,14 +733,14 @@
 
             Mesh sm = smb.create();
 
-            sm.getVertexAllocation(0).copyFrom(mVtxData);
+            sm.getVertexAllocation(0).copy1DRangeFromUnchecked(0, mVtxCount / floatCount, mVtxData);
             if(uploadToBufferObject) {
                 if (uploadToBufferObject) {
                     sm.getVertexAllocation(0).syncAll(Allocation.USAGE_SCRIPT);
                 }
             }
 
-            sm.getIndexSetAllocation(0).copyFrom(mIndexData);
+            sm.getIndexSetAllocation(0).copy1DRangeFromUnchecked(0, mIndexCount, mIndexData);
             if (uploadToBufferObject) {
                 sm.getIndexSetAllocation(0).syncAll(Allocation.USAGE_SCRIPT);
             }