SensorService Flush API bug fix.
SensorService is dead locking itself when flush is called on older devices which don't support batching. mConnectionLock is acquired twice.
Change-Id: I5c25585bfb2b396df4b05826a9cba1da7997a3ee
diff --git a/services/sensorservice/SensorService.h b/services/sensorservice/SensorService.h
index 2d40071..6c1691a 100644
--- a/services/sensorservice/SensorService.h
+++ b/services/sensorservice/SensorService.h
@@ -83,7 +83,7 @@
// Count the number of flush complete events which are about to be dropped in the buffer.
// Increment mPendingFlushEventsToSend in mSensorInfo. These flush complete events will be
// sent separately before the next batch of events.
- void countFlushCompleteEvents(sensors_event_t* scratch, int numEventsDropped);
+ void countFlushCompleteEventsLocked(sensors_event_t* scratch, int numEventsDropped);
sp<SensorService> const mService;
sp<BitTube> mChannel;
@@ -112,7 +112,6 @@
bool addSensor(int32_t handle);
bool removeSensor(int32_t handle);
void setFirstFlushPending(int32_t handle, bool value);
- void incrementPendingFlushCount(int32_t handle);
void dump(String8& result);
uid_t getUid() const { return mUid; }