diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-03-17 01:34:19 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@android.com> | 2011-05-23 17:20:42 -0700 |
commit | 68d6075b4ad2205c10064c78cde552e3210cca91 (patch) | |
tree | a8f8e79d5bddb76dd0578a02c17646a05021bbd9 /services/input/InputReader.h | |
parent | 5b2b4d9c0a56c4b5e869c828a6c36a1b9e27d61b (diff) | |
download | frameworks_base-68d6075b4ad2205c10064c78cde552e3210cca91.zip frameworks_base-68d6075b4ad2205c10064c78cde552e3210cca91.tar.gz frameworks_base-68d6075b4ad2205c10064c78cde552e3210cca91.tar.bz2 |
Refactor how timeouts are calculated. (DO NOT MERGE)
Added a timeout mechanism to EventHub and InputReader so that
InputMappers can request timeouts to perform delayed processing of
input when needed.
Change-Id: I89c1171c9326c6e413042e3ee13aa9f7f1fc0454
Diffstat (limited to 'services/input/InputReader.h')
-rw-r--r-- | services/input/InputReader.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/input/InputReader.h b/services/input/InputReader.h index 55ab479..fdb4cfc 100644 --- a/services/input/InputReader.h +++ b/services/input/InputReader.h @@ -159,6 +159,8 @@ public: virtual void fadePointer() = 0; + virtual void requestTimeoutAtTime(nsecs_t when) = 0; + virtual InputReaderPolicyInterface* getPolicy() = 0; virtual InputDispatcherInterface* getDispatcher() = 0; virtual EventHubInterface* getEventHub() = 0; @@ -233,6 +235,7 @@ private: void configureExcludedDevices(); void consumeEvent(const RawEvent* rawEvent); + void timeoutExpired(nsecs_t when); void handleConfigurationChanged(nsecs_t when); @@ -253,6 +256,9 @@ private: virtual bool shouldDropVirtualKey(nsecs_t now, InputDevice* device, int32_t keyCode, int32_t scanCode); + nsecs_t mNextTimeout; + virtual void requestTimeoutAtTime(nsecs_t when); + // state queries typedef int32_t (InputDevice::*GetStateFunc)(uint32_t sourceMask, int32_t code); int32_t getState(int32_t deviceId, uint32_t sourceMask, int32_t code, @@ -296,6 +302,7 @@ public: void configure(); void reset(); void process(const RawEvent* rawEvent); + void timeoutExpired(nsecs_t when); void getDeviceInfo(InputDeviceInfo* outDeviceInfo); int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode); @@ -352,6 +359,7 @@ public: virtual void configure(); virtual void reset(); virtual void process(const RawEvent* rawEvent) = 0; + virtual void timeoutExpired(nsecs_t when); virtual int32_t getKeyCodeState(uint32_t sourceMask, int32_t keyCode); virtual int32_t getScanCodeState(uint32_t sourceMask, int32_t scanCode); |