summaryrefslogtreecommitdiffstats
path: root/include/gui
diff options
context:
space:
mode:
authorAravind Akella <aakella@google.com>2015-04-16 18:57:31 -0700
committerAravind Akella <aakella@google.com>2015-04-23 17:42:37 -0700
commita9e6cc387072e25706a6d847a97b02a6f25a918b (patch)
treef270ff0549b25235bbdfca46deaf4dde96a88e30 /include/gui
parent3804378e6a768f539d622ce6a1121d39d9f79e51 (diff)
downloadframeworks_native-a9e6cc387072e25706a6d847a97b02a6f25a918b.zip
frameworks_native-a9e6cc387072e25706a6d847a97b02a6f25a918b.tar.gz
frameworks_native-a9e6cc387072e25706a6d847a97b02a6f25a918b.tar.bz2
Enable data injection mode in SensorService.
Change-Id: I0cd32a017235c31c54816e4a357ce3b988350ed6
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