summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-04-25 01:40:34 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-25 01:40:35 +0000
commitcc60dc2128a98f952beb187da22b28dcba0124ad (patch)
treedc3f49b98b22ed7e0b11dafc5d93abd12acdf937 /include/gui
parent0f7723f6b48e3324f6cd3fa001413b1ea5e32efb (diff)
parenta9e6cc387072e25706a6d847a97b02a6f25a918b (diff)
downloadframeworks_native-cc60dc2128a98f952beb187da22b28dcba0124ad.zip
frameworks_native-cc60dc2128a98f952beb187da22b28dcba0124ad.tar.gz
frameworks_native-cc60dc2128a98f952beb187da22b28dcba0124ad.tar.bz2
Merge "Enable data injection mode in SensorService."
Diffstat (limited to 'include/gui')
-rw-r--r--include/gui/ISensorServer.h4
-rw-r--r--include/gui/SensorEventQueue.h2
-rw-r--r--include/gui/SensorManager.h3
3 files changed, 7 insertions, 2 deletions
diff --git a/include/gui/ISensorServer.h b/include/gui/ISensorServer.h
index 9a29cb5..ee3484c 100644
--- a/include/gui/ISensorServer.h
+++ b/include/gui/ISensorServer.h
@@ -38,7 +38,9 @@ public:
DECLARE_META_INTERFACE(SensorServer);
virtual Vector<Sensor> getSensorList() = 0;
- virtual sp<ISensorEventConnection> createSensorEventConnection(const String8& packageName) = 0;
+ virtual sp<ISensorEventConnection> createSensorEventConnection(const String8& packageName,
+ int mode) = 0;
+ virtual status_t enableDataInjection(int enable) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/include/gui/SensorEventQueue.h b/include/gui/SensorEventQueue.h
index 02b3d38..b70957b 100644
--- a/include/gui/SensorEventQueue.h
+++ b/include/gui/SensorEventQueue.h
@@ -77,6 +77,8 @@ public:
status_t flush() const;
// Send an ack for every wake_up sensor event that is set to WAKE_UP_SENSOR_EVENT_NEEDS_ACK.
void sendAck(const ASensorEvent* events, int count);
+
+ status_t injectSensorEvent(const ASensorEvent& event);
private:
sp<Looper> getLooper() const;
sp<ISensorEventConnection> mSensorEventConnection;
diff --git a/include/gui/SensorManager.h b/include/gui/SensorManager.h
index 1afff68..19c2bdc 100644
--- a/include/gui/SensorManager.h
+++ b/include/gui/SensorManager.h
@@ -53,7 +53,8 @@ public:
ssize_t getSensorList(Sensor const* const** list) const;
Sensor const* getDefaultSensor(int type);
- sp<SensorEventQueue> createEventQueue(String8 packageName = String8(""));
+ sp<SensorEventQueue> createEventQueue(String8 packageName = String8(""), int mode = 0);
+ ssize_t enableDataInjection(bool enable);
private:
// DeathRecipient interface