summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2014-09-28 17:52:41 -0700
committerAravind Akella <aakella@google.com>2014-10-02 18:59:56 -0700
commit8a96955c8e14db40b16164236830fc9506a00872 (patch)
tree9d9879b500b561b0931a98727f9e6e5f246087d2 /include/gui
parentdb57cfbd6f9d5795846ef237fd297cb81e429679 (diff)
downloadframeworks_native-8a96955c8e14db40b16164236830fc9506a00872.zip
frameworks_native-8a96955c8e14db40b16164236830fc9506a00872.tar.gz
frameworks_native-8a96955c8e14db40b16164236830fc9506a00872.tar.bz2
Fix sockfd leakage in SensorService.
i) Call removeFd() only if the fd in the BitTube has been previously added to the Looper. Use a flag to determine whether the fd has been previously added or not. ii) Increment mPendingFlushEventsToSend after holding a connectionLock. iii) Store the number of acks that are pending in SensorEventQueue and send them all at once. Bug: 17472228 Change-Id: I1ec834fea1112a9cfbd9cddd2198438793698502
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/SensorEventQueue.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/gui/SensorEventQueue.h b/include/gui/SensorEventQueue.h
index 019308d..02b3d38 100644
--- a/include/gui/SensorEventQueue.h
+++ b/include/gui/SensorEventQueue.h
@@ -86,6 +86,7 @@ private:
ASensorEvent* mRecBuffer;
size_t mAvailable;
size_t mConsumed;
+ uint32_t mNumAcksToSend;
};
// ----------------------------------------------------------------------------