Remove KeyboardStart.isInMomentarySwitchState
Change-Id: I00f45d8dd7feb6c34c0a65a8545cddd2751796d0main
parent
a2d8d30f8e
commit
e7e7b3234c
|
@ -335,10 +335,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInMomentarySwitchState() {
|
|
||||||
return mState.isInMomentarySwitchState();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates state machine to figure out when to automatically switch back to the previous mode.
|
* Updates state machine to figure out when to automatically switch back to the previous mode.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -315,9 +315,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
default:
|
default:
|
||||||
final int longpressTimeout =
|
final int longpressTimeout =
|
||||||
Settings.getInstance().getCurrent().mKeyLongpressTimeout;
|
Settings.getInstance().getCurrent().mKeyLongpressTimeout;
|
||||||
if (KeyboardSwitcher.getInstance().isInMomentarySwitchState()) {
|
if (tracker.isInSlidingKeyInputFromModifier()) {
|
||||||
// We use longer timeout for sliding finger input started from the symbols
|
// We use longer timeout for sliding finger input started from the modifier key.
|
||||||
// mode key.
|
|
||||||
delay = longpressTimeout * 3;
|
delay = longpressTimeout * 3;
|
||||||
} else {
|
} else {
|
||||||
delay = longpressTimeout;
|
delay = longpressTimeout;
|
||||||
|
|
|
@ -574,11 +574,6 @@ public final class KeyboardState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInMomentarySwitchState() {
|
|
||||||
return mSwitchState == SWITCH_STATE_MOMENTARY_ALPHA_AND_SYMBOL
|
|
||||||
|| mSwitchState == SWITCH_STATE_MOMENTARY_SYMBOL_AND_MORE;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean isSpaceCharacter(final int c) {
|
private static boolean isSpaceCharacter(final int c) {
|
||||||
return c == Constants.CODE_SPACE || c == Constants.CODE_ENTER;
|
return c == Constants.CODE_SPACE || c == Constants.CODE_ENTER;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue