Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a049754 authored by Anthony Stange's avatar Anthony Stange Committed by android-build-merger
Browse files

Verify mPollThread is joinable before detaching am: 65945cfb am: f75cf1cf

am: ce98cb79

Change-Id: If939dfc29dade2ab90dc398253e5eb73752e4c19
parents 7fd32915 ce98cb79
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -29,8 +29,10 @@ void SensorsHidlEnvironmentBase::HidlSetUp() {

void SensorsHidlEnvironmentBase::HidlTearDown() {
    mStopThread = true;
    if (mPollThread.joinable()) {
        mPollThread.detach();
    }
}

void SensorsHidlEnvironmentBase::catEvents(std::vector<Event>* output) {
    std::lock_guard<std::mutex> lock(mEventsMutex);