From e7e7b3234c369d0907b0188ec5d39165634d218c Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 28 May 2013 15:25:40 +0900 Subject: [PATCH] Remove KeyboardStart.isInMomentarySwitchState Change-Id: I00f45d8dd7feb6c34c0a65a8545cddd2751796d0 --- .../com/android/inputmethod/keyboard/KeyboardSwitcher.java | 4 ---- .../com/android/inputmethod/keyboard/MainKeyboardView.java | 5 ++--- .../android/inputmethod/keyboard/internal/KeyboardState.java | 5 ----- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index c5bd62431..83f109014 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -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. */ diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java index 34464f690..7493df874 100644 --- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java +++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java @@ -315,9 +315,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack default: final int longpressTimeout = Settings.getInstance().getCurrent().mKeyLongpressTimeout; - if (KeyboardSwitcher.getInstance().isInMomentarySwitchState()) { - // We use longer timeout for sliding finger input started from the symbols - // mode key. + if (tracker.isInSlidingKeyInputFromModifier()) { + // We use longer timeout for sliding finger input started from the modifier key. delay = longpressTimeout * 3; } else { delay = longpressTimeout; diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java index f18d5edff..9f6374bf7 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java +++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java @@ -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) { return c == Constants.CODE_SPACE || c == Constants.CODE_ENTER; }