commit | ce98cb79389b87c059aafd804fb6f0c9e84d18c0 | [log] [tgz] |
---|---|---|
author | Anthony Stange <stange@google.com> | Mon Jul 15 18:12:24 2019 -0700 |
committer | android-build-merger <android-build-merger@google.com> | Mon Jul 15 18:12:24 2019 -0700 |
tree | 23d00bafe129f27dfa4a04f803e98f9cda0bb7cb | |
parent | b518294134c08a85089cd4d33cf0b0a9d8203d89 [diff] | |
parent | f75cf1cf4d32bb8c978d3fc3804240036f35bf9b [diff] |
Verify mPollThread is joinable before detaching am: 65945cfb15 am: f75cf1cf4d Change-Id: I8282d67898fffa2efff979250b10dde842511daa
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) {