Fix error for compiler update.
frameworks/native/services/inputflinger/reader/mapper/SensorInputMapper.cpp
:306:23: error: declaration shadows a local variable [-Werror,-Wshadow]
for (const auto& [sensorType, sensor] : mSensors) {
^
Bug: 193903230
Test: build with the next compiler
Change-Id: I8087db738cfbef82e8264bbbc22515361bd11bf1
diff --git a/services/inputflinger/reader/mapper/SensorInputMapper.cpp b/services/inputflinger/reader/mapper/SensorInputMapper.cpp
index 7ac2dec..a507632 100644
--- a/services/inputflinger/reader/mapper/SensorInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/SensorInputMapper.cpp
@@ -303,7 +303,7 @@
* the device
*/
mDeviceEnabled = false;
- for (const auto& [sensorType, sensor] : mSensors) {
+ for (const auto& [_, sensor] : mSensors) {
// If any sensor is on we will turn on the device.
if (sensor.enabled) {
mDeviceEnabled = true;