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

Commit 0fb92152 authored by Brian Duddie's avatar Brian Duddie Committed by Android (Google) Code Review
Browse files

Merge "Don't cap sensor rates for system clients on mic toggle" into main

parents 5f42d352 90b5385d
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 {