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

Commit c09bc8c8 authored by Peng Xu's avatar Peng Xu Committed by android-build-merger
Browse files

Merge changes from topic 'sensor_looper_crash' into oc-dev am: 638055ef am: 91768a2b

am: 063a42c4

Change-Id: I912eea3bd90446147566ef9334663b7f320d1f84
parents b42f95ae 063a42c4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -146,6 +146,10 @@ sp<::android::Looper> SensorManager::getLooper() {
            }

            std::unique_lock<std::mutex> lock(mutex);
            if (looper != nullptr) {
                LOG(INFO) << "Another thread has already set the looper, exiting this one.";
                return;
            }
            looper = Looper::prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS /* opts */);
            lock.unlock();