diff options
Diffstat (limited to 'services/input/EventHub.h')
-rw-r--r-- | services/input/EventHub.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/services/input/EventHub.h b/services/input/EventHub.h index afc12ef..c93fc7a 100644 --- a/services/input/EventHub.h +++ b/services/input/EventHub.h @@ -42,6 +42,20 @@ #define BTN_FIRST 0x100 // first button code #define BTN_LAST 0x15f // last button code +/* + * These constants are used privately in Android to pass raw timestamps + * through evdev from uinput device drivers because there is currently no + * other way to transfer this information. The evdev driver automatically + * timestamps all input events with the time they were posted and clobbers + * whatever information was passed in. + * + * For the purposes of this hack, the timestamp is specified in the + * CLOCK_MONOTONIC timebase and is split into two EV_MSC events specifying + * seconds and microseconds. + */ +#define MSC_ANDROID_TIME_SEC 0x6 +#define MSC_ANDROID_TIME_USEC 0x7 + namespace android { enum { @@ -329,6 +343,9 @@ private: bool ffEffectPlaying; int16_t ffEffectId; // initially -1 + int32_t timestampOverrideSec; + int32_t timestampOverrideUsec; + Device(int fd, int32_t id, const String8& path, const InputDeviceIdentifier& identifier); ~Device(); |