VisualStateRequest


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

A builder for VisualStateRequest.

Public functions

open operator Boolean
equals(other: Any?)
open Int
Boolean

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

open String

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

isSustainedVisualsEnabled

Added in 1.6.0-alpha03
fun isSustainedVisualsEnabled(): Boolean

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

open fun toString(): String