diff options
Diffstat (limited to 'services/inputflinger/EventHub.cpp')
-rw-r--r-- | services/inputflinger/EventHub.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/inputflinger/EventHub.cpp b/services/inputflinger/EventHub.cpp index 6b60c7c..98cfe2b 100644 --- a/services/inputflinger/EventHub.cpp +++ b/services/inputflinger/EventHub.cpp @@ -1177,6 +1177,15 @@ status_t EventHub::openDeviceLocked(const char *devicePath) { device->classes |= INPUT_DEVICE_CLASS_CURSOR; } + // See if this is a rotary encoder type device. + String8 deviceType = String8(); + if (device->configuration && + device->configuration->tryGetProperty(String8("device.type"), deviceType)) { + if (!deviceType.compare(String8("rotaryEncoder"))) { + device->classes |= INPUT_DEVICE_CLASS_ROTARY_ENCODER; + } + } + // See if this is a touch pad. // Is this a new modern multi-touch driver? if (test_bit(ABS_MT_POSITION_X, device->absBitmask) |