Fix issue with older structure sizes

When structures are enlarged in RS we need to use the script
API number to properly handle the older cases.

Bug: 19734267

Change-Id: I0ffd3dc4cea1640f2b14c588df3a93eee749e74e
diff --git a/rsScript.h b/rsScript.h
index 80bc622..12de95c 100644
--- a/rsScript.h
+++ b/rsScript.h
@@ -142,9 +142,14 @@
     }
     virtual void callUpdateCacheObject(const Context *rsc, void *dstObj) const;
 
+    uint32_t getApiLevel() const {
+        return mApiLevel;
+    }
+
 protected:
     bool mInitialized;
     bool mHasObjectSlots;
+    uint32_t mApiLevel;
     ObjectBaseRef<Allocation> *mSlots;
     ObjectBaseRef<const Type> *mTypes;