WindowAreaInfo


@ExperimentalWindowApi
public final class WindowAreaInfo


The current state of a window area. The WindowAreaInfo can represent a part of or an entire display in the system. These values can be used to modify the UI to show/hide controls and determine when features can be enabled.

Summary

Nested types

Represents a type of WindowAreaInfo

Public methods

boolean
equals(Object other)
final WindowAreaSession

Returns the current active WindowAreaSession is one is currently active for the provided operation

final @NonNull WindowAreaCapability

Returns the WindowAreaCapability corresponding to the operation provided.

final @NonNull WindowMetrics

The WindowMetrics that represent the size of the area.

final @NonNull Binder

Binder token to identify the specific WindowArea

final @NonNull WindowAreaInfo.Type

The Type of this window area

int
final void

The WindowMetrics that represent the size of the area.

@NonNull String

Public methods

equals

public boolean equals(Object other)

getActiveSession

Added in 1.2.0
public final WindowAreaSession getActiveSession(@NonNull WindowAreaCapability.Operation operation)

Returns the current active WindowAreaSession is one is currently active for the provided operation

Throws
kotlin.IllegalStateException

if there is no active session for the provided operation

getCapability

Added in 1.2.0
public final @NonNull WindowAreaCapability getCapability(@NonNull WindowAreaCapability.Operation operation)

Returns the WindowAreaCapability corresponding to the operation provided. If this WindowAreaCapability does not exist for this WindowAreaInfo, a WindowAreaCapability with a WINDOW_AREA_STATUS_UNSUPPORTED value is returned.

getMetrics

Added in 1.2.0
public final @NonNull WindowMetrics getMetrics()

The WindowMetrics that represent the size of the area. Used to determine if the behavior desired fits the size of the window area available.

getToken

Added in 1.2.0
public final @NonNull Binder getToken()

Binder token to identify the specific WindowArea

getType

Added in 1.2.0
public final @NonNull WindowAreaInfo.Type getType()

The Type of this window area

hashCode

public int hashCode()

setMetrics

Added in 1.2.0
public final void setMetrics(@NonNull WindowMetrics metrics)

The WindowMetrics that represent the size of the area. Used to determine if the behavior desired fits the size of the window area available.

toString

public @NonNull String toString()