aboutsummaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorVitalii Kulikov <solk@solk.org.ua>2017-01-16 22:36:29 +0100
committerVitalii Kulikov <solk@solk.org.ua>2017-01-16 22:36:29 +0100
commit331afccf4a9b81ddf22500872b7260b532e15c41 (patch)
tree490125f93ed62b8f17908e0fb8a129bac5e0abf4 /minui
parent16d358b8fdaadf55c1d7d94575bb117278250f37 (diff)
downloadbootable_recovery-331afccf4a9b81ddf22500872b7260b532e15c41.zip
bootable_recovery-331afccf4a9b81ddf22500872b7260b532e15c41.tar.gz
bootable_recovery-331afccf4a9b81ddf22500872b7260b532e15c41.tar.bz2
minui: Skip EV_REL input devices.
This is causing recovery to skip real input devices on some samsung phones where sensors are registered as input devices. So there more then 16 of them. (ex. ks01lte) And EV_REL input devices already disabled in recovery ui.cpp if BOARD_RECOVERY_NEEDS_REL_INPUT is not set. So do same here not to exceed the limit of MAX_DEVICES Change-Id: If3d6e29d00229278a8ef3dfa445393c9f3d5f361
Diffstat (limited to 'minui')
-rw-r--r--minui/Android.mk4
-rw-r--r--minui/events.cpp7
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;
}