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

Commit 90b5385d authored by Brian Duddie's avatar Brian Duddie
Browse files

Don't cap sensor rates for system clients on mic toggle

Bug: 409015086
Test: confirm that VNDK client is not downgraded via dumpsys
Flag: EXEMPT bugfix
Change-Id: I48323036e115154fa875e2a49055a31680a51a2c
parent e61a93c6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -119,6 +119,11 @@ void SensorService::SensorDirectConnection::onSensorAccessChanged(bool hasAccess
}

void SensorService::SensorDirectConnection::onMicSensorAccessChanged(bool isMicToggleOn) {
    // TODO(b/398253250): Create a more robust way to allow VNDK and system clients to be exempted
    if (mUid == AID_SYSTEM) {
        return;
    }

    if (isMicToggleOn) {
        capRates();
    } else {
+5 −0
Original line number Diff line number Diff line
@@ -764,6 +764,11 @@ status_t SensorService::SensorEventConnection::setEventRate(int handle, nsecs_t
}

void SensorService::SensorEventConnection::onMicSensorAccessChanged(bool isMicToggleOn) {
     // TODO(b/398253250): Create a more robust way to allow VNDK and system clients to be exempted
     if (mUid == AID_SYSTEM) {
        return;
    }

    if (isMicToggleOn) {
        capRates();
    } else {