LightsRequest


public final class LightsRequest
extends Object

java.lang.Object
   ↳ android.hardware.lights.LightsRequest


Encapsulates a request to modify the state of multiple lights.

Summary

Nested classes

class LightsRequest.Builder

Builder for creating device light change requests. 

Public methods

MultiLightEffect getEffect()

Get the configured effect.

List<LightState> getLightStates()

Get a list of LightState.

List<Integer> getLights()

Get a list of Light as ids.

Map<LightLightState> getLightsAndStates()

Get a map of lights and states.

Inherited methods

Public methods

getEffect

Added in API level 31
public MultiLightEffect getEffect ()

Get the configured effect.

Returns
MultiLightEffect configured effects in this request.
This value may be null.

getLightStates

Added in API level 31
public List<LightState> getLightStates ()

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

Returns
List<LightState> List of light states.
This value cannot be null.

getLights

Added in API level 31
public List<Integer> getLights ()

Get a list of Light as ids.

Returns
List<Integer> List of light ids in the request.
This value cannot be null.

getLightsAndStates

Added in API level 31
public Map<LightLightState> getLightsAndStates ()

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

Returns
Map<LightLightState> This value cannot be null.