Fix sub-HAL handle in dynamic sensor meta events am: 280fd70dc4
am: f36e358316
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2064302 Change-Id: I3163ef73f89393ab0d2e60849d6ad551b9246cbb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
b0625b0c96
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