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

Commit 71e351d9 authored by Aravind Akella's avatar Aravind Akella Committed by Android (Google) Code Review
Browse files

Merge "Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper ...

Merge "Revert "Fix sockfd leakage in SensorService. Remove sockfd from Looper  when the connection is removed from mActiveConnections."" into lmp-dev
parents 4b20d402 678f4fce
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -653,7 +653,6 @@ void SensorService::cleanupConnection(SensorEventConnection* c)
            i++;
            i++;
        }
        }
    }
    }
    mLooper->removeFd(c->getSensorChannel()->getSendFd());
    mActiveConnections.remove(connection);
    mActiveConnections.remove(connection);
    BatteryService::cleanup(c->getUid());
    BatteryService::cleanup(c->getUid());
    if (c->needsWakeLock()) {
    if (c->needsWakeLock()) {
@@ -800,7 +799,6 @@ status_t SensorService::cleanupWithoutDisableLocked(
            BatteryService::disableSensor(connection->getUid(), handle);
            BatteryService::disableSensor(connection->getUid(), handle);
        }
        }
        if (connection->hasAnySensor() == false) {
        if (connection->hasAnySensor() == false) {
            mLooper->removeFd(connection->getSensorChannel()->getSendFd());
            mActiveConnections.remove(connection);
            mActiveConnections.remove(connection);
        }
        }
        // see if this sensor becomes inactive
        // see if this sensor becomes inactive