diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 49e92fd2b715e2ac31b8d6e91d5e2afa811c311c..83871a6020b37c5ef0764cfe5a4a6de66b81a703 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -649,7 +649,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha } public boolean isVibrateAndSoundFeedbackRequired() { - return mKeyboardView == null || !mKeyboardView.isInSlidingKeyInput(); + return mKeyboardView != null && !mKeyboardView.isInSlidingKeyInput(); } private int getPointerCount() { diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 36e97af11d0693c3757674d258106eacbd9fa03f..892e5f558ab0f586c35a41c76fa70c6518294a19 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1259,6 +1259,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar break; case Keyboard.CODE_CAPSLOCK: switcher.toggleCapsLock(); + vibrate(); break; case Keyboard.CODE_SHORTCUT: mSubtypeSwitcher.switchToShortcutIME();