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

Commit ce98cb79 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

Change-Id: I8282d67898fffa2efff979250b10dde842511daa
parents b5182941 f75cf1cf
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);