Merge "Detach pollThread only if it is joinable" into pie-vts-dev

am: cf4a2880c9

Change-Id: I9845ff5af2235cfbdb92c0a066a4960d1dfdc2d5
This commit is contained in:
Wally Yau
2019-05-22 09:33:37 -07:00
committed by android-build-merger

View File

@@ -105,7 +105,9 @@ void SensorsHidlEnvironment::HidlTearDown() {
if (stopThread) {
*stopThread = true;
}
pollThread.detach();
if (pollThread.joinable()) {
pollThread.detach();
}
}
void SensorsHidlEnvironment::resetHal() {