Class PlaceholderSurface
- java.lang.Object
-
- android.view.Surface
-
- com.google.android.exoplayer2.video.PlaceholderSurface
-
- All Implemented Interfaces:
Parcelable
@RequiresApi(17) @Deprecated public final class PlaceholderSurface extends Surface
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.A placeholderSurface
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class android.view.Surface
Surface.OutOfResourcesException
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description boolean
secure
Deprecated.Whether the surface is secure.-
Fields inherited from class android.view.Surface
CHANGE_FRAME_RATE_ALWAYS, CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS, CREATOR, FRAME_RATE_COMPATIBILITY_DEFAULT, FRAME_RATE_COMPATIBILITY_FIXED_SOURCE, ROTATION_0, ROTATION_180, ROTATION_270, ROTATION_90
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
isSecureSupported(Context context)
Deprecated.Returns whether the device supports secure placeholder surfaces.static PlaceholderSurface
newInstanceV17(Context context, boolean secure)
Deprecated.Returns a newly created placeholder surface.void
release()
Deprecated.-
Methods inherited from class android.view.Surface
describeContents, finalize, isValid, lockCanvas, lockHardwareCanvas, readFromParcel, setFrameRate, setFrameRate, toString, unlockCanvas, unlockCanvasAndPost, writeToParcel
-
-
-
-
Method Detail
-
isSecureSupported
public static boolean isSecureSupported(Context context)
Deprecated.Returns whether the device supports secure placeholder surfaces.- Parameters:
context
- AnyContext
.- Returns:
- Whether the device supports secure placeholder surfaces.
-
newInstanceV17
public static PlaceholderSurface newInstanceV17(Context context, boolean secure)
Deprecated.Returns a newly created placeholder surface. The surface must be released by callingrelease()
when it's no longer required.Must only be called if
Util.SDK_INT
is 17 or higher.- Parameters:
context
- AnyContext
.secure
- Whether a secure surface is required. Must only be requested ifisSecureSupported(Context)
returnstrue
.- Throws:
IllegalStateException
- If a secure surface is requested on a device for whichisSecureSupported(Context)
returnsfalse
.
-
-