From 066893623aadcd31bfd2a56a4386a63a8e9a4e48 Mon Sep 17 00:00:00 2001 From: Carlo Savignano Date: Sun, 24 Apr 2016 23:33:34 +0800 Subject: [PATCH] Unify two finger swipe gestures into one [2/4] Change-Id: I768b1cfe924e5be41e6bca2917b32260ad1685be Signed-off-by: Carlo Savignano --- power/Android.mk | 8 ++------ power/power-feature-default.c | 13 +++---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/power/Android.mk b/power/Android.mk index 9ec01586..6746c004 100644 --- a/power/Android.mk +++ b/power/Android.mk @@ -96,12 +96,8 @@ ifneq ($(TARGET_ONE_FINGER_SWIPE_LEFT_NODE),) LOCAL_CFLAGS += -DONE_FINGER_SWIPE_LEFT_NODE=\"$(TARGET_ONE_FINGER_SWIPE_LEFT_NODE)\" endif -ifneq ($(TARGET_TWO_FINGER_SWIPE_UP_NODE),) - LOCAL_CFLAGS += -DTWO_FINGER_SWIPE_UP_NODE=\"$(TARGET_TWO_FINGER_SWIPE_UP_NODE)\" -endif - -ifneq ($(TARGET_TWO_FINGER_SWIPE_DOWN_NODE),) - LOCAL_CFLAGS += -DTWO_FINGER_SWIPE_DOWN_NODE=\"$(TARGET_TWO_FINGER_SWIPE_DOWN_NODE)\" +ifneq ($(TARGET_TWO_FINGER_SWIPE_NODE),) + LOCAL_CFLAGS += -DTWO_FINGER_SWIPE_NODE=\"$(TARGET_TWO_FINGER_SWIPE_NODE)\" endif ifeq ($(TARGET_POWER_SET_FEATURE_LIB),) diff --git a/power/power-feature-default.c b/power/power-feature-default.c index c87147ed..488974ba 100644 --- a/power/power-feature-default.c +++ b/power/power-feature-default.c @@ -119,16 +119,9 @@ void set_device_specific_feature(struct power_module *module __unused, } #endif -#ifdef TWO_FINGER_SWIPE_UP_NODE - if (feature == POWER_FEATURE_TWO_FINGER_SWIPE_UP) { - sysfs_write(TWO_FINGER_SWIPE_UP_NODE, tmp_str); - return; - } -#endif - -#ifdef TWO_FINGER_SWIPE_DOWN_NODE - if (feature == POWER_FEATURE_TWO_FINGER_SWIPE_DOWN) { - sysfs_write(TWO_FINGER_SWIPE_DOWN_NODE, tmp_str); +#ifdef TWO_FINGER_SWIPE_NODE + if (feature == POWER_FEATURE_TWO_FINGER_SWIPE) { + sysfs_write(TWO_FINGER_SWIPE_NODE, tmp_str); return; } #endif