summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISensorServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/ISensorServer.cpp')
-rw-r--r--libs/gui/ISensorServer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/libs/gui/ISensorServer.cpp b/libs/gui/ISensorServer.cpp
index 5dde9f9..f581b5c 100644
--- a/libs/gui/ISensorServer.cpp
+++ b/libs/gui/ISensorServer.cpp
@@ -77,10 +77,9 @@ public:
return interface_cast<ISensorEventConnection>(reply.readStrongBinder());
}
- virtual status_t enableDataInjection(int enable) {
+ virtual int isDataInjectionEnabled() {
Parcel data, reply;
data.writeInterfaceToken(ISensorServer::getInterfaceDescriptor());
- data.writeInt32(enable);
remote()->transact(ENABLE_DATA_INJECTION, data, &reply);
return reply.readInt32();
}
@@ -121,8 +120,7 @@ status_t BnSensorServer::onTransact(
}
case ENABLE_DATA_INJECTION: {
CHECK_INTERFACE(ISensorServer, data, reply);
- int32_t enable = data.readInt32();
- status_t ret = enableDataInjection(enable);
+ int32_t ret = isDataInjectionEnabled();
reply->writeInt32(static_cast<int32_t>(ret));
return NO_ERROR;
}