From 5d346fb79cbdd5acd6bab4d52b0983a92a2a9d74 Mon Sep 17 00:00:00 2001 From: Aditya Chitnis Date: Fri, 18 Aug 2023 22:21:56 +0000 Subject: [PATCH] Initialize mStopThread in Sensor constructor Bug: 294653181 Bug: 294500012 Test: Presubmit Change-Id: I9c9a9119eb75e364d3969ae77248370937f1f3c5 --- sensors/common/default/2.X/Sensor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sensors/common/default/2.X/Sensor.cpp b/sensors/common/default/2.X/Sensor.cpp index 2c1cdfb60e..f8c857bf28 100644 --- a/sensors/common/default/2.X/Sensor.cpp +++ b/sensors/common/default/2.X/Sensor.cpp @@ -40,6 +40,7 @@ Sensor::Sensor(ISensorsEventCallback* callback) : mIsEnabled(false), mSamplingPeriodNs(0), mLastSampleTimeNs(0), + mStopThread(false), mCallback(callback), mMode(OperationMode::NORMAL) { mRunThread = std::thread(startThread, this);