aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-01-17 16:30:37 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-01-17 16:49:33 +0900
commit87e025da11703af65e7bb85670adac5b54e2a367 (patch)
tree863751a19bcb702ad7d12c5d8569fa06eec0bbe2 /java/src/com/android/inputmethod/latin/LatinIME.java
parentddf4166815b9e72fc7fe8091d664f9b12a9cbcad (diff)
downloadlatinime-87e025da11703af65e7bb85670adac5b54e2a367.tar.gz
latinime-87e025da11703af65e7bb85670adac5b54e2a367.tar.xz
latinime-87e025da11703af65e7bb85670adac5b54e2a367.zip
Remove toggleShift and toggleAlphabetAndSymbols from KeyboardSwitcher
Change-Id: I9bb8f78b0a766cd7937d5cbe1c1e5e35898b2997
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java21
1 files changed, 5 insertions, 16 deletions
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();
}
}