diff options
-rw-r--r-- | minui/Android.mk | 4 | ||||
-rw-r--r-- | minui/events.cpp | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/minui/Android.mk b/minui/Android.mk index e74c7be..a8d0aa4 100644 --- a/minui/Android.mk +++ b/minui/Android.mk @@ -44,6 +44,10 @@ ifneq ($(BOARD_RECOVERY_NEEDS_FBIOPAN_DISPLAY),) LOCAL_CFLAGS += -DBOARD_RECOVERY_NEEDS_FBIOPAN_DISPLAY endif +ifneq ($(BOARD_RECOVERY_NEEDS_REL_INPUT),) + LOCAL_CFLAGS += -DBOARD_RECOVERY_NEEDS_REL_INPUT +endif + include $(BUILD_STATIC_LIBRARY) # Used by OEMs for factory test images. diff --git a/minui/events.cpp b/minui/events.cpp index 120baed..3c635f0 100644 --- a/minui/events.cpp +++ b/minui/events.cpp @@ -78,8 +78,13 @@ int ev_init(ev_callback input_cb, void* data) { continue; } - // We assume that only EV_KEY, EV_REL, EV_SW, and EV_ABS event types are ever needed. + // We assume that only EV_KEY, EV_SW, and EV_ABS event types are ever needed. + // EV_REL should be enabled explicitly in device tree. +#ifdef BOARD_RECOVERY_NEEDS_REL_INPUT if (!test_bit(EV_KEY, ev_bits) && !test_bit(EV_REL, ev_bits) && !test_bit(EV_SW, ev_bits) && !test_bit(EV_ABS, ev_bits)) { +#else + if (!test_bit(EV_KEY, ev_bits) && !test_bit(EV_SW, ev_bits) && !test_bit(EV_ABS, ev_bits)) { +#endif close(fd); continue; } |