Implement type generation for user uniforms in vertex shader.
diff --git a/graphics/java/android/renderscript/Program.java b/graphics/java/android/renderscript/Program.java
index 9d70cb2..1614ec5 100644
--- a/graphics/java/android/renderscript/Program.java
+++ b/graphics/java/android/renderscript/Program.java
@@ -111,12 +111,13 @@
             mOutputs[mOutputCount++] = e;
         }
 
-        public void addConstant(Type t) throws IllegalStateException {
+        public int addConstant(Type t) throws IllegalStateException {
             // Should check for consistant and non-conflicting names...
             if(mConstantCount >= MAX_CONSTANT) {
                 throw new IllegalArgumentException("Max input count exceeded.");
             }
-            mConstants[mConstantCount++] = t;
+            mConstants[mConstantCount] = t;
+            return mConstantCount++;
         }
 
         public void setTextureCount(int count) throws IllegalArgumentException {