Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
Change-Id: I4ef2bec80406c517903ab9782dc9eaf3fa8b7f36
diff --git a/libs/gui/ISensorEventConnection.cpp b/libs/gui/ISensorEventConnection.cpp
index a80c661..28fcb53 100644
--- a/libs/gui/ISensorEventConnection.cpp
+++ b/libs/gui/ISensorEventConnection.cpp
@@ -77,10 +77,9 @@
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 @@
} 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;