Add mic mute keyboard led. (2/2)
Change-Id: I6e18c9d99d562aec112fc8ecb3d4e916285368c6
Test: Built
diff --git a/services/inputflinger/reader/controller/PeripheralController.cpp b/services/inputflinger/reader/controller/PeripheralController.cpp
index eabf591..27b9d23 100644
--- a/services/inputflinger/reader/controller/PeripheralController.cpp
+++ b/services/inputflinger/reader/controller/PeripheralController.cpp
@@ -505,9 +505,14 @@
// Check the rest of raw light infos
for (const auto& [rawId, rawInfo] : rawInfos) {
- InputDeviceLightType type = keyboardBacklightIds.find(rawId) != keyboardBacklightIds.end()
- ? InputDeviceLightType::KEYBOARD_BACKLIGHT
- : InputDeviceLightType::INPUT;
+ InputDeviceLightType type;
+ if (keyboardBacklightIds.find(rawId) != keyboardBacklightIds.end()) {
+ type = InputDeviceLightType::KEYBOARD_BACKLIGHT;
+ } else if (rawInfo.flags.test(InputLightClass::KEYBOARD_MIC_MUTE)) {
+ type = InputDeviceLightType::KEYBOARD_MIC_MUTE;
+ } else {
+ type = InputDeviceLightType::INPUT;
+ }
// If the node is multi-color led, construct a MULTI_COLOR light
if (rawInfo.flags.test(InputLightClass::MULTI_INDEX) &&