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

Commit 92745f7a authored by Vladimir Komsiyski's avatar Vladimir Komsiyski Committed by Android (Google) Code Review
Browse files

Merge "Handle runtime sensor events even if there are no real ones." into udc-dev

parents 094946bd 3b9574a6
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -1055,7 +1055,12 @@ bool SensorService::threadLoop() {
        if (count < 0) {
        if (count < 0) {
            if(count == DEAD_OBJECT && device.isReconnecting()) {
            if(count == DEAD_OBJECT && device.isReconnecting()) {
                device.reconnect();
                device.reconnect();
                // There are no "real" events at this point, but do not skip the rest of the loop
                // if there are pending runtime events.
                Mutex::Autolock _l(&mLock);
                if (mRuntimeSensorEventQueue.empty()) {
                    continue;
                    continue;
                }
            } else {
            } else {
                ALOGE("sensor poll failed (%s)", strerror(-count));
                ALOGE("sensor poll failed (%s)", strerror(-count));
                break;
                break;