Fix sub-HAL handle in dynamic sensor meta events am: 280fd70dc4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2064302 Change-Id: I33879a2a441fe8ea6190f98973be6a55499793ad Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
f36e358316
1 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,10 @@ std::vector<V2_1::Event> HalProxyCallbackBase::processEvents(const std::vector<V
|
||||||
std::vector<V2_1::Event> eventsOut;
|
std::vector<V2_1::Event> eventsOut;
|
||||||
for (V2_1::Event event : events) {
|
for (V2_1::Event event : events) {
|
||||||
event.sensorHandle = setSubHalIndex(event.sensorHandle, mSubHalIndex);
|
event.sensorHandle = setSubHalIndex(event.sensorHandle, mSubHalIndex);
|
||||||
|
if (event.sensorType == V2_1::SensorType::DYNAMIC_SENSOR_META) {
|
||||||
|
event.u.dynamic.sensorHandle =
|
||||||
|
setSubHalIndex(event.u.dynamic.sensorHandle, mSubHalIndex);
|
||||||
|
}
|
||||||
eventsOut.push_back(event);
|
eventsOut.push_back(event);
|
||||||
const V2_1::SensorInfo& sensor = mCallback->getSensorInfo(event.sensorHandle);
|
const V2_1::SensorInfo& sensor = mCallback->getSensorInfo(event.sensorHandle);
|
||||||
if ((sensor.flags & V1_0::SensorFlagBits::WAKE_UP) != 0) {
|
if ((sensor.flags & V1_0::SensorFlagBits::WAKE_UP) != 0) {
|
||||||
|
|
Loading…
Reference in a new issue