inputflinger: Initial support for rotary encoders.
This change introduces support for rotary encoder input devices.
We also define a new input source (namely, AINPUT_SOURCE_ROTARY_ENCODER)
and a new axis of input (namely, AXIS_SCROLL), since the rotary encoder
motion doesn't necessarily tie to a horizontal or vertical scroll
motion.
A ROTARY_ENCODER input device class is also introduced, corresponding to
the new input source.
A new input source can be defined as producing rotary encoder motion
events, if its corresponding .idc file contains the following
declaration:
device.type = rotaryEncoder
Bug: 18707397
Change-Id: I8ccd540908311d1ff44fdfeba81b691895413641
Signed-off-by: Prashant Malani <pmalani@google.com>
diff --git a/services/inputflinger/EventHub.h b/services/inputflinger/EventHub.h
index 0f94c77..6869253 100644
--- a/services/inputflinger/EventHub.h
+++ b/services/inputflinger/EventHub.h
@@ -137,6 +137,9 @@
/* The input device is an external stylus (has data we want to fuse with touch data). */
INPUT_DEVICE_CLASS_EXTERNAL_STYLUS = 0x00000800,
+ /* The input device has a rotary encoder */
+ INPUT_DEVICE_CLASS_ROTARY_ENCODER = 0x00001000,
+
/* The input device is virtual (not a real device, not part of UI configuration). */
INPUT_DEVICE_CLASS_VIRTUAL = 0x40000000,