sm8150-common: sensors: Fix sub-HAL handle in dynamic sensor meta events
Need to apply the sub-HAL index byte to ensure handles provided in DYNAMIC_SENSOR_META events align properly with the [dis]connected callbacks. Bug: 228879057 Test: try on device with dynamic sensors sub-HAL at index > 0 Merged-In: Ic7290b51733bb829a5494ef41e9430b51dc6074e Change-Id: Ic7290b51733bb829a5494ef41e9430b51dc6074e
This commit is contained in:
parent
56a6368e97
commit
5f490fb597
|
@ -78,6 +78,10 @@ std::vector<V2_1::Event> HalProxyCallbackBase::processEvents(const std::vector<V
|
|||
if ((sensor.flags & V1_0::SensorFlagBits::WAKE_UP) != 0) {
|
||||
(*numWakeupEvents)++;
|
||||
}
|
||||
if (event.sensorType == V2_1::SensorType::DYNAMIC_SENSOR_META) {
|
||||
event.u.dynamic.sensorHandle =
|
||||
setSubHalIndex(event.u.dynamic.sensorHandle, mSubHalIndex);
|
||||
}
|
||||
eventsOut.push_back(event);
|
||||
}
|
||||
return eventsOut;
|
||||
|
|
Loading…
Reference in New Issue