Add explicit Result::ok() checks where needed
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Exempt-From-Owner-Approval: mechanical mass refactoring
Change-Id: I4909e8a84541d8e60132b8f2f6f3ad0f3e036234
diff --git a/services/inputflinger/reader/mapper/SensorInputMapper.cpp b/services/inputflinger/reader/mapper/SensorInputMapper.cpp
index 7d97014..7ac2dec 100644
--- a/services/inputflinger/reader/mapper/SensorInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/SensorInputMapper.cpp
@@ -146,7 +146,7 @@
axisInfo.axis = -1;
// Check key layout map for sensor data mapping to axes
auto ret = getDeviceContext().mapSensor(abs);
- if (ret) {
+ if (ret.ok()) {
InputDeviceSensorType sensorType = (*ret).first;
int32_t sensorDataIndex = (*ret).second;
const Axis& axis = createAxis(axisInfo, rawAxisInfo);