ViewfinderSurfaceSession


public interface ViewfinderSurfaceSession extends AutoCloseable


A session of a Surface provided by a viewfinder.

The enclosed Surface is where pixels can be written by the client to be shown in the viewfinder that created this session. When the client no longer needs to write into the surface, the session must be closed with close. Failure to call close could potentially delay releasing significant resources.

Summary

Public methods

abstract @NonNull ViewfinderSurfaceRequest

The ViewfinderSurfaceRequest responsible for this session.

abstract @NonNull Surface

The android.view.Surface available for this session.

Inherited methods

From java.lang.AutoCloseable
abstract void

Public methods

getRequest

Added in 1.5.0-beta01
abstract @NonNull ViewfinderSurfaceRequest getRequest()

The ViewfinderSurfaceRequest responsible for this session.

getSurface

Added in 1.5.0-beta01
abstract @NonNull Surface getSurface()

The android.view.Surface available for this session. Users of this surface should not call Surface.release, and should close the session with close instead when the surface is no longer in use.