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

Commit 389eed52 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

InputDeviceSensorManager: Fix broken input device sensor flushing logic

Sensor flushing logic was broken, because the
InputSensorManager#flushImpl() called InputSensorManager#flush()
instead of InputDeviceSensorManager#flush(), which in turn called
InputSensorManager#flushImpl(). This was an infinitely deep mutually
recursive pit.

Fix this by renaming the local implementation to flushInternal.

Bug: 290254916
Test: atest InputDeviceSensorManagerTest
Change-Id: Ica72ec25956a1b27387d791957474b8e98d423ca
parent a23c564a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -552,7 +552,7 @@ public class InputDeviceSensorManager {
        }
    }

    private boolean flush(SensorEventListener listener) {
    private boolean flushInternal(SensorEventListener listener) {
        synchronized (mInputSensorLock) {
            int idx = findSensorEventListenerLocked(listener);
            if (idx < 0) {
@@ -608,7 +608,7 @@ public class InputDeviceSensorManager {

        @Override
        protected boolean flushImpl(SensorEventListener listener) {
            return flush(listener);
            return flushInternal(listener);
        }

        @Override