mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
dlkm: ets_fps: Set up double tap feature
1. Add new macro for double tap if define 2. Disable slide nav 3. Enable swipe nav 4. Set up double tap at HAL Change-Id: Ibab4d2670980ee76ef03fc82b4c23886cf19a871 Signed-off-by: zhongling1 <zhongling1@lenovo.com> Reviewed-on: https://gerrit.mot.com/1522953 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Weilong Wu <wuwl10@motorola.com> Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
33e0f840c1
commit
7cb19d1ac8
3 changed files with 19 additions and 5 deletions
|
|
@ -21,6 +21,10 @@ ifeq ($(DISPLAY_SPEED_UP), true)
|
|||
KERNEL_CFLAGS += CONFIG_DISPLAY_SPEED_UP=y
|
||||
endif
|
||||
|
||||
ifeq ($(FPS_ENABLE_DOUBLE_TAP), true)
|
||||
KERNEL_CFLAGS += CONFIG_NAV_DOUBLE_TAP=y
|
||||
endif
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ets_fps_mmi.ko
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
|
|
|||
|
|
@ -38,3 +38,7 @@ endif
|
|||
ifneq ($(filter m y, $(CONFIG_DISPLAY_SPEED_UP)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_DISPLAY_SPEED_UP
|
||||
endif
|
||||
|
||||
ifneq ($(filter m y, $(CONFIG_NAV_DOUBLE_TAP)),)
|
||||
EXTRA_CFLAGS += -DCONFIG_NAV_DOUBLE_TAP
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -174,8 +174,12 @@ static unsigned int prev_keycode;
|
|||
* @ ENABLE_TRANSLATED_LONG_TOUCH
|
||||
* ENABLE/DISABLE : enable/disable long-touch event.
|
||||
*/
|
||||
#define ENABLE_TRANSLATED_SINGLE_CLICK DISABLE
|
||||
#ifdef CONFIG_NAV_DOUBLE_TAP
|
||||
#define ENABLE_TRANSLATED_DOUBLE_CLICK ENABLE
|
||||
#else
|
||||
#define ENABLE_TRANSLATED_DOUBLE_CLICK DISABLE
|
||||
#endif
|
||||
#define ENABLE_TRANSLATED_SINGLE_CLICK DISABLE
|
||||
#define ENABLE_TRANSLATED_LONG_TOUCH DISABLE
|
||||
|
||||
|
||||
|
|
@ -206,8 +210,8 @@ static unsigned int prev_keycode;
|
|||
* KEY_PRESS_RELEASE : Combined action of press-then-release
|
||||
*/
|
||||
#define LONGTOUCH_INTERVAL 400
|
||||
#define SINGLECLICK_INTERVAL 150
|
||||
#define DOUBLECLICK_INTERVAL 150
|
||||
#define SINGLECLICK_INTERVAL 200
|
||||
#define DOUBLECLICK_INTERVAL 500
|
||||
|
||||
|
||||
#define KEYEVENT_CLICK KEY_FPS_TAP /* 0x232 */
|
||||
|
|
@ -399,7 +403,7 @@ void translated_command_converter(char cmd, struct etspi_data *etspi)
|
|||
|
||||
case NAVI_EVENT_ON: /* finger down */
|
||||
g_KeyEventRaised = false;
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK || ENABLE_TRANSLATED_DOUBLE_CLICK
|
||||
g_SingleClickJiffies = jiffies;
|
||||
#endif
|
||||
|
||||
|
|
@ -418,10 +422,12 @@ void translated_command_converter(char cmd, struct etspi_data *etspi)
|
|||
pr_info("Egis : g_SingleClick %u tap interval =%u double tap interval = %u time= %u",
|
||||
g_SingleClick, jiffies_to_msecs(jiffies - g_SingleClickJiffies),
|
||||
jiffies_to_msecs(jiffies - g_DoubleClickJiffies), jiffies_to_msecs(jiffies));
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK || ENABLE_TRANSLATED_DOUBLE_CLICK
|
||||
if ((jiffies - g_SingleClickJiffies) < (HZ * SINGLECLICK_INTERVAL / 1000)) {
|
||||
/* Click event */
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK
|
||||
send_key_event(etspi, KEYEVENT_CLICK, KEYEVENT_CLICK_ACTION);
|
||||
#endif
|
||||
g_SingleClick++;
|
||||
if (g_SingleClick == 1) {
|
||||
g_DoubleClickJiffies = jiffies;
|
||||
|
|
|
|||
Loading…
Reference in a new issue