Home
last modified time | relevance | path

Searched refs:lightId (Results 1 – 18 of 18) sorted by relevance

/frameworks/native/services/inputflinger/reader/controller/
DPeripheralControllerInterface.h41 virtual bool setLightColor(int32_t lightId, int32_t color) = 0;
42 virtual bool setLightPlayerId(int32_t lightId, int32_t playerId) = 0;
43 virtual std::optional<int32_t> getLightColor(int32_t lightId) = 0;
44 virtual std::optional<int32_t> getLightPlayerId(int32_t lightId) = 0;
DPeripheralController.cpp275 for (const auto& [lightId, light] : mLights) { in populateDeviceInfo()
286 for (const auto& [lightId, light] : mLights) { in dump()
287 dump += StringPrintf(INDENT4 "Id: %d", lightId); in dump()
482 bool PeripheralController::setLightColor(int32_t lightId, int32_t color) { in setLightColor() argument
483 auto it = mLights.find(lightId); in setLightColor()
489 ALOGD("setLightColor lightId %d type %s color 0x%x", lightId, in setLightColor()
495 std::optional<int32_t> PeripheralController::getLightColor(int32_t lightId) { in getLightColor() argument
496 auto it = mLights.find(lightId); in getLightColor()
503 ALOGD("getLightColor lightId %d type %s color 0x%x", lightId, in getLightColor()
509 bool PeripheralController::setLightPlayerId(int32_t lightId, int32_t playerId) { in setLightPlayerId() argument
[all …]
DPeripheralController.h36 bool setLightColor(int32_t lightId, int32_t color) override;
37 bool setLightPlayerId(int32_t lightId, int32_t playerId) override;
38 std::optional<int32_t> getLightColor(int32_t lightId) override;
39 std::optional<int32_t> getLightPlayerId(int32_t lightId) override;
/frameworks/native/services/inputflinger/reader/include/
DInputDevice.h102 bool setLightColor(int32_t lightId, int32_t color);
103 bool setLightPlayerId(int32_t lightId, int32_t playerId);
104 std::optional<int32_t> getLightColor(int32_t lightId);
105 std::optional<int32_t> getLightPlayerId(int32_t lightId);
286 inline std::optional<RawLightInfo> getRawLightInfo(int32_t lightId) { in getRawLightInfo() argument
287 return mEventHub->getRawLightInfo(mId, lightId); in getRawLightInfo()
290 inline std::optional<int32_t> getLightBrightness(int32_t lightId) { in getLightBrightness() argument
291 return mEventHub->getLightBrightness(mId, lightId); in getLightBrightness()
294 inline void setLightBrightness(int32_t lightId, int32_t brightness) { in setLightBrightness() argument
295 return mEventHub->setLightBrightness(mId, lightId, brightness); in setLightBrightness()
[all …]
DEventHub.h292 virtual std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) = 0;
293 virtual std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) = 0;
294 virtual void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) = 0;
296 int32_t deviceId, int32_t lightId) = 0;
297 virtual void setLightIntensities(int32_t deviceId, int32_t lightId,
468 std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) override final;
470 std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) override final;
471 void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) override final;
473 int32_t deviceId, int32_t lightId) override final;
474 void setLightIntensities(int32_t deviceId, int32_t lightId,
DInputReader.h106 bool setLightColor(int32_t deviceId, int32_t lightId, int32_t color) override;
108 bool setLightPlayerId(int32_t deviceId, int32_t lightId, int32_t playerId) override;
110 std::optional<int32_t> getLightColor(int32_t deviceId, int32_t lightId) override;
112 std::optional<int32_t> getLightPlayerId(int32_t deviceId, int32_t lightId) override;
/frameworks/native/services/inputflinger/reader/mapper/
DInputMapper.h80 virtual bool setLightColor(int32_t lightId, int32_t color) { return true; } in setLightColor() argument
81 virtual bool setLightPlayerId(int32_t lightId, int32_t playerId) { return true; } in setLightPlayerId() argument
82 virtual std::optional<int32_t> getLightColor(int32_t lightId) { return std::nullopt; } in getLightColor() argument
83 virtual std::optional<int32_t> getLightPlayerId(int32_t lightId) { return std::nullopt; } in getLightPlayerId() argument
/frameworks/base/services/core/java/com/android/server/lights/
DLightsService.java82 void setRequest(int lightId, LightState state) { in setRequest() argument
84 mRequests.put(lightId, state); in setRequest()
86 mRequests.remove(lightId); in setRequest()
148 public @Nullable LightState getLightState(int lightId) { in getLightState() argument
153 final LightImpl light = mLightsById.get(lightId); in getLightState()
155 throw new IllegalArgumentException("Invalid light: " + lightId); in getLightState()
229 for (int lightId : lightIds) { in checkRequestIsValid()
230 final LightImpl light = mLightsById.get(lightId); in checkRequestIsValid()
232 "Invalid lightId " + lightId); in checkRequestIsValid()
/frameworks/native/services/inputflinger/include/
DInputReaderBase.h135 virtual bool setLightColor(int32_t deviceId, int32_t lightId, int32_t color) = 0;
137 virtual bool setLightPlayerId(int32_t deviceId, int32_t lightId, int32_t playerId) = 0;
139 virtual std::optional<int32_t> getLightColor(int32_t deviceId, int32_t lightId) = 0;
141 virtual std::optional<int32_t> getLightPlayerId(int32_t deviceId, int32_t lightId) = 0;
/frameworks/native/services/inputflinger/reader/
DInputDevice.cpp539 bool InputDevice::setLightColor(int32_t lightId, int32_t color) { in setLightColor() argument
540 return mController ? mController->setLightColor(lightId, color) : false; in setLightColor()
543 bool InputDevice::setLightPlayerId(int32_t lightId, int32_t playerId) { in setLightPlayerId() argument
544 return mController ? mController->setLightPlayerId(lightId, playerId) : false; in setLightPlayerId()
547 std::optional<int32_t> InputDevice::getLightColor(int32_t lightId) { in getLightColor() argument
548 return mController ? mController->getLightColor(lightId) : std::nullopt; in getLightColor()
551 std::optional<int32_t> InputDevice::getLightPlayerId(int32_t lightId) { in getLightPlayerId() argument
552 return mController ? mController->getLightPlayerId(lightId) : std::nullopt; in getLightPlayerId()
DInputReader.cpp716 bool InputReader::setLightColor(int32_t deviceId, int32_t lightId, int32_t color) { in setLightColor() argument
721 return device->setLightColor(lightId, color); in setLightColor()
726 bool InputReader::setLightPlayerId(int32_t deviceId, int32_t lightId, int32_t playerId) { in setLightPlayerId() argument
731 return device->setLightPlayerId(lightId, playerId); in setLightPlayerId()
736 std::optional<int32_t> InputReader::getLightColor(int32_t deviceId, int32_t lightId) { in getLightColor() argument
741 return device->getLightColor(lightId); in getLightColor()
746 std::optional<int32_t> InputReader::getLightPlayerId(int32_t deviceId, int32_t lightId) { in getLightPlayerId() argument
751 return device->getLightPlayerId(lightId); in getLightPlayerId()
DEventHub.cpp1046 std::optional<RawLightInfo> EventHub::getRawLightInfo(int32_t deviceId, int32_t lightId) { in getRawLightInfo() argument
1051 auto it = infos.find(lightId); in getRawLightInfo()
1059 std::optional<int32_t> EventHub::getLightBrightness(int32_t deviceId, int32_t lightId) { in getLightBrightness() argument
1063 auto it = infos.find(lightId); in getLightBrightness()
1076 int32_t deviceId, int32_t lightId) { in getLightIntensities() argument
1080 auto lightIt = infos.find(lightId); in getLightIntensities()
1115 void EventHub::setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) { in setLightBrightness() argument
1119 auto lightIt = infos.find(lightId); in setLightBrightness()
1121 ALOGE("%s lightId %d not found ", __func__, lightId); in setLightBrightness()
1132 void EventHub::setLightIntensities(int32_t deviceId, int32_t lightId, in setLightIntensities() argument
[all …]
/frameworks/base/core/java/android/hardware/lights/
DILightsManager.aidl29 LightState getLightState(int lightId); in getLightState() argument
/frameworks/base/core/tests/coretests/src/android/hardware/input/
DInputDeviceLightsManagerTest.java100 int lightId = (int) invocation.getArguments()[1]; in setUp()
101 if (lightStatesById.containsKey(lightId)) { in setUp()
102 return lightStatesById.get(lightId); in setUp()
/frameworks/base/core/java/android/hardware/input/
DIInputManager.aidl140 LightState getLightState(int deviceId, int lightId); in getLightState() argument
/frameworks/base/services/core/jni/
Dcom_android_server_input_InputManagerService.cpp2029 jint lightId) { in nativeGetLightPlayerId() argument
2033 im->getInputManager()->getReader()->getLightPlayerId(deviceId, lightId); in nativeGetLightPlayerId()
2039 jint lightId) { in nativeGetLightColor() argument
2043 im->getInputManager()->getReader()->getLightColor(deviceId, lightId); in nativeGetLightColor()
2048 jint lightId, jint playerId) { in nativeSetLightPlayerId() argument
2051 im->getInputManager()->getReader()->setLightPlayerId(deviceId, lightId, playerId); in nativeSetLightPlayerId()
2055 jint lightId, jint color) { in nativeSetLightColor() argument
2058 im->getInputManager()->getReader()->setLightColor(deviceId, lightId, color); in nativeSetLightColor()
/frameworks/base/services/core/java/com/android/server/input/
DInputManagerService.java331 private static native int nativeGetLightPlayerId(long ptr, int deviceId, int lightId); in nativeGetLightPlayerId() argument
332 private static native int nativeGetLightColor(long ptr, int deviceId, int lightId); in nativeGetLightColor() argument
333 private static native void nativeSetLightPlayerId(long ptr, int deviceId, int lightId, in nativeSetLightPlayerId() argument
335 private static native void nativeSetLightColor(long ptr, int deviceId, int lightId, int color); in nativeSetLightColor() argument
2529 public @Nullable LightState getLightState(int deviceId, int lightId) { in getLightState() argument
2531 int color = nativeGetLightColor(mPtr, deviceId, lightId); in getLightState()
2532 int playerId = nativeGetLightPlayerId(mPtr, deviceId, lightId); in getLightState()
/frameworks/native/services/inputflinger/tests/
DInputReader_test.cpp925 std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) override { in getRawLightInfo() argument
926 auto it = mRawLightInfos.find(lightId); in getRawLightInfo()
933 void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) override { in setLightBrightness() argument
934 mLightBrightness.emplace(lightId, brightness); in setLightBrightness()
937 void setLightIntensities(int32_t deviceId, int32_t lightId, in setLightIntensities() argument
939 mLightIntensities.emplace(lightId, intensities); in setLightIntensities()
942 std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) override { in getLightBrightness() argument
943 auto lightIt = mLightBrightness.find(lightId); in getLightBrightness()
951 int32_t deviceId, int32_t lightId) override { in getLightIntensities() argument
952 auto lightIt = mLightIntensities.find(lightId); in getLightIntensities()
[all …]