commit | 0a049754b360586d1e2796591b708e92a3910cb8 | [log] [tgz] |
---|---|---|
author | Anthony Stange <stange@google.com> | Mon Jul 15 18:47:51 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Mon Jul 15 18:47:51 2019 -0700 |
tree | e6c7dcb2b36daacab0958fae006b03d001f29403 | |
parent | 7fd329150672b09ca94bd3c8537bdab5f4502043 [diff] | |
parent | ce98cb79389b87c059aafd804fb6f0c9e84d18c0 [diff] |
Verify mPollThread is joinable before detaching am: 65945cfb15 am: f75cf1cf4d am: ce98cb7938 Change-Id: If939dfc29dade2ab90dc398253e5eb73752e4c19
diff --git a/sensors/common/vts/utils/SensorsHidlEnvironmentBase.cpp b/sensors/common/vts/utils/SensorsHidlEnvironmentBase.cpp index affdf8b..fa0e2e9 100644 --- a/sensors/common/vts/utils/SensorsHidlEnvironmentBase.cpp +++ b/sensors/common/vts/utils/SensorsHidlEnvironmentBase.cpp
@@ -29,7 +29,9 @@ void SensorsHidlEnvironmentBase::HidlTearDown() { mStopThread = true; - mPollThread.detach(); + if (mPollThread.joinable()) { + mPollThread.detach(); + } } void SensorsHidlEnvironmentBase::catEvents(std::vector<Event>* output) {