diff options
author | Aravind Akella <aakella@google.com> | 2014-09-24 03:48:09 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-24 03:48:09 +0000 |
commit | 8b4869dc832b098bd8de1fb20bf36ff8ae9c4d28 (patch) | |
tree | e797233d904b76c5642728b541f88f93a43ea94f /services | |
parent | 53bffaaf277f8b9ebd1bffafe52f9a66b38fe792 (diff) | |
parent | 5105960d49bfa86efeeea8f87c87aa96b5771c37 (diff) | |
download | frameworks_native-8b4869dc832b098bd8de1fb20bf36ff8ae9c4d28.zip frameworks_native-8b4869dc832b098bd8de1fb20bf36ff8ae9c4d28.tar.gz frameworks_native-8b4869dc832b098bd8de1fb20bf36ff8ae9c4d28.tar.bz2 |
am 5105960d: Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
* commit '5105960d49bfa86efeeea8f87c87aa96b5771c37':
Fix sockfd leakage in SensorService. Remove sockfd from Looper when the connection is removed from mActiveConnections.
Diffstat (limited to 'services')
-rw-r--r-- | services/sensorservice/SensorService.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp index f953a96..77ada40 100644 --- a/services/sensorservice/SensorService.cpp +++ b/services/sensorservice/SensorService.cpp @@ -653,6 +653,7 @@ void SensorService::cleanupConnection(SensorEventConnection* c) i++; } } + mLooper->removeFd(c->getSensorChannel()->getSendFd()); mActiveConnections.remove(connection); BatteryService::cleanup(c->getUid()); if (c->needsWakeLock()) { @@ -799,6 +800,7 @@ status_t SensorService::cleanupWithoutDisableLocked( BatteryService::disableSensor(connection->getUid(), handle); } if (connection->hasAnySensor() == false) { + mLooper->removeFd(connection->getSensorChannel()->getSendFd()); mActiveConnections.remove(connection); } // see if this sensor becomes inactive |