Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cad1fa9 authored by Chris Ye's avatar Chris Ye
Browse files

Retain sensor data vector mapping when disabled.

When sensor is disabled, do not clear sensor data vector mapping array.
This fixed the sensor data corruption when re-enabling sensor.

Bug: 161634265
Test: atest inputflinger_tests
Change-Id: I624b99b7d8e0a37fa3d76277f35d75ff5890a710
parent 4083086e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
lzye@google.com
michaelwr@google.com
michaelwr@google.com
svv@google.com
svv@google.com
+0 −1
Original line number Original line Diff line number Diff line
@@ -98,7 +98,6 @@ private:
            this->samplingPeriod = std::chrono::nanoseconds(0);
            this->samplingPeriod = std::chrono::nanoseconds(0);
            this->maxBatchReportLatency = std::chrono::nanoseconds(0);
            this->maxBatchReportLatency = std::chrono::nanoseconds(0);
            this->lastSampleTimeNs = std::nullopt;
            this->lastSampleTimeNs = std::nullopt;
            this->dataVec.fill(0);
        }
        }
    };
    };