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

Commit e1d50e0c authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 785fd368: Merge "handle EINTR when calling sensor HAL\'s poll function" into ics-mr1

* commit '785fd368':
  handle EINTR when calling sensor HAL's poll function
parents 0f077739 785fd368
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -166,7 +166,11 @@ status_t SensorDevice::initCheck() const {

ssize_t SensorDevice::poll(sensors_event_t* buffer, size_t count) {
    if (!mSensorDevice) return NO_INIT;
    return mSensorDevice->poll(mSensorDevice, buffer, count);
    ssize_t c;
    do {
        c = mSensorDevice->poll(mSensorDevice, buffer, count);
    } while (c == -EINTR);
    return c;
}

status_t SensorDevice::activate(void* ident, int handle, int enabled)
+2 −1
Original line number Diff line number Diff line
@@ -286,7 +286,8 @@ bool SensorService::threadLoop()
        }
    } while (count >= 0 || Thread::exitPending());

    LOGW("Exiting SensorService::threadLoop!");
    LOGW("Exiting SensorService::threadLoop => aborting...");
    abort();
    return false;
}