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

Commit 063a42c4 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

Change-Id: Ib1eabf66f2658de1adca4133c20fb4b9fdc71526
parents 02bd71ae 91768a2b
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();