Added in API level 31

LightsRequest


class LightsRequest
kotlin.Any
   ↳ android.hardware.lights.LightsRequest

Encapsulates a request to modify the state of multiple lights.

Summary

Nested classes

Builder for creating device light change requests.

Public methods
MutableList<LightState!>

Get a list of LightState.

MutableList<Int!>

Get a list of Light as ids.

MutableMap<Light!, LightState!>

Get a map of lights and states.

Public methods

getLightStates

Added in API level 31
fun getLightStates(): MutableList<LightState!>

Get a list of LightState. The states will be returned in same order as the light ids returned by getLights().

Return
MutableList<LightState!> List of light states This value cannot be null.

getLights

Added in API level 31
fun getLights(): MutableList<Int!>

Get a list of Light as ids.

Return
MutableList<Int!> List of light ids in the request. This value cannot be null.

getLightsAndStates

Added in API level 31
fun getLightsAndStates(): MutableMap<Light!, LightState!>

Get a map of lights and states. The map will contain all the lights as keys and the corresponding LightState requested as values.

Return
MutableMap<Light!, LightState!> This value cannot be null.