diff options
| author | 2013-10-08 14:59:26 -0700 | |
|---|---|---|
| committer | 2013-10-11 12:42:13 -0700 | |
| commit | 4c4cd9c8cc91ec4d221ceabd58b84ab226bd38f1 (patch) | |
| tree | d072a671aabe0adba9a2aecd7a58ced55f5092e5 /libs/gui | |
| parent | a8b5982c32f6232428e9dcab691bb0bca6f72d63 (diff) | |
Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
Change-Id: I4ef2bec80406c517903ab9782dc9eaf3fa8b7f36
Diffstat (limited to 'libs/gui')
| -rw-r--r-- | libs/gui/ISensorEventConnection.cpp | 6 | ||||
| -rw-r--r-- | libs/gui/SensorEventQueue.cpp | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/libs/gui/ISensorEventConnection.cpp b/libs/gui/ISensorEventConnection.cpp index a80c661cb3..28fcb53d8f 100644 --- a/libs/gui/ISensorEventConnection.cpp +++ b/libs/gui/ISensorEventConnection.cpp @@ -77,10 +77,9 @@ public: return reply.readInt32(); } - virtual status_t flushSensor(int handle) { + virtual status_t flush() { Parcel data, reply; data.writeInterfaceToken(ISensorEventConnection::getInterfaceDescriptor()); - data.writeInt32(handle); remote()->transact(FLUSH_SENSOR, data, &reply); return reply.readInt32(); } @@ -122,8 +121,7 @@ status_t BnSensorEventConnection::onTransact( } break; case FLUSH_SENSOR: { CHECK_INTERFACE(ISensorEventConnection, data, reply); - int handle = data.readInt32(); - status_t result = flushSensor(handle); + status_t result = flush(); reply->writeInt32(result); return NO_ERROR; } break; diff --git a/libs/gui/SensorEventQueue.cpp b/libs/gui/SensorEventQueue.cpp index ab50c1d730..c3656718db 100644 --- a/libs/gui/SensorEventQueue.cpp +++ b/libs/gui/SensorEventQueue.cpp @@ -132,8 +132,8 @@ status_t SensorEventQueue::enableSensor(int32_t handle, int32_t samplingPeriodUs us2ns(maxBatchReportLatencyUs), reservedFlags); } -status_t SensorEventQueue::flushSensor(int32_t handle) const { - return mSensorEventConnection->flushSensor(handle); +status_t SensorEventQueue::flush() const { + return mSensorEventConnection->flush(); } status_t SensorEventQueue::disableSensor(int32_t handle) const { |