VisualStateRequest


public final class VisualStateRequest


A request to modify the visual state of the display for the window.

Useful for when the display is an opaque optical see-through display, e.g. XR glasses, that allows applications to request the display visuals remain sustained even if the screen would normally turn off.

Summary

Nested types

public final class VisualStateRequest.Builder

A builder for VisualStateRequest.

Public methods

boolean
equals(Object other)
int
final boolean

If true, requests the screen visuals to be sustained on displays when the system would otherwise turn off the screen.

@NonNull String

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

isSustainedVisualsEnabled

Added in 1.6.0-alpha03
public final boolean isSustainedVisualsEnabled()

If true, requests the screen visuals to be sustained on displays when the system would otherwise turn off the screen. The default value is false.

This feature is only supported on Android 16 (API level 37) and above. On lower API levels, the request will be ignored.

toString

public @NonNull String toString()