sanders:Fix Keyhandler for new adaptation

Signed-off-by: ronaxdevil <pratabidya.007@gmail.com>
This commit is contained in:
chirayu19091997
2018-10-14 07:42:36 +00:00
committed by ronaxdevil
parent 61e3c9d368
commit afa0804069

View File

@@ -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) {