Home
last modified time | relevance | path

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

/frameworks/native/services/inputflinger/reader/controller/
DPeripheralControllerInterface.h43 virtual bool setLightColor(int32_t lightId, int32_t color) = 0;
44 virtual bool setLightPlayerId(int32_t lightId, int32_t playerId) = 0;
45 virtual std::optional<int32_t> getLightColor(int32_t lightId) = 0;
46 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.h37 bool setLightColor(int32_t lightId, int32_t color) override;
38 bool setLightPlayerId(int32_t lightId, int32_t playerId) override;
39 std::optional<int32_t> getLightColor(int32_t lightId) override;
40 std::optional<int32_t> getLightPlayerId(int32_t lightId) override;
/frameworks/native/services/inputflinger/reader/include/
DInputDevice.h106 bool setLightColor(int32_t lightId, int32_t color);
107 bool setLightPlayerId(int32_t lightId, int32_t playerId);
108 std::optional<int32_t> getLightColor(int32_t lightId);
109 std::optional<int32_t> getLightPlayerId(int32_t lightId);
291 inline std::optional<RawLightInfo> getRawLightInfo(int32_t lightId) { in getRawLightInfo() argument
292 return mEventHub->getRawLightInfo(mId, lightId); in getRawLightInfo()
295 inline std::optional<int32_t> getLightBrightness(int32_t lightId) { in getLightBrightness() argument
296 return mEventHub->getLightBrightness(mId, lightId); in getLightBrightness()
299 inline void setLightBrightness(int32_t lightId, int32_t brightness) { in setLightBrightness() argument
300 return mEventHub->setLightBrightness(mId, lightId, brightness); in setLightBrightness()
[all …]
DEventHub.h294 virtual std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) = 0;
295 virtual std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) = 0;
296 virtual void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) = 0;
298 int32_t deviceId, int32_t lightId) = 0;
299 virtual void setLightIntensities(int32_t deviceId, int32_t lightId,
472 std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) override final;
474 std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) override final;
475 void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) override final;
477 int32_t deviceId, int32_t lightId) override final;
478 void setLightIntensities(int32_t deviceId, int32_t lightId,
DInputReader.h107 bool setLightColor(int32_t deviceId, int32_t lightId, int32_t color) override;
109 bool setLightPlayerId(int32_t deviceId, int32_t lightId, int32_t playerId) override;
111 std::optional<int32_t> getLightColor(int32_t deviceId, int32_t lightId) override;
113 std::optional<int32_t> getLightPlayerId(int32_t deviceId, int32_t lightId) override;
/frameworks/base/services/core/java/com/android/server/input/
DNativeInputManagerService.java137 int getLightPlayerId(int deviceId, int lightId); in getLightPlayerId() argument
139 int getLightColor(int deviceId, int lightId); in getLightColor() argument
141 void setLightPlayerId(int deviceId, int lightId, int playerId); in setLightPlayerId() argument
143 void setLightColor(int deviceId, int lightId, int color); in setLightColor() argument
329 public native int getLightPlayerId(int deviceId, int lightId); in getLightPlayerId() argument
332 public native int getLightColor(int deviceId, int lightId); in getLightColor() argument
335 public native void setLightPlayerId(int deviceId, int lightId, int playerId); in setLightPlayerId() argument
338 public native void setLightColor(int deviceId, int lightId, int color); in setLightColor() argument
DInputManagerService.java2625 public @Nullable LightState getLightState(int deviceId, int lightId) { in getLightState() argument
2627 int color = mNative.getLightColor(deviceId, lightId); in getLightState()
2628 int playerId = mNative.getLightPlayerId(deviceId, lightId); in getLightState()
/frameworks/native/services/inputflinger/reader/mapper/
DInputMapper.h83 virtual bool setLightColor(int32_t lightId, int32_t color) { return true; } in setLightColor() argument
84 virtual bool setLightPlayerId(int32_t lightId, int32_t playerId) { return true; } in setLightPlayerId() argument
85 virtual std::optional<int32_t> getLightColor(int32_t lightId) { return std::nullopt; } in getLightColor() argument
86 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.h137 virtual bool setLightColor(int32_t deviceId, int32_t lightId, int32_t color) = 0;
139 virtual bool setLightPlayerId(int32_t deviceId, int32_t lightId, int32_t playerId) = 0;
141 virtual std::optional<int32_t> getLightColor(int32_t deviceId, int32_t lightId) = 0;
143 virtual std::optional<int32_t> getLightPlayerId(int32_t deviceId, int32_t lightId) = 0;
/frameworks/native/services/inputflinger/reader/
DInputDevice.cpp563 bool InputDevice::setLightColor(int32_t lightId, int32_t color) { in setLightColor() argument
564 return mController ? mController->setLightColor(lightId, color) : false; in setLightColor()
567 bool InputDevice::setLightPlayerId(int32_t lightId, int32_t playerId) { in setLightPlayerId() argument
568 return mController ? mController->setLightPlayerId(lightId, playerId) : false; in setLightPlayerId()
571 std::optional<int32_t> InputDevice::getLightColor(int32_t lightId) { in getLightColor() argument
572 return mController ? mController->getLightColor(lightId) : std::nullopt; in getLightColor()
575 std::optional<int32_t> InputDevice::getLightPlayerId(int32_t lightId) { in getLightPlayerId() argument
576 return mController ? mController->getLightPlayerId(lightId) : std::nullopt; in getLightPlayerId()
DInputReader.cpp729 bool InputReader::setLightColor(int32_t deviceId, int32_t lightId, int32_t color) { in setLightColor() argument
734 return device->setLightColor(lightId, color); in setLightColor()
739 bool InputReader::setLightPlayerId(int32_t deviceId, int32_t lightId, int32_t playerId) { in setLightPlayerId() argument
744 return device->setLightPlayerId(lightId, playerId); in setLightPlayerId()
749 std::optional<int32_t> InputReader::getLightColor(int32_t deviceId, int32_t lightId) { in getLightColor() argument
754 return device->getLightColor(lightId); in getLightColor()
759 std::optional<int32_t> InputReader::getLightPlayerId(int32_t deviceId, int32_t lightId) { in getLightPlayerId() argument
764 return device->getLightPlayerId(lightId); in getLightPlayerId()
DEventHub.cpp1110 std::optional<RawLightInfo> EventHub::getRawLightInfo(int32_t deviceId, int32_t lightId) { in getRawLightInfo() argument
1115 auto it = infos.find(lightId); in getRawLightInfo()
1123 std::optional<int32_t> EventHub::getLightBrightness(int32_t deviceId, int32_t lightId) { in getLightBrightness() argument
1127 auto it = infos.find(lightId); in getLightBrightness()
1140 int32_t deviceId, int32_t lightId) { in getLightIntensities() argument
1144 auto lightIt = infos.find(lightId); in getLightIntensities()
1179 void EventHub::setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) { in setLightBrightness() argument
1183 auto lightIt = infos.find(lightId); in setLightBrightness()
1185 ALOGE("%s lightId %d not found ", __func__, lightId); in setLightBrightness()
1196 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.aidl150 LightState getLightState(int deviceId, int lightId); in getLightState() argument
/frameworks/base/services/core/jni/
Dcom_android_server_input_InputManagerService.cpp2043 jint lightId) { in nativeGetLightPlayerId() argument
2047 im->getInputManager()->getReader().getLightPlayerId(deviceId, lightId); in nativeGetLightPlayerId()
2052 static jint nativeGetLightColor(JNIEnv* env, jobject nativeImplObj, jint deviceId, jint lightId) { in nativeGetLightColor() argument
2056 im->getInputManager()->getReader().getLightColor(deviceId, lightId); in nativeGetLightColor()
2060 static void nativeSetLightPlayerId(JNIEnv* env, jobject nativeImplObj, jint deviceId, jint lightId, in nativeSetLightPlayerId() argument
2064 im->getInputManager()->getReader().setLightPlayerId(deviceId, lightId, playerId); in nativeSetLightPlayerId()
2067 static void nativeSetLightColor(JNIEnv* env, jobject nativeImplObj, jint deviceId, jint lightId, in nativeSetLightColor() argument
2071 im->getInputManager()->getReader().setLightColor(deviceId, lightId, color); in nativeSetLightColor()
/frameworks/native/services/inputflinger/tests/
DInputReader_test.cpp1031 std::optional<RawLightInfo> getRawLightInfo(int32_t deviceId, int32_t lightId) override { in getRawLightInfo() argument
1032 auto it = mRawLightInfos.find(lightId); in getRawLightInfo()
1039 void setLightBrightness(int32_t deviceId, int32_t lightId, int32_t brightness) override { in setLightBrightness() argument
1040 mLightBrightness.emplace(lightId, brightness); in setLightBrightness()
1043 void setLightIntensities(int32_t deviceId, int32_t lightId, in setLightIntensities() argument
1045 mLightIntensities.emplace(lightId, intensities); in setLightIntensities()
1048 std::optional<int32_t> getLightBrightness(int32_t deviceId, int32_t lightId) override { in getLightBrightness() argument
1049 auto lightIt = mLightBrightness.find(lightId); in getLightBrightness()
1057 int32_t deviceId, int32_t lightId) override { in getLightIntensities() argument
1058 auto lightIt = mLightIntensities.find(lightId); in getLightIntensities()
[all …]