Package com.google.android.exoplayer2.video

## Class DummySurface

- java.lang.Object
- - android.view.Surface
  - - com.google.android.exoplayer2.video.DummySurface

- All Implemented Interfaces:
    `Parcelable`

      public final class DummySurface
      extends Surface

  A dummy `Surface`.

- - ### 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` | Whether the surface is secure.

    - ### Fields inherited from class android.view.Surface

      `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
    Modifier and Type | Method | Description
    --- | --- | ---
    `static boolean` | `isSecureSupported​(Context context)` | Returns whether the device supports secure dummy surfaces.
    `static DummySurface` | `newInstanceV17​(Context context, boolean secure)` | Returns a newly created dummy surface.
    `void` | `release()` |

    - ### Methods inherited from class android.view.Surface

      `describeContents, finalize, isValid, lockCanvas, lockHardwareCanvas, readFromParcel, setFrameRate, toString, unlockCanvas, unlockCanvasAndPost, writeToParcel`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### secure

          public final boolean secure

      Whether the surface is secure.

  - ### Method Detail

    - #### isSecureSupported

          public static boolean isSecureSupported​(Context context)

      Returns whether the device supports secure dummy surfaces.
      Parameters:
        `context` - Any `Context`.
      Returns:
        Whether the device supports secure dummy surfaces.

    - #### newInstanceV17

          public static DummySurface newInstanceV17​(Context context,
                                                    boolean secure)

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

      Must only be called if `Util.SDK_INT` is 17 or higher.

      Parameters:
        `context` - Any `Context`.
        `secure` - Whether a secure surface is required. Must only be requested if `isSecureSupported(Context)` returns `true`.
      Throws:
        `IllegalStateException` - If a secure surface is requested on a device for which `isSecureSupported(Context)` returns `false`.

    - #### release

          public void release()

      Overrides:
        `release` in class `Surface`