Added in API level 31
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<Light, LightState>
|
getLightsAndStates()
Get a map of lights and states. |
Inherited methods | |
---|---|
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<Light, LightState> 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<Light, LightState> |
This value cannot be null . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]