LightsRequest.Builder
public
static
final
class
LightsRequest.Builder
extends Object
java.lang.Object | |
↳ | android.hardware.lights.LightsRequest.Builder |
Builder for creating device light change requests.
Summary
Public constructors | |
---|---|
Builder()
|
Public methods | |
---|---|
LightsRequest.Builder
|
addLight(Light light, LightState state)
Overrides the color and intensity of a given light. |
LightsRequest
|
build()
Create a LightsRequest object used to override lights on the device. |
LightsRequest.Builder
|
clearLight(Light light)
Removes the override for the color and intensity of a given light. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder ()
Public methods
addLight
public LightsRequest.Builder addLight (Light light, LightState state)
Overrides the color and intensity of a given light.
Parameters | |
---|---|
light |
Light : the light to modify
This value cannot be null . |
state |
LightState : the desired color and intensity of the light
This value cannot be null . |
Returns | |
---|---|
LightsRequest.Builder |
This value cannot be null . |
build
public LightsRequest build ()
Create a LightsRequest object used to override lights on the device.
The generated LightsRequest
should be used in
{@link LightsManager.Session#requestLights(LightsLightsRequest).
Returns | |
---|---|
LightsRequest |
This value cannot be null . |
clearLight
public LightsRequest.Builder clearLight (Light light)
Removes the override for the color and intensity of a given light.
Parameters | |
---|---|
light |
Light : the light to modify
This value cannot be null . |
Returns | |
---|---|
LightsRequest.Builder |
This value cannot be null . |