From 87e025da11703af65e7bb85670adac5b54e2a367 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 17 Jan 2012 16:30:37 +0900 Subject: Remove toggleShift and toggleAlphabetAndSymbols from KeyboardSwitcher Change-Id: I9bb8f78b0a766cd7937d5cbe1c1e5e35898b2997 --- .../src/com/android/inputmethod/latin/LatinIME.java | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'java/src/com/android/inputmethod/latin') diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 02391da9c..cd58df6bb 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1261,16 +1261,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar LatinImeLogger.logOnDelete(); break; case Keyboard.CODE_SHIFT: - // Shift key is handled in onPress() when device has distinct multi-touch panel. - if (!distinctMultiTouch) { - switcher.toggleShift(); - } - break; case Keyboard.CODE_SWITCH_ALPHA_SYMBOL: - // Symbol key is handled in onPress() when device has distinct multi-touch panel. - if (!distinctMultiTouch) { - switcher.toggleAlphabetAndSymbols(); - } + // Shift and symbol key is handled in onPress() and onRelease(). break; case Keyboard.CODE_SETTINGS: onSettingsKeyPressed(); @@ -2252,10 +2244,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar if (switcher.isVibrateAndSoundFeedbackRequired()) { hapticAndAudioFeedback(primaryCode); } - final boolean distinctMultiTouch = switcher.hasDistinctMultitouch(); - if (distinctMultiTouch && primaryCode == Keyboard.CODE_SHIFT) { + if (primaryCode == Keyboard.CODE_SHIFT) { switcher.onPressShift(withSliding); - } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) { + } else if (primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) { switcher.onPressSymbol(); } else { switcher.onOtherKeyPressed(); @@ -2265,11 +2256,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar @Override public void onRelease(int primaryCode, boolean withSliding) { KeyboardSwitcher switcher = mKeyboardSwitcher; - // Reset any drag flags in the keyboard - final boolean distinctMultiTouch = switcher.hasDistinctMultitouch(); - if (distinctMultiTouch && primaryCode == Keyboard.CODE_SHIFT) { + if (primaryCode == Keyboard.CODE_SHIFT) { switcher.onReleaseShift(withSliding); - } else if (distinctMultiTouch && primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) { + } else if (primaryCode == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) { switcher.onReleaseSymbol(); } } -- cgit v1.2.3-83-g751a