commit | 5cad1fa924685ca5c21b260094f92355c5aff682 | [log] [tgz] |
---|---|---|
author | Chris Ye <lzye@google.com> | Fri Dec 18 09:34:22 2020 -0800 |
committer | Chris Ye <lzye@google.com> | Fri Dec 18 14:31:30 2020 -0800 |
tree | cd4bcdd68b74d99938cf8374c0543a23ac21188a | |
parent | 4083086e1a9944b671f37617ac5a8f1f6e784dc1 [diff] |
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
diff --git a/services/inputflinger/OWNERS b/services/inputflinger/OWNERS index 0313a40..82c6ee1 100644 --- a/services/inputflinger/OWNERS +++ b/services/inputflinger/OWNERS
@@ -1,2 +1,3 @@ +lzye@google.com michaelwr@google.com svv@google.com
diff --git a/services/inputflinger/reader/mapper/SensorInputMapper.h b/services/inputflinger/reader/mapper/SensorInputMapper.h index 3371002..1797fe3 100644 --- a/services/inputflinger/reader/mapper/SensorInputMapper.h +++ b/services/inputflinger/reader/mapper/SensorInputMapper.h
@@ -98,7 +98,6 @@ this->samplingPeriod = std::chrono::nanoseconds(0); this->maxBatchReportLatency = std::chrono::nanoseconds(0); this->lastSampleTimeNs = std::nullopt; - this->dataVec.fill(0); } };