WindowLayoutInfo


public final class WindowLayoutInfo


Contains the list of DisplayFeature-s present in the window and the window's engagement mode.

Summary

Nested types

Represents a distinct user engagement mode with an application.

Public methods

boolean
equals(Object other)
final @NonNull List<@NonNull DisplayFeature>

The display features that are present in the window.

final @NonNull Set<@NonNull WindowLayoutInfo.EngagementMode>

The current user engagement modes, indicating how the user is interacting with the app.

final boolean

Checks if a specific engagement mode is currently active.

final boolean

Checks if all specified engagement modes are currently active.

int
@NonNull String

Public methods

equals

public boolean equals(Object other)

getDisplayFeatures

Added in 1.0.0
public final @NonNull List<@NonNull DisplayFeaturegetDisplayFeatures()

The display features that are present in the window. It is an empty list if there are no display features.

getEngagementModes

Added in 1.6.0-alpha03
public final @NonNull Set<@NonNull WindowLayoutInfo.EngagementModegetEngagementModes()

The current user engagement modes, indicating how the user is interacting with the app.

hasEngagementMode

Added in 1.6.0-alpha03
public final boolean hasEngagementMode(@NonNull WindowLayoutInfo.EngagementMode mode)

Checks if a specific engagement mode is currently active.

Parameters
@NonNull WindowLayoutInfo.EngagementMode mode

The EngagementMode to check for.

Returns
boolean

true if the mode is present in the engagementModes set, false otherwise.

hasEngagementModes

Added in 1.6.0-alpha03
public final boolean hasEngagementModes(@NonNull WindowLayoutInfo.EngagementMode... modes)

Checks if all specified engagement modes are currently active.

Parameters
@NonNull WindowLayoutInfo.EngagementMode... modes

The EngagementMode-s to check for.

Returns
boolean

true if all specified modes are in the engagementModes set, false otherwise.

hashCode

public int hashCode()

toString

public @NonNull String toString()