sanders: Update KeyHandler for AOSP
Signed-off-by: Jorge Lucas <jorgelucas.sd@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user