Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7597e93 authored by Vitalii Kulikov's avatar Vitalii Kulikov Committed by Vitalii Kulikov
Browse files

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
(cherry picked from commit 331afccf)
parent 41ed544f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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.
+6 −1
Original line number Diff line number Diff line
@@ -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;
            }