PlaceholderSurface


@RequiresApi(value = 17)
@UnstableApi
class PlaceholderSurface : Surface


A placeholder Surface.

Summary

Public functions

synchronized java-static Boolean

Returns whether the device supports secure placeholder surfaces.

java-static PlaceholderSurface!
newInstanceV17(context: Context!, secure: Boolean)

Returns a newly created placeholder surface.

Unit

Public properties

Boolean

Whether the surface is secure.

Inherited functions

From android.view.Surface
Unit
Int
Unit
Boolean
Canvas!
lockCanvas(inOutDirty: Rect!)
Canvas!
Unit
Unit
setFrameRate(
    frameRate: Float,
    compatibility: Int,
    changeFrameRateStrategy: Int
)
String!
Unit
unlockCanvas(canvas: Canvas!)

This function is deprecated.

Unit
Unit
writeToParcel(dest: Parcel!, flags: Int)

Public functions

isSecureSupported

synchronized java-static fun isSecureSupported(context: Context!): Boolean

Returns whether the device supports secure placeholder surfaces.

Parameters
context: Context!

Any Context.

Returns
Boolean

Whether the device supports secure placeholder surfaces.

newInstanceV17

java-static fun newInstanceV17(context: Context!, secure: Boolean): PlaceholderSurface!

Returns a newly created placeholder surface. The surface must be released by calling release when it's no longer required.

Must only be called if SDK_INT is 17 or higher.

Parameters
context: Context!

Any Context.

secure: Boolean

Whether a secure surface is required. Must only be requested if isSecureSupported returns true.

Throws
java.lang.IllegalStateException

If a secure surface is requested on a device for which isSecureSupported returns false.

release

fun release(): Unit

Public properties

secure

val secureBoolean

Whether the surface is secure.