PlaceholderSurface
@UnstableApi
public final class PlaceholderSurface extends Surface
A placeholder Surface.
Summary
Public fields |
|
|---|---|
final boolean |
Whether the surface is secure. |
Public methods |
|
|---|---|
synchronized static boolean |
isSecureSupported(Context context)Returns whether the device supports secure placeholder surfaces. |
static PlaceholderSurface |
newInstance(Context context, boolean secure)Returns a newly created placeholder surface. |
static PlaceholderSurface |
@InlineMe(replacement = "PlaceholderSurface.newInstance(context, secure)", imports = "androidx.media3.exoplayer.video.PlaceholderSurface")This method is deprecated. Use |
void |
release() |
Inherited Constants |
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||
|
Inherited methods |
||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public fields
Public methods
isSecureSupported
synchronized public static boolean isSecureSupported(Context context)
Returns whether the device supports secure placeholder surfaces.
| Returns | |
|---|---|
boolean |
Whether the device supports secure placeholder surfaces. |
newInstance
public static PlaceholderSurface newInstance(Context context, boolean secure)
Returns a newly created placeholder surface. The surface must be released by calling release when it's no longer required.
| Parameters | |
|---|---|
Context context |
Any |
boolean secure |
Whether a secure surface is required. Must only be requested if |
| Throws | |
|---|---|
java.lang.IllegalStateException |
If a secure surface is requested on a device for which |
newInstanceV17
@InlineMe(replacement = "PlaceholderSurface.newInstance(context, secure)", imports = "androidx.media3.exoplayer.video.PlaceholderSurface")
public static PlaceholderSurfacenewInstanceV17(Context context, boolean secure)