From afa0804069281f3157751caa53fb5e6c59a62466 Mon Sep 17 00:00:00 2001 From: chirayu19091997 Date: Sun, 14 Oct 2018 07:42:36 +0000 Subject: [PATCH] sanders:Fix Keyhandler for new adaptation Signed-off-by: ronaxdevil --- MotoActions/src/com/moto/actions/KeyHandler.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/MotoActions/src/com/moto/actions/KeyHandler.java b/MotoActions/src/com/moto/actions/KeyHandler.java index 4c50d74..da91876 100644 --- a/MotoActions/src/com/moto/actions/KeyHandler.java +++ b/MotoActions/src/com/moto/actions/KeyHandler.java @@ -417,7 +417,7 @@ public class KeyHandler implements DeviceKeyHandler { return node; } - public boolean handleKeyEvent(KeyEvent event) { + public KeyEvent handleKeyEvent(KeyEvent event) { int scanCode = event.getScanCode(); if (DEBUG) { @@ -431,7 +431,7 @@ public class KeyHandler implements DeviceKeyHandler { boolean isFPScanCode = ArrayUtils.contains(sSupportedFPGestures, scanCode); if (!isFPScanCode) { - return false; + return event; } boolean isFPGestureEnabled = FileUtils.readOneLine(FP_HOME_NODE).equals("1"); @@ -441,12 +441,12 @@ public class KeyHandler implements DeviceKeyHandler { // We only want ACTION_UP event if (event.getAction() != KeyEvent.ACTION_UP) { - return true; + return null; } if (isFPScanCode){ if (fpGesturePending) { - return false; + return event; } else { resetFPGestureDelay(); fpGesturePending = true; @@ -461,7 +461,7 @@ public class KeyHandler implements DeviceKeyHandler { if (isFPScanCode) { if ((!isFPGestureEnabled) || (!isScreenOn && !isFPGestureEnabledOnScreenOff)) { resetDoubleTapOnFP(); - return false; + return event; } if (!isScreenOn && isFPGestureEnabledOnScreenOff) { processFPScreenOffScancode(scanCode); @@ -469,7 +469,7 @@ public class KeyHandler implements DeviceKeyHandler { processFPScancode(scanCode); } } - return true; + return null; } private void processFPScancode(int scanCode) {