aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-02-01 15:07:25 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-02-01 19:04:21 +0900
commita5c96f376ad57e78a88942bb618e067054ed818a (patch)
tree8798731ed994ca8eb3eec4a1b626f6f5c8296199 /java/src/com/android/inputmethod/latin/LatinIME.java
parent3feb99fa6c5cf4b0a7d0ed2536b8b0891af884bf (diff)
downloadlatinime-a5c96f376ad57e78a88942bb618e067054ed818a.tar.gz
latinime-a5c96f376ad57e78a88942bb618e067054ed818a.tar.xz
latinime-a5c96f376ad57e78a88942bb618e067054ed818a.zip
Move long press shift handling from PointerTracker to KeyboardState
This change also * Rename phone shift keyboard to phone symbols keyboard. Use CODE_SWITCH_ALPHA_SYMBOL code to switch between phone and phone symbols keyboard. * Remove phone symbols keyboard from tablet. * Introduces enableLongPress flag of Key.keyActionFlags attribute. * Remove clumsy long press code from PointerTracker. * Remove CODE_CAPSLOCK handling from LatinIME. * Make KeyboardSwitcher to invoke haptic and audio feedback. Change-Id: I00e1f697a10ab5112aec75e36853b96246ff5054
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 1e7171406..ef8fd1379 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1296,10 +1296,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
case Keyboard.CODE_SETTINGS:
onSettingsKeyPressed();
break;
- case Keyboard.CODE_CAPSLOCK:
- // Caps lock code is handled in KeyboardSwitcher.onCodeInput() below.
- hapticAndAudioFeedback(primaryCode);
- break;
case Keyboard.CODE_SHORTCUT:
mSubtypeSwitcher.switchToShortcutIME();
break;
@@ -2294,18 +2290,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
loadSettings();
}
- private void hapticAndAudioFeedback(int primaryCode) {
+ public void hapticAndAudioFeedback(int primaryCode) {
vibrate();
playKeyClick(primaryCode);
}
@Override
public void onPressKey(int primaryCode) {
- final KeyboardSwitcher switcher = mKeyboardSwitcher;
- if (switcher.isVibrateAndSoundFeedbackRequired()) {
- hapticAndAudioFeedback(primaryCode);
- }
- switcher.onPressKey(primaryCode);
+ mKeyboardSwitcher.onPressKey(primaryCode);
}
@Override
@@ -2313,7 +2305,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
mKeyboardSwitcher.onReleaseKey(primaryCode, withSliding);
}
-
// receive ringer mode change and network state change.
private BroadcastReceiver mReceiver = new BroadcastReceiver() {
@Override