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

Commit b57ca9b0 authored by Ytai Ben-Tsvi's avatar Ytai Ben-Tsvi Committed by Automerger Merge Worker
Browse files

Fix handling of initialization error am: d9125699 am: 860db90d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/15668298

Change-Id: I39554f4b0e4cf91a3e765a6ec80a64137ac682c7
parents 9acb0343 860db90d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -144,6 +144,9 @@ class SensorPoseProviderImpl : public SensorPoseProvider {
    bool waitInitFinished() { return mInitPromise.get_future().get(); }

    void threadFunc(const char* packageName) {
        // Obtain looper.
        mLooper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);

        // The number 19 is arbitrary, only useful if using multiple objects on the same looper.
        constexpr int kIdent = 19;

@@ -155,9 +158,6 @@ class SensorPoseProviderImpl : public SensorPoseProvider {
            return;
        }

        // Obtain looper.
        mLooper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);

        // Create event queue.
        ASensorEventQueue* queue =
                ASensorManager_createEventQueue(sensor_manager, mLooper, kIdent, nullptr, nullptr);