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

Commit 8caa2423 authored by Devin Moore's avatar Devin Moore Committed by Automerger Merge Worker
Browse files

Merge "SensorManager: Don't try to attach looper thread without JVM" into main...

Merge "SensorManager: Don't try to attach looper thread without JVM" into main am: 66a0d71a am: 33d11c93 am: 6d9f33e3 am: f37672f2 am: b5fbea27

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2731241



Change-Id: I3ad05f5b671106c9a0699fda6bc1a342402c93bf
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2376cc97 b5fbea27
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -196,6 +196,11 @@ ndk::ScopedAStatus SensorManagerAidl::getSensorList(std::vector<SensorInfo>* _ai
sp<Looper> SensorManagerAidl::getLooper() {
    std::lock_guard<std::mutex> lock(mThreadMutex);

    if (!mJavaVm) {
        LOG(ERROR) << "No Java VM. This must be running in a test or fuzzer.";
        return mLooper;
    }

    if (!mPollThread.joinable()) {
        // if thread not initialized, start thread
        mStopThread = false;