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

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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public methods

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.