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

Commit 9bad9d41 authored by Rocky Fang's avatar Rocky Fang Committed by Android (Google) Code Review
Browse files

Merge "Add clean up code into a flag" into main

parents 48a6e2f5 0963ded0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1273,10 +1273,13 @@ bool SensorService::threadLoop() {
                } else {
                    int handle = mSensorEventBuffer[i].dynamic_sensor_meta.handle;
                    disconnectDynamicSensor(handle, activeConnections);
                    if (sensorservice_flags::
                            sensor_service_clear_dynamic_sensor_data_at_the_end()) {
                      device.cleanupDisconnectedDynamicSensor(handle);
                    }
                }
            }
        }

        // Send our events to clients. Check the state of wake lock for each client and release the
        // lock if none of the clients need it.