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

Commit aa6dc09e authored by Brian Stack's avatar Brian Stack
Browse files

Mark auto-disabled sensor as not active

Ensure that sensors that are auto-disabled (e.g. one shot sensors) are
properly marked as not active in the SensorDevice.

Bug: 132326245
Test: Verified one-shot sensor is marked as inactive after triggering
Change-Id: I8ef8e8e7998114a16b5d7b3867316b7c2b3fc4df
parent 21c85a62
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -539,6 +539,9 @@ void SensorDevice::autoDisable(void *ident, int handle) {
    }
    Info& info(mActivationCount.editValueAt(activationIndex));
    info.removeBatchParamsForIdent(ident);
    if (info.numActiveClients() == 0) {
        info.isActive = false;
    }
}

status_t SensorDevice::activate(void* ident, int handle, int enabled) {