mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
Double tap optimization
Set double click interval to 300ms to avoid false trigger. NO_PROP_NEEDED: porting from bq-sh2019 Change-Id: Id4ab80b4c91c54fe37cb0af72bec267f1276e731 Signed-off-by: wuwl10 <wuwl10@motorola.com> Reviewed-on: https://gerrit.mot.com/1685735 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
522fa4233e
commit
05b981d8fa
1 changed files with 4 additions and 2 deletions
|
|
@ -210,7 +210,8 @@ static unsigned int prev_keycode;
|
|||
* KEY_PRESS_RELEASE : Combined action of press-then-release
|
||||
*/
|
||||
#define LONGTOUCH_INTERVAL 400
|
||||
#define SINGLECLICK_INTERVAL 200
|
||||
#define SINGLECLICK_INTERVAL 150
|
||||
#define SINGLECLICK_INTERVAL_MIN 5
|
||||
#define DOUBLECLICK_INTERVAL 300
|
||||
|
||||
|
||||
|
|
@ -423,7 +424,8 @@ void translated_command_converter(char cmd, struct etspi_data *etspi)
|
|||
g_SingleClick, jiffies_to_msecs(jiffies - g_SingleClickJiffies),
|
||||
jiffies_to_msecs(g_SingleClickJiffies - g_DoubleClickJiffies), jiffies_to_msecs(jiffies));
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK || ENABLE_TRANSLATED_DOUBLE_CLICK
|
||||
if ((jiffies - g_SingleClickJiffies) < (HZ * SINGLECLICK_INTERVAL / 1000)) {
|
||||
if ((jiffies - g_SingleClickJiffies) < (HZ * SINGLECLICK_INTERVAL / 1000)
|
||||
&& (jiffies - g_SingleClickJiffies) > (HZ * SINGLECLICK_INTERVAL_MIN / 1000)) {
|
||||
/* Click event */
|
||||
#if ENABLE_TRANSLATED_SINGLE_CLICK
|
||||
send_key_event(etspi, KEYEVENT_CLICK, KEYEVENT_CLICK_ACTION);
|
||||
|
|
|
|||
Loading…
Reference in a new issue