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

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

Fix handling of initialization error am: d9125699

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

Change-Id: Iafe7376cb88f62ba1a5a3d8bdf18f4c5d61e99f9
parents fc0d3ff4 d9125699
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);