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

Commit ae35ccea authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7616100 from cebf2e6c to sc-d1-release

Change-Id: Id79718902426e4ec91b8394b11a97eee26af620d
parents 3cf616a7 cebf2e6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -915,7 +915,7 @@ bool SensorDevice::isSensorActive(int handle) const {
    if (activationIndex < 0) {
        return false;
    }
    return mActivationCount.valueAt(activationIndex).numActiveClients() > 0;
    return mActivationCount.valueAt(activationIndex).isActive;
}

void SensorDevice::onMicSensorAccessChanged(void* ident, int handle, nsecs_t samplingPeriodNs) {
+6 −4
Original line number Diff line number Diff line
@@ -92,14 +92,16 @@ ProximitySensor::ProximitySensor(const sensor_t& sensor, SensorService& service)
}

status_t ProximitySensor::activate(void* ident, bool enabled) {
    bool wasActive = mActive;
    bool lastState = mSensorDevice.isSensorActive(mSensor.getHandle());

    status_t status = HardwareSensor::activate(ident, enabled);
    if (status != NO_ERROR) {
        return status;
    }
    mActive = enabled;
    if (wasActive != enabled) {
        mSensorService.onProximityActiveLocked(enabled);

    bool currentState = mSensorDevice.isSensorActive(mSensor.getHandle());
    if (currentState != lastState) {
        mSensorService.onProximityActiveLocked(currentState);
    }
    return NO_ERROR;
}
+0 −1
Original line number Diff line number Diff line
@@ -119,7 +119,6 @@ public:
    void didEnableAllSensors() override;
private:
    SensorService& mSensorService;
    bool mActive;
};

// ---------------------------------------------------------------------------