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

Commit 7e97b8c9 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Revert "SensorEventQueue: Allow setRate on sensor enable"

This reverts commit 320fd662. It's the wrong fix for the wrong problem. The main issue on 
devices like the JF is the presence of a new method (flush) in the 1.1
sensor API, which can't be invoked in older blobs and should
be addressed in the sensorservice itself.

Change-Id: I2f5fff41db7a11ed2e0f6650d1f1cecb5e2a03fb
parent 320fd662
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -61,10 +61,6 @@ ifeq ($(TARGET_TOROPLUS_RADIO), true)
	LOCAL_CFLAGS += -DTOROPLUS_RADIO
endif

ifeq ($(SENSORS_NEED_SETRATE_ON_ENABLE), true)
        LOCAL_CFLAGS += -DSENSORS_SETRATE_ON_ENABLE
endif

include $(BUILD_SHARED_LIBRARY)

ifeq (,$(ONE_SHOT_MAKEFILE))
+1 −7
Original line number Diff line number Diff line
@@ -128,14 +128,8 @@ status_t SensorEventQueue::disableSensor(Sensor const* sensor) const {

status_t SensorEventQueue::enableSensor(int32_t handle, int32_t samplingPeriodUs,
                                        int maxBatchReportLatencyUs, int reservedFlags) const {
    status_t err = mSensorEventConnection->enableDisable(handle, true, us2ns(samplingPeriodUs),
    return mSensorEventConnection->enableDisable(handle, true, us2ns(samplingPeriodUs),
                                                 us2ns(maxBatchReportLatencyUs), reservedFlags);
    #ifdef SENSORS_SETRATE_ON_ENABLE
    if (err == NO_ERROR) {
        mSensorEventConnection->setEventRate(handle, us2ns(samplingPeriodUs));
    }
    #endif
    return err;
}

status_t SensorEventQueue::flush() const {