sanders: update KeyHandler for api change

This commit is contained in:
Vachounet
2017-12-09 20:56:38 +01:00
committed by Keertesh19
parent 6b3519493c
commit 4297fc997e

View File

@@ -438,7 +438,7 @@ public class KeyHandler implements DeviceKeyHandler {
return node;
}
public boolean handleKeyEvent(KeyEvent event) {
public KeyEvent handleKeyEvent(KeyEvent event) {
int scanCode = event.getScanCode();
if (DEBUG) {
@@ -452,7 +452,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");
@@ -462,12 +462,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;
@@ -482,7 +482,7 @@ public class KeyHandler implements DeviceKeyHandler {
if (isFPScanCode) {
if ((!isFPGestureEnabled) || (!isScreenOn && !isFPGestureEnabledOnScreenOff)) {
resetDoubleTapOnFP();
return false;
return event;
}
if (!isScreenOn && isFPGestureEnabledOnScreenOff) {
processFPScreenOffScancode(scanCode);
@@ -490,7 +490,7 @@ public class KeyHandler implements DeviceKeyHandler {
processFPScancode(scanCode);
}
}
return true;
return null;
}
private void processFPScancode(int scanCode) {