ScrollCaptureSession


public class ScrollCaptureSession
extends Object

java.lang.Object
   ↳ android.view.ScrollCaptureSession


A session represents the scope of interaction between a ScrollCaptureCallback and the system during an active scroll capture operation.

Summary

Public constructors

ScrollCaptureSession(Surface surface, Rect scrollBounds, Point positionInWindow)

Constructs a new session instance.

Public methods

Point getPositionInWindow()

Returns the offset of scroll bounds within the window.

Rect getScrollBounds()

Returns the scroll bounds, as provided by ScrollCaptureCallback.onScrollCaptureSearch.

Surface getSurface()

Returns a BufferQueue in the form of a Surface for transfer of image buffers.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

ScrollCaptureSession

Added in API level 31
public ScrollCaptureSession (Surface surface, 
                Rect scrollBounds, 
                Point positionInWindow)

Constructs a new session instance.

Parameters
surface Surface: the surface to consume generated images This value cannot be null.

scrollBounds Rect: the bounds of the capture area within the containing view This value cannot be null.

positionInWindow Point: the offset of scrollBounds within the window This value cannot be null.

Public methods

getPositionInWindow

Added in API level 31
public Point getPositionInWindow ()

Returns the offset of scroll bounds within the window.

Returns
Point the area of scrolling content within the containing view This value cannot be null.

getScrollBounds

Added in API level 31
public Rect getScrollBounds ()

Returns the scroll bounds, as provided by ScrollCaptureCallback.onScrollCaptureSearch.

Returns
Rect the area of scrolling content within the containing view This value cannot be null.

getSurface

Added in API level 31
public Surface getSurface ()

Returns a BufferQueue in the form of a Surface for transfer of image buffers.

The surface is guaranteed to remain valid until the session ends.

Returns
Surface the surface for transferring image buffers This value cannot be null.

Throws
IllegalStateException if the session has been closed