summaryrefslogtreecommitdiffstats
path: root/libs/gui/ISensorServer.cpp
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-07-01 17:40:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-01 17:40:08 +0000
commit8719e3b6310f97a736620395024c858ca8ec7e0c (patch)
treee67388ced8b26443ce4b3456dc3c2c364a79b886 /libs/gui/ISensorServer.cpp
parente59cb43edad0eff28a81b18c3c4484442ff680dd (diff)
parent841a5926fc9b3f9f0e654ba3aab8e43bea7de7f1 (diff)
downloadframeworks_native-8719e3b6310f97a736620395024c858ca8ec7e0c.zip
frameworks_native-8719e3b6310f97a736620395024c858ca8ec7e0c.tar.gz
frameworks_native-8719e3b6310f97a736620395024c858ca8ec7e0c.tar.bz2
Merge "Enable sensor data injection mode through adb." into mnc-dev
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;
}