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

Commit 642e5511 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

Change-Id: Ib48966c671e1cedb7ed1d26498b8389a62e30921
parents e1ae7711 638055ef
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -143,6 +143,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();