summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorFlemmard <flemmard@gmail.com>2014-01-10 09:14:44 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-06-30 18:45:40 +0200
commitf4674619a25cb77349de2152ed97f3a6ffda8985 (patch)
tree802d7d071c12a7b05cff92cf910bc61350f26c8d /minuitwrp
parentAdd "include $(CLEAR_VARS)" for 4.4 ROMS (clears LOCAL_BUILT/LOCAL_INSTALLED error) (diff)
downloadandroid_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.tar
android_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.tar.gz
android_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.tar.bz2
android_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.tar.lz
android_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.tar.xz
android_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.tar.zst
android_bootable_recovery-f4674619a25cb77349de2152ed97f3a6ffda8985.zip
Diffstat (limited to '')
-rw-r--r--minuitwrp/Android.mk5
-rw-r--r--minuitwrp/events.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 4ee59d040..2797a006d 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -81,6 +81,11 @@ endif
ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),)
LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT)
endif
+
+ifneq ($(TW_WHITELIST_INPUT),)
+ LOCAL_CFLAGS += -DWHITELIST_INPUT=$(TW_WHITELIST_INPUT)
+endif
+
LOCAL_SHARED_LIBRARIES += libz libc libcutils libjpeg
LOCAL_STATIC_LIBRARIES += libpng libpixelflinger_static
LOCAL_MODULE_TAGS := eng
diff --git a/minuitwrp/events.c b/minuitwrp/events.c
index bd55e5ae9..7b4655d8e 100644
--- a/minuitwrp/events.c
+++ b/minuitwrp/events.c
@@ -167,11 +167,18 @@ static int vk_init(struct ev *e)
printf("Event object: %s\n", e->deviceName);
#endif
+#ifdef WHITELIST_INPUT
+ if (strcmp(e->deviceName, EXPAND(WHITELIST_INPUT)) != 0)
+ {
+ e->ignored = 1;
+ }
+#else
// Blacklist these "input" devices
if (strcmp(e->deviceName, "bma250") == 0 || strcmp(e->deviceName, "bma150") == 0 || strcmp(e->deviceName, "accelerometer") == 0)
{
e->ignored = 1;
}
+#endif
strcat(vk_path, e->deviceName);