summaryrefslogtreecommitdiff
path: root/core/java/android/view/TextureView.java
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2020-10-27 11:47:29 +0000
committerMathew Inwood <mathewi@google.com>2020-10-27 15:46:07 +0000
commit72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6 (patch)
treeb63a80a2c05239699b1600245ad2648d8ac98102 /core/java/android/view/TextureView.java
parent69bca6a5132e9e00dd069ab4c2e1e17d892fab7d (diff)
Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
Diffstat (limited to 'core/java/android/view/TextureView.java')
-rw-r--r--core/java/android/view/TextureView.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/core/java/android/view/TextureView.java b/core/java/android/view/TextureView.java
index a02070a21ac8..fc0ec4c560d4 100644
--- a/core/java/android/view/TextureView.java
+++ b/core/java/android/view/TextureView.java
@@ -29,6 +29,7 @@ import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.graphics.TextureLayer;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
@@ -117,7 +118,7 @@ public class TextureView extends View {
private SurfaceTextureListener mListener;
private boolean mHadSurface;
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private boolean mOpaque = true;
private final Matrix mMatrix = new Matrix();
@@ -125,7 +126,7 @@ public class TextureView extends View {
private final Object[] mLock = new Object[0];
private boolean mUpdateLayer;
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private boolean mUpdateSurface;
private Canvas mCanvas;
@@ -133,7 +134,7 @@ public class TextureView extends View {
private final Object[] mNativeWindowLock = new Object[0];
// Set by native code, do not write!
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private long mNativeWindow;
/**
@@ -227,7 +228,7 @@ public class TextureView extends View {
/** @hide */
@Override
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
protected void onDetachedFromWindowInternal() {
destroyHardwareLayer();
releaseSurfaceTexture();
@@ -244,7 +245,7 @@ public class TextureView extends View {
destroyHardwareLayer();
}
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private void destroyHardwareLayer() {
if (mLayer != null) {
mLayer.detachSurfaceTexture();
@@ -853,9 +854,9 @@ public class TextureView extends View {
void onSurfaceTextureUpdated(@NonNull SurfaceTexture surface);
}
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private native void nCreateNativeWindow(SurfaceTexture surface);
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
private native void nDestroyNativeWindow();
private static native boolean nLockCanvas(long nativeWindow, Canvas canvas, Rect dirty);