Add @UnsupportedAppUsage annotations
For packages:
android.renderscript
This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.
Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@
Bug: 110868826
Test: m
Change-Id: I016f6e720e79c48afe44f4690b5dd99fc81ae780
Merged-In: I1aa8ebca448547031b426a7b305c5c3d6fcf2652
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index 487628d..1ccad5b 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -4254,96 +4254,6 @@
Landroid/R$styleable;->Window:[I
Landroid/R$styleable;->Window_windowBackground:I
Landroid/R$styleable;->Window_windowFrame:I
-Landroid/renderscript/BaseObj;->mRS:Landroid/renderscript/RenderScript;
-Landroid/renderscript/Element;->createUser(Landroid/renderscript/RenderScript;Landroid/renderscript/Element$DataType;)Landroid/renderscript/Element;
-Landroid/renderscript/FileA3D$EntryType;->MESH:Landroid/renderscript/FileA3D$EntryType;
-Landroid/renderscript/FileA3D$IndexEntry;->getEntryType()Landroid/renderscript/FileA3D$EntryType;
-Landroid/renderscript/FileA3D$IndexEntry;->getObject()Landroid/renderscript/BaseObj;
-Landroid/renderscript/FileA3D;->createFromResource(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;I)Landroid/renderscript/FileA3D;
-Landroid/renderscript/FileA3D;->getIndexEntry(I)Landroid/renderscript/FileA3D$IndexEntry;
-Landroid/renderscript/Font$Style;->ITALIC:Landroid/renderscript/Font$Style;
-Landroid/renderscript/Font;->create(Landroid/renderscript/RenderScript;Landroid/content/res/Resources;Ljava/lang/String;Landroid/renderscript/Font$Style;F)Landroid/renderscript/Font;
-Landroid/renderscript/Matrix4f;->mMat:[F
-Landroid/renderscript/Mesh$AllocationBuilder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetAllocation(Landroid/renderscript/Allocation;Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
-Landroid/renderscript/Mesh$AllocationBuilder;->addIndexSetType(Landroid/renderscript/Mesh$Primitive;)Landroid/renderscript/Mesh$AllocationBuilder;
-Landroid/renderscript/Mesh$AllocationBuilder;->addVertexAllocation(Landroid/renderscript/Allocation;)Landroid/renderscript/Mesh$AllocationBuilder;
-Landroid/renderscript/Mesh$AllocationBuilder;->create()Landroid/renderscript/Mesh;
-Landroid/renderscript/Mesh$Primitive;->POINT:Landroid/renderscript/Mesh$Primitive;
-Landroid/renderscript/Mesh$Primitive;->TRIANGLE:Landroid/renderscript/Mesh$Primitive;
-Landroid/renderscript/Mesh$TriangleMeshBuilder;-><init>(Landroid/renderscript/RenderScript;II)V
-Landroid/renderscript/Mesh$TriangleMeshBuilder;->addTriangle(III)Landroid/renderscript/Mesh$TriangleMeshBuilder;
-Landroid/renderscript/Mesh$TriangleMeshBuilder;->addVertex(FF)Landroid/renderscript/Mesh$TriangleMeshBuilder;
-Landroid/renderscript/Mesh$TriangleMeshBuilder;->create(Z)Landroid/renderscript/Mesh;
-Landroid/renderscript/Mesh;->getVertexAllocation(I)Landroid/renderscript/Allocation;
-Landroid/renderscript/Program$BaseProgramBuilder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/Program$BaseProgramBuilder;->mConstantCount:I
-Landroid/renderscript/Program$BaseProgramBuilder;->mConstants:[Landroid/renderscript/Type;
-Landroid/renderscript/Program$BaseProgramBuilder;->mInputCount:I
-Landroid/renderscript/Program$BaseProgramBuilder;->mInputs:[Landroid/renderscript/Element;
-Landroid/renderscript/Program$BaseProgramBuilder;->mOutputCount:I
-Landroid/renderscript/Program$BaseProgramBuilder;->mOutputs:[Landroid/renderscript/Element;
-Landroid/renderscript/Program$BaseProgramBuilder;->mRS:Landroid/renderscript/RenderScript;
-Landroid/renderscript/Program$BaseProgramBuilder;->mShader:Ljava/lang/String;
-Landroid/renderscript/Program$BaseProgramBuilder;->mTextureCount:I
-Landroid/renderscript/Program$TextureType;->TEXTURE_2D:Landroid/renderscript/Program$TextureType;
-Landroid/renderscript/ProgramFragment$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramFragment$Builder;->create()Landroid/renderscript/ProgramFragment;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->MODULATE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;->REPLACE:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->ALPHA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGB:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;->RGBA:Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->create()Landroid/renderscript/ProgramFragmentFixedFunction;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setTexture(Landroid/renderscript/ProgramFragmentFixedFunction$Builder$EnvMode;Landroid/renderscript/ProgramFragmentFixedFunction$Builder$Format;I)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
-Landroid/renderscript/ProgramFragmentFixedFunction$Builder;->setVaryingColor(Z)Landroid/renderscript/ProgramFragmentFixedFunction$Builder;
-Landroid/renderscript/ProgramRaster$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramRaster$Builder;->create()Landroid/renderscript/ProgramRaster;
-Landroid/renderscript/ProgramRaster$Builder;->setPointSpriteEnabled(Z)Landroid/renderscript/ProgramRaster$Builder;
-Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE:Landroid/renderscript/ProgramStore$BlendDstFunc;
-Landroid/renderscript/ProgramStore$BlendDstFunc;->ONE_MINUS_SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendDstFunc;
-Landroid/renderscript/ProgramStore$BlendDstFunc;->ZERO:Landroid/renderscript/ProgramStore$BlendDstFunc;
-Landroid/renderscript/ProgramStore$BlendSrcFunc;->ONE:Landroid/renderscript/ProgramStore$BlendSrcFunc;
-Landroid/renderscript/ProgramStore$BlendSrcFunc;->SRC_ALPHA:Landroid/renderscript/ProgramStore$BlendSrcFunc;
-Landroid/renderscript/ProgramStore$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramStore$Builder;->create()Landroid/renderscript/ProgramStore;
-Landroid/renderscript/ProgramStore$Builder;->setBlendFunc(Landroid/renderscript/ProgramStore$BlendSrcFunc;Landroid/renderscript/ProgramStore$BlendDstFunc;)Landroid/renderscript/ProgramStore$Builder;
-Landroid/renderscript/ProgramStore$Builder;->setDepthFunc(Landroid/renderscript/ProgramStore$DepthFunc;)Landroid/renderscript/ProgramStore$Builder;
-Landroid/renderscript/ProgramStore$Builder;->setDepthMaskEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
-Landroid/renderscript/ProgramStore$Builder;->setDitherEnabled(Z)Landroid/renderscript/ProgramStore$Builder;
-Landroid/renderscript/ProgramStore$DepthFunc;->ALWAYS:Landroid/renderscript/ProgramStore$DepthFunc;
-Landroid/renderscript/ProgramStore$DepthFunc;->LESS:Landroid/renderscript/ProgramStore$DepthFunc;
-Landroid/renderscript/ProgramStore;->BLEND_ALPHA_DEPTH_NONE(Landroid/renderscript/RenderScript;)Landroid/renderscript/ProgramStore;
-Landroid/renderscript/ProgramVertex$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramVertex$Builder;->addInput(Landroid/renderscript/Element;)Landroid/renderscript/ProgramVertex$Builder;
-Landroid/renderscript/ProgramVertex$Builder;->create()Landroid/renderscript/ProgramVertex;
-Landroid/renderscript/ProgramVertexFixedFunction$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramVertexFixedFunction$Builder;->create()Landroid/renderscript/ProgramVertexFixedFunction;
-Landroid/renderscript/ProgramVertexFixedFunction$Constants;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/ProgramVertexFixedFunction$Constants;->setProjection(Landroid/renderscript/Matrix4f;)V
-Landroid/renderscript/ProgramVertexFixedFunction;->bindConstants(Landroid/renderscript/ProgramVertexFixedFunction$Constants;)V
-Landroid/renderscript/RenderScript;->create(Landroid/content/Context;I)Landroid/renderscript/RenderScript;
-Landroid/renderscript/RenderScript;->create(Landroid/content/Context;ILandroid/renderscript/RenderScript$ContextType;I)Landroid/renderscript/RenderScript;
-Landroid/renderscript/RenderScript;->getMinorID()J
-Landroid/renderscript/RenderScript;->mMessageCallback:Landroid/renderscript/RenderScript$RSMessageHandler;
-Landroid/renderscript/RenderScript;->nScriptCCreate(Ljava/lang/String;Ljava/lang/String;[BI)J
-Landroid/renderscript/RenderScript;->sPointerSize:I
-Landroid/renderscript/RenderScript;->validate()V
-Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File;
-Landroid/renderscript/RenderScriptCacheDir;->setupDiskCache(Ljava/io/File;)V
-Landroid/renderscript/RenderScriptGL$SurfaceConfig;-><init>()V
-Landroid/renderscript/RenderScriptGL$SurfaceConfig;->setDepth(II)V
-Landroid/renderscript/RenderScriptGL;-><init>(Landroid/content/Context;Landroid/renderscript/RenderScriptGL$SurfaceConfig;)V
-Landroid/renderscript/RenderScriptGL;->bindProgramRaster(Landroid/renderscript/ProgramRaster;)V
-Landroid/renderscript/RenderScriptGL;->bindProgramStore(Landroid/renderscript/ProgramStore;)V
-Landroid/renderscript/RenderScriptGL;->bindProgramVertex(Landroid/renderscript/ProgramVertex;)V
-Landroid/renderscript/RenderScriptGL;->bindRootScript(Landroid/renderscript/Script;)V
-Landroid/renderscript/RenderScriptGL;->setSurface(Landroid/view/SurfaceHolder;II)V
-Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;)V
-Landroid/renderscript/RSSurfaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
-Landroid/renderscript/Script$Builder;-><init>(Landroid/renderscript/RenderScript;)V
-Landroid/renderscript/Script$Builder;->mRS:Landroid/renderscript/RenderScript;
Landroid/security/Credentials;->convertToPem([Ljava/security/cert/Certificate;)[B
Landroid/security/Credentials;->getInstance()Landroid/security/Credentials;
Landroid/security/Credentials;->install(Landroid/content/Context;Ljava/lang/String;[B)V
diff --git a/rs/java/android/renderscript/BaseObj.java b/rs/java/android/renderscript/BaseObj.java
index f95af16..b7e05d9 100644
--- a/rs/java/android/renderscript/BaseObj.java
+++ b/rs/java/android/renderscript/BaseObj.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import dalvik.system.CloseGuard;
import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -73,6 +74,7 @@
final CloseGuard guard = CloseGuard.get();
private boolean mDestroyed;
private String mName;
+ @UnsupportedAppUsage
RenderScript mRS;
/**
diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java
index 667bf71..b8eb3a1 100644
--- a/rs/java/android/renderscript/Element.java
+++ b/rs/java/android/renderscript/Element.java
@@ -16,6 +16,8 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* <p>An Element represents one item within an {@link
* android.renderscript.Allocation}. An Element is roughly equivalent to a C
@@ -1146,6 +1148,7 @@
* @param dt The DataType for the new element.
* @return Element
*/
+ @UnsupportedAppUsage
static Element createUser(RenderScript rs, DataType dt) {
DataKind dk = DataKind.USER;
boolean norm = false;
diff --git a/rs/java/android/renderscript/FileA3D.java b/rs/java/android/renderscript/FileA3D.java
index 278d309..9a6b0bc 100644
--- a/rs/java/android/renderscript/FileA3D.java
+++ b/rs/java/android/renderscript/FileA3D.java
@@ -19,6 +19,7 @@
import java.io.File;
import java.io.InputStream;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.content.res.Resources;
@@ -53,6 +54,7 @@
* @deprecated in API 16
* RenderScript Mesh object
**/
+ @UnsupportedAppUsage
MESH (1);
int mID;
@@ -100,6 +102,7 @@
* @return type of a renderscript object the index entry
* describes
*/
+ @UnsupportedAppUsage
public EntryType getEntryType() {
return mEntryType;
}
@@ -109,6 +112,7 @@
* Used to load the object described by the index entry
* @return base renderscript object described by the entry
*/
+ @UnsupportedAppUsage
public BaseObj getObject() {
mRS.validate();
BaseObj obj = internalCreate(mRS, this);
@@ -212,6 +216,7 @@
*
* @return entry in the a3d file described by the index
*/
+ @UnsupportedAppUsage
public IndexEntry getIndexEntry(int index) {
if(getIndexEntryCount() == 0 || index < 0 || index >= mFileEntries.length) {
return null;
@@ -284,6 +289,7 @@
*
* @return a3d file containing renderscript objects
*/
+ @UnsupportedAppUsage
static public FileA3D createFromResource(RenderScript rs, Resources res, int id) {
rs.validate();
diff --git a/rs/java/android/renderscript/Font.java b/rs/java/android/renderscript/Font.java
index d5ca31e..583350e 100644
--- a/rs/java/android/renderscript/Font.java
+++ b/rs/java/android/renderscript/Font.java
@@ -23,6 +23,7 @@
import android.os.Environment;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.AssetManager;
import android.content.res.Resources;
@@ -85,6 +86,7 @@
/**
* @deprecated in API 16
*/
+ @UnsupportedAppUsage
ITALIC,
/**
* @deprecated in API 16
@@ -236,6 +238,7 @@
*
* Returns default font if no match could be found.
*/
+ @UnsupportedAppUsage
static public Font create(RenderScript rs, Resources res, String familyName, Style fontStyle, float pointSize) {
String fileName = getFontFileName(familyName, fontStyle);
String fontPath = Environment.getRootDirectory().getAbsolutePath();
diff --git a/rs/java/android/renderscript/Matrix4f.java b/rs/java/android/renderscript/Matrix4f.java
index 5d5bf5f..026c9fb 100644
--- a/rs/java/android/renderscript/Matrix4f.java
+++ b/rs/java/android/renderscript/Matrix4f.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import java.lang.Math;
@@ -489,5 +490,6 @@
}
}
+ @UnsupportedAppUsage
final float[] mMat;
}
diff --git a/rs/java/android/renderscript/Mesh.java b/rs/java/android/renderscript/Mesh.java
index 9e4f905..5321dcb 100644
--- a/rs/java/android/renderscript/Mesh.java
+++ b/rs/java/android/renderscript/Mesh.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import java.util.Vector;
/**
@@ -49,6 +50,7 @@
* @deprecated in API 16
* Vertex data will be rendered as a series of points
*/
+ @UnsupportedAppUsage
POINT (0),
/**
* @deprecated in API 16
@@ -64,6 +66,7 @@
* @deprecated in API 16
* Vertices will be rendered as individual triangles
*/
+ @UnsupportedAppUsage
TRIANGLE (3),
/**
* @deprecated in API 16
@@ -111,6 +114,7 @@
* @return vertex data allocation at the given index
*
**/
+ @UnsupportedAppUsage
public Allocation getVertexAllocation(int slot) {
return mVertexBuffers[slot];
}
@@ -424,6 +428,7 @@
/**
* @deprecated in API 16
**/
+ @UnsupportedAppUsage
public AllocationBuilder(RenderScript rs) {
mRS = rs;
mVertexTypeCount = 0;
@@ -458,6 +463,7 @@
*
* @return this
**/
+ @UnsupportedAppUsage
public AllocationBuilder addVertexAllocation(Allocation a) throws IllegalStateException {
if (mVertexTypeCount >= mVertexTypes.length) {
throw new IllegalStateException("Max vertex types exceeded.");
@@ -479,6 +485,7 @@
*
* @return this
**/
+ @UnsupportedAppUsage
public AllocationBuilder addIndexSetAllocation(Allocation a, Primitive p) {
Entry indexType = new Entry();
indexType.a = a;
@@ -495,6 +502,7 @@
*
* @return this
**/
+ @UnsupportedAppUsage
public AllocationBuilder addIndexSetType(Primitive p) {
Entry indexType = new Entry();
indexType.a = null;
@@ -508,6 +516,7 @@
* Create a Mesh object from the current state of the builder
*
**/
+ @UnsupportedAppUsage
public Mesh create() {
mRS.validate();
@@ -596,6 +605,7 @@
* channels are present in the mesh
*
**/
+ @UnsupportedAppUsage
public TriangleMeshBuilder(RenderScript rs, int vtxSize, int flags) {
mRS = rs;
mVtxCount = 0;
@@ -652,6 +662,7 @@
* @return this
*
**/
+ @UnsupportedAppUsage
public TriangleMeshBuilder addVertex(float x, float y) {
if (mVtxSize != 2) {
throw new IllegalStateException("add mistmatch with declared components.");
@@ -757,6 +768,7 @@
*
* @return this
**/
+ @UnsupportedAppUsage
public TriangleMeshBuilder addTriangle(int idx1, int idx2, int idx3) {
if((idx1 >= mMaxIndex) || (idx1 < 0) ||
(idx2 >= mMaxIndex) || (idx2 < 0) ||
@@ -789,6 +801,7 @@
* accessible memory
*
**/
+ @UnsupportedAppUsage
public Mesh create(boolean uploadToBufferObject) {
Element.Builder b = new Element.Builder(mRS);
b.add(Element.createVector(mRS,
diff --git a/rs/java/android/renderscript/Program.java b/rs/java/android/renderscript/Program.java
index 772021c..e28d646 100644
--- a/rs/java/android/renderscript/Program.java
+++ b/rs/java/android/renderscript/Program.java
@@ -21,6 +21,7 @@
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
+import android.annotation.UnsupportedAppUsage;
import android.content.res.Resources;
import android.util.Log;
@@ -45,6 +46,7 @@
*
**/
public enum TextureType {
+ @UnsupportedAppUsage
TEXTURE_2D (0),
TEXTURE_CUBE (1);
@@ -199,20 +201,30 @@
public static class BaseProgramBuilder {
+ @UnsupportedAppUsage
RenderScript mRS;
+ @UnsupportedAppUsage
Element mInputs[];
+ @UnsupportedAppUsage
Element mOutputs[];
+ @UnsupportedAppUsage
Type mConstants[];
Type mTextures[];
TextureType mTextureTypes[];
String mTextureNames[];
+ @UnsupportedAppUsage
int mInputCount;
+ @UnsupportedAppUsage
int mOutputCount;
+ @UnsupportedAppUsage
int mConstantCount;
+ @UnsupportedAppUsage
int mTextureCount;
+ @UnsupportedAppUsage
String mShader;
+ @UnsupportedAppUsage
protected BaseProgramBuilder(RenderScript rs) {
mRS = rs;
mInputs = new Element[MAX_INPUT];
diff --git a/rs/java/android/renderscript/ProgramFragment.java b/rs/java/android/renderscript/ProgramFragment.java
index 5f71bd1..3dde9b6 100644
--- a/rs/java/android/renderscript/ProgramFragment.java
+++ b/rs/java/android/renderscript/ProgramFragment.java
@@ -16,6 +16,8 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
@@ -50,6 +52,7 @@
*
* @param rs Context to which the program will belong.
*/
+ @UnsupportedAppUsage
public Builder(RenderScript rs) {
super(rs);
}
@@ -60,6 +63,7 @@
*
* @return ProgramFragment
*/
+ @UnsupportedAppUsage
public ProgramFragment create() {
mRS.validate();
long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
diff --git a/rs/java/android/renderscript/ProgramFragmentFixedFunction.java b/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
index 2b647c76..d05d41d 100644
--- a/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
+++ b/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
@@ -16,6 +16,8 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
@@ -102,10 +104,12 @@
/**
* @deprecated in API 16
**/
+ @UnsupportedAppUsage
REPLACE (1),
/**
* @deprecated in API 16
**/
+ @UnsupportedAppUsage
MODULATE (2),
/**
* @deprecated in API 16
@@ -128,6 +132,7 @@
/**
* @deprecated in API 16
**/
+ @UnsupportedAppUsage
ALPHA (1),
/**
* @deprecated in API 16
@@ -136,10 +141,12 @@
/**
* @deprecated in API 16
**/
+ @UnsupportedAppUsage
RGB (3),
/**
* @deprecated in API 16
**/
+ @UnsupportedAppUsage
RGBA (4);
int mID;
@@ -228,6 +235,7 @@
*
* @param rs Context to which the program will belong.
*/
+ @UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
mSlots = new Slot[MAX_TEXTURE];
@@ -248,6 +256,7 @@
*
* @return this
*/
+ @UnsupportedAppUsage
public Builder setTexture(EnvMode env, Format fmt, int slot)
throws IllegalArgumentException {
if((slot < 0) || (slot >= MAX_TEXTURE)) {
@@ -277,6 +286,7 @@
* fragment shader
*
**/
+ @UnsupportedAppUsage
public Builder setVaryingColor(boolean enable) {
mVaryingColorEnable = enable;
return this;
@@ -288,6 +298,7 @@
* state of the builder.
*
*/
+ @UnsupportedAppUsage
public ProgramFragmentFixedFunction create() {
InternalBuilder sb = new InternalBuilder(mRS);
mNumTextures = 0;
diff --git a/rs/java/android/renderscript/ProgramRaster.java b/rs/java/android/renderscript/ProgramRaster.java
index 8c7c9aa..33000ac 100644
--- a/rs/java/android/renderscript/ProgramRaster.java
+++ b/rs/java/android/renderscript/ProgramRaster.java
@@ -16,6 +16,8 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
@@ -124,6 +126,7 @@
/**
* @deprecated in API 16
*/
+ @UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
mPointSprite = false;
@@ -133,6 +136,7 @@
/**
* @deprecated in API 16
*/
+ @UnsupportedAppUsage
public Builder setPointSpriteEnabled(boolean enable) {
mPointSprite = enable;
return this;
@@ -149,6 +153,7 @@
/**
* @deprecated in API 16
*/
+ @UnsupportedAppUsage
public ProgramRaster create() {
mRS.validate();
long id = mRS.nProgramRasterCreate(mPointSprite, mCullMode.mID);
diff --git a/rs/java/android/renderscript/ProgramStore.java b/rs/java/android/renderscript/ProgramStore.java
index c0fa9c4..622fe21 100644
--- a/rs/java/android/renderscript/ProgramStore.java
+++ b/rs/java/android/renderscript/ProgramStore.java
@@ -16,6 +16,8 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
@@ -45,11 +47,13 @@
/**
* Always drawn
*/
+ @UnsupportedAppUsage
ALWAYS (0),
/**
* Drawn if the incoming depth value is less than that in the
* depth buffer
*/
+ @UnsupportedAppUsage
LESS (1),
/**
* Drawn if the incoming depth value is less or equal to that in
@@ -93,9 +97,11 @@
*/
public enum BlendSrcFunc {
ZERO (0),
+ @UnsupportedAppUsage
ONE (1),
DST_COLOR (2),
ONE_MINUS_DST_COLOR (3),
+ @UnsupportedAppUsage
SRC_ALPHA (4),
ONE_MINUS_SRC_ALPHA (5),
DST_ALPHA (6),
@@ -118,11 +124,14 @@
*
*/
public enum BlendDstFunc {
+ @UnsupportedAppUsage
ZERO (0),
+ @UnsupportedAppUsage
ONE (1),
SRC_COLOR (2),
ONE_MINUS_SRC_COLOR (3),
SRC_ALPHA (4),
+ @UnsupportedAppUsage
ONE_MINUS_SRC_ALPHA (5),
DST_ALPHA (6),
ONE_MINUS_DST_ALPHA (7);
@@ -299,6 +308,7 @@
*
* @param rs Context to which the program will belong.
**/
+ @UnsupportedAppUsage
public static ProgramStore BLEND_ALPHA_DEPTH_NONE(RenderScript rs) {
if(rs.mProgramStore_BLEND_ALPHA_DEPTH_NO_DEPTH == null) {
ProgramStore.Builder builder = new ProgramStore.Builder(rs);
@@ -328,6 +338,7 @@
BlendDstFunc mBlendDst;
boolean mDither;
+ @UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
mDepthFunc = DepthFunc.ALWAYS;
@@ -347,6 +358,7 @@
*
* @return this
*/
+ @UnsupportedAppUsage
public Builder setDepthFunc(DepthFunc func) {
mDepthFunc = func;
return this;
@@ -360,6 +372,7 @@
*
* @return this
*/
+ @UnsupportedAppUsage
public Builder setDepthMaskEnabled(boolean enable) {
mDepthMask = enable;
return this;
@@ -394,6 +407,7 @@
*
* @return this
*/
+ @UnsupportedAppUsage
public Builder setBlendFunc(BlendSrcFunc src, BlendDstFunc dst) {
mBlendSrc = src;
mBlendDst = dst;
@@ -408,6 +422,7 @@
*
* @return this
*/
+ @UnsupportedAppUsage
public Builder setDitherEnabled(boolean enable) {
mDither = enable;
return this;
@@ -416,6 +431,7 @@
/**
* Creates a program store from the current state of the builder
*/
+ @UnsupportedAppUsage
public ProgramStore create() {
mRS.validate();
long id = mRS.nProgramStoreCreate(mColorMaskR, mColorMaskG, mColorMaskB, mColorMaskA,
diff --git a/rs/java/android/renderscript/ProgramVertex.java b/rs/java/android/renderscript/ProgramVertex.java
index 0d7e2d9..83d9ea7 100644
--- a/rs/java/android/renderscript/ProgramVertex.java
+++ b/rs/java/android/renderscript/ProgramVertex.java
@@ -38,6 +38,8 @@
**/
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
@@ -90,6 +92,7 @@
*
* @param rs Context to which the program will belong.
*/
+ @UnsupportedAppUsage
public Builder(RenderScript rs) {
super(rs);
}
@@ -102,6 +105,7 @@
* structure
* @return self
*/
+ @UnsupportedAppUsage
public Builder addInput(Element e) throws IllegalStateException {
// Should check for consistant and non-conflicting names...
if(mInputCount >= MAX_INPUT) {
@@ -120,6 +124,7 @@
*
* @return ProgramVertex
*/
+ @UnsupportedAppUsage
public ProgramVertex create() {
mRS.validate();
long[] tmp = new long[(mInputCount + mOutputCount + mConstantCount + mTextureCount) * 2];
diff --git a/rs/java/android/renderscript/ProgramVertexFixedFunction.java b/rs/java/android/renderscript/ProgramVertexFixedFunction.java
index 45840ae..579d3bb 100644
--- a/rs/java/android/renderscript/ProgramVertexFixedFunction.java
+++ b/rs/java/android/renderscript/ProgramVertexFixedFunction.java
@@ -16,6 +16,8 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
+
/**
* @hide
@@ -38,6 +40,7 @@
*
* @param va allocation containing fixed function matrices
*/
+ @UnsupportedAppUsage
public void bindConstants(Constants va) {
mRS.validate();
bindConstants(va.getAllocation(), 0);
@@ -118,6 +121,7 @@
*
* @param rs Context to which the program will belong.
*/
+ @UnsupportedAppUsage
public Builder(RenderScript rs) {
mRS = rs;
}
@@ -170,6 +174,7 @@
*
* @return Fixed function emulation ProgramVertex
*/
+ @UnsupportedAppUsage
public ProgramVertexFixedFunction create() {
buildShaderString();
@@ -215,6 +220,7 @@
*
* @param rs Context to which the allocation will belong.
**/
+ @UnsupportedAppUsage
public Constants(RenderScript rs) {
Type constInputType = ProgramVertexFixedFunction.Builder.getConstantInputType(rs);
mAlloc = Allocation.createTyped(rs, constInputType);
@@ -268,6 +274,7 @@
*
* @param m projection matrix
*/
+ @UnsupportedAppUsage
public void setProjection(Matrix4f m) {
mProjection.load(m);
addToBuffer(PROJECTION_OFFSET*4, m);
diff --git a/rs/java/android/renderscript/RSSurfaceView.java b/rs/java/android/renderscript/RSSurfaceView.java
index 5db72d9..561373c 100644
--- a/rs/java/android/renderscript/RSSurfaceView.java
+++ b/rs/java/android/renderscript/RSSurfaceView.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.util.AttributeSet;
import android.view.SurfaceHolder;
@@ -42,6 +43,7 @@
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
*/
+ @UnsupportedAppUsage
public RSSurfaceView(Context context) {
super(context);
init();
@@ -54,6 +56,7 @@
* must call {@link android.opengl.GLSurfaceView#setRenderer} to
* register a renderer.
*/
+ @UnsupportedAppUsage
public RSSurfaceView(Context context, AttributeSet attrs) {
super(context, attrs);
init();
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index 0f22568..4293157 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -22,6 +22,7 @@
import java.util.ArrayList;
import java.util.concurrent.locks.ReentrantReadWriteLock;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
@@ -103,6 +104,7 @@
* Detect the bitness of the VM to allow FieldPacker to do the right thing.
*/
static native int rsnSystemGetPointerSize();
+ @UnsupportedAppUsage
static int sPointerSize;
static {
@@ -153,6 +155,7 @@
* @return Always return 1
*
*/
+ @UnsupportedAppUsage
public static long getMinorID() {
return 1;
}
@@ -833,6 +836,7 @@
native long rsnScriptCCreate(long con, String resName, String cacheDir,
byte[] script, int length);
+ @UnsupportedAppUsage
synchronized long nScriptCCreate(String resName, String cacheDir, byte[] script, int length) {
validate();
return rsnScriptCCreate(mContext, resName, cacheDir, script, length);
@@ -1158,6 +1162,7 @@
* sendToClient} by scripts from this context.
*
*/
+ @UnsupportedAppUsage
RSMessageHandler mMessageCallback = null;
public void setMessageHandler(RSMessageHandler msg) {
@@ -1232,6 +1237,7 @@
}
}
+ @UnsupportedAppUsage
void validate() {
if (mContext == 0) {
throw new RSInvalidStateException("Calling RS with no Context active.");
@@ -1495,6 +1501,7 @@
* @param sdkVersion The target SDK Version.
* @return RenderScript
*/
+ @UnsupportedAppUsage
public static RenderScript create(Context ctx, int sdkVersion) {
return create(ctx, sdkVersion, ContextType.NORMAL, CREATE_FLAG_NONE);
}
@@ -1508,6 +1515,7 @@
* @param flags The OR of the CREATE_FLAG_* options desired
* @return RenderScript
*/
+ @UnsupportedAppUsage
private static RenderScript create(Context ctx, int sdkVersion, ContextType ct, int flags) {
if (sdkVersion < 23) {
return internalCreate(ctx, sdkVersion, ct, flags);
diff --git a/rs/java/android/renderscript/RenderScriptCacheDir.java b/rs/java/android/renderscript/RenderScriptCacheDir.java
index 95a9d75..1797bef 100644
--- a/rs/java/android/renderscript/RenderScriptCacheDir.java
+++ b/rs/java/android/renderscript/RenderScriptCacheDir.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import java.io.File;
/**
@@ -30,11 +31,13 @@
* @hide
* @param cacheDir A directory the current process can write to
*/
+ @UnsupportedAppUsage
public static void setupDiskCache(File cacheDir) {
// Defer creation of cache path to nScriptCCreate().
mCacheDir = cacheDir;
}
+ @UnsupportedAppUsage
static File mCacheDir;
}
diff --git a/rs/java/android/renderscript/RenderScriptGL.java b/rs/java/android/renderscript/RenderScriptGL.java
index be1f899..6fac83e 100644
--- a/rs/java/android/renderscript/RenderScriptGL.java
+++ b/rs/java/android/renderscript/RenderScriptGL.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.graphics.SurfaceTexture;
import android.view.Surface;
@@ -65,6 +66,7 @@
/**
* @deprecated in API 16
*/
+ @UnsupportedAppUsage
public SurfaceConfig() {
}
@@ -132,6 +134,7 @@
* @param minimum
* @param preferred
*/
+ @UnsupportedAppUsage
public void setDepth(int minimum, int preferred) {
validateRange(minimum, preferred, 0, 24);
mDepthMin = minimum;
@@ -169,6 +172,7 @@
* @param ctx The context.
* @param sc The desired format of the primary rendering surface.
*/
+ @UnsupportedAppUsage
public RenderScriptGL(Context ctx, SurfaceConfig sc) {
super(ctx);
mSurfaceConfig = new SurfaceConfig(sc);
@@ -202,6 +206,7 @@
* @param h
* @param sur
*/
+ @UnsupportedAppUsage
public void setSurface(SurfaceHolder sur, int w, int h) {
validate();
Surface s = null;
@@ -281,6 +286,7 @@
*
* @param s Graphics script to process rendering requests.
*/
+ @UnsupportedAppUsage
public void bindRootScript(Script s) {
validate();
nContextBindRootScript((int)safeID(s));
@@ -293,6 +299,7 @@
*
* @param p
*/
+ @UnsupportedAppUsage
public void bindProgramStore(ProgramStore p) {
validate();
nContextBindProgramStore((int)safeID(p));
@@ -317,6 +324,7 @@
*
* @param p
*/
+ @UnsupportedAppUsage
public void bindProgramRaster(ProgramRaster p) {
validate();
nContextBindProgramRaster((int)safeID(p));
@@ -329,6 +337,7 @@
*
* @param p
*/
+ @UnsupportedAppUsage
public void bindProgramVertex(ProgramVertex p) {
validate();
nContextBindProgramVertex((int)safeID(p));
diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java
index d0d9a11..9ad9aea 100644
--- a/rs/java/android/renderscript/Script.java
+++ b/rs/java/android/renderscript/Script.java
@@ -16,6 +16,7 @@
package android.renderscript;
+import android.annotation.UnsupportedAppUsage;
import android.util.SparseArray;
/**
@@ -475,8 +476,10 @@
*
*/
public static class Builder {
+ @UnsupportedAppUsage
RenderScript mRS;
+ @UnsupportedAppUsage
Builder(RenderScript rs) {
mRS = rs;
}