Processes a key event and tests if it is a part of the trigger. If the chord is complete,
then we just call the callback.
if (!Constants.DebugFlags.App.EnableDebugMode) return;
if (mLastKeyCode == 0) {
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) {
mLastKeyCode = keyCode;
mLastKeyCodeTime = SystemClock.uptimeMillis();
return;
}
} else {
if (mLastKeyCode == KeyEvent.KEYCODE_VOLUME_UP &&
keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
if ((SystemClock.uptimeMillis() - mLastKeyCodeTime) < 750) {
mTriggeredRunnable.run();
}
}
}
reset();