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

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

Verify mPollThread is joinable before detaching

am: 65945cfb

Change-Id: Ia4c4ef1d4e30d8854ee95c9b0cdfb44ad2bb630a
parents 05a97d2d 65945cfb
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);